@primer-io/primer-js 0.15.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -47,16 +47,6 @@
47
47
  }
48
48
  ]
49
49
  },
50
- {
51
- "kind": "variable",
52
- "name": "pr",
53
- "default": "class{constructor(t){this._methods=t}get(t){return this._methods.get(t)}toArray(){return Array.from(this._methods.values())}size(){return this._methods.size}}"
54
- },
55
- {
56
- "kind": "variable",
57
- "name": "mr",
58
- "default": "class{constructor(t){this._methods=t}get(t){return this._methods.get(t)}toArray(){return Array.from(this._methods.values())}size(){return this._methods.size}}"
59
- },
60
50
  {
61
51
  "kind": "variable",
62
52
  "name": "ne",
@@ -65,32 +55,32 @@
65
55
  {
66
56
  "kind": "variable",
67
57
  "name": "Pe",
68
- "default": "class extends v{constructor(){super();this.customStyles=\"\";this.clientToken=\"\";this.options={};this.disableLoader=!1;this._jsInitialized=!1;this.previousLoadingState=!0;this.hasAssignedContent=!1;this._loadingTimeoutId=null;this._eventListenerController=null;this.locale=qt(br());this.onSlotChange=e=>{let i=e.target.assignedNodes({flatten:!0});this.hasAssignedContent=i.length>0,this.requestUpdate()};this.sdkContextController=new nr(this),this.sdkStateController=new ir(this),this.primerEventsController=new Wt(this),this.styleProcessingController=new or(this),this.vaultManagerController=new ga(this),this.cardNetworkController=new wa(this),this.achPaymentEventsController=new Dr(this),this.headlessSdkController=new wr(this)}set jsInitialized(e){this.requestUpdate(),this._jsInitialized=e}get jsInitialized(){return this._jsInitialized}get primerJS(){return this.headlessSdkController?.primerJSInstance??void 0}connectedCallback(){super.connectedCallback(),this.sdkContextController.setEventsController(this.primerEventsController),this._eventListenerController=new AbortController,document.addEventListener(\"primer:card-submit\",this.handleExternalCardSubmit.bind(this),{signal:this._eventListenerController.signal}),document.addEventListener(\"primer:vault-submit\",this.handleExternalVaultSubmit.bind(this),{signal:this._eventListenerController.signal}),document.addEventListener(\"primer:show-other-payments-toggle\",this.handleExternalShowOtherPaymentsToggle.bind(this),{signal:this._eventListenerController.signal})}attributeChangedCallback(e,a,i){e===Mp.CUSTOM_STYLES?this.styleProcessingController.processCustomStyles(i):super.attributeChangedCallback(e,a,i)}disconnectedCallback(){this._loadingTimeoutId&&(window.clearTimeout(this._loadingTimeoutId),this._loadingTimeoutId=null),this.sdkStateController?.currentState.isLoading&&this.sdkStateController.forceCompleteLoading(),this._eventListenerController&&(this._eventListenerController.abort(),this._eventListenerController=null),super.disconnectedCallback()}willUpdate(e){e.has(\"options\")&&(this.options?.locale&&(Vi(this.options?.locale)?this.locale=qt(this.options?.locale):P.warn(\"\\u{1F30E}\\u2757 Unsupported locale provided:\",this.options?.locale,\"- Falling back to system locale\")),Fi(this.locale))}updated(){let e=getComputedStyle(this);this.sdkContextController.setComputedStyles(e),this.checkLoadingStateChange()}handleExternalCardSubmit(e){this._eventListenerController?.signal.aborted||e.target!==this&&this.primerEventsController.dispatchEvent(\"primer:card-submit\",e.detail)}handleExternalVaultSubmit(e){this._eventListenerController?.signal.aborted||e.target!==this&&this.primerEventsController.dispatchEvent(\"primer:vault-submit\",e.detail)}handleExternalShowOtherPaymentsToggle(e){this._eventListenerController?.signal.aborted||e.target!==this&&this.primerEventsController.dispatchEvent(\"primer:show-other-payments-toggle\",e.detail)}checkLoadingStateChange(){let e=this.sdkStateController?.currentState.isLoading||!1;if(this.previousLoadingState&&!e){this.jsInitialized=!0,Q({eventName:\"CHECKOUT_FLOW_STARTED\"});let a=Ye.getSdkInitStartTime(),i=a?Date.now()-a:void 0;Po(i)}this.previousLoadingState=e,e&&!this._loadingTimeoutId?this._loadingTimeoutId=window.setTimeout(()=>{this.sdkStateController?.currentState.isLoading&&(P.warn(\"Loading timeout in component, forcing completion\"),this.sdkStateController.forceCompleteLoading(),this.jsInitialized=!0),this._loadingTimeoutId=null},1e4):!e&&this._loadingTimeoutId&&(window.clearTimeout(this._loadingTimeoutId),this._loadingTimeoutId=null)}render(){let e=this.sdkStateController.currentState,a=e.isLoading,i=e.primerJsError,n=!a&&!i;return p` ${R(a,()=>y)} ${R(i,()=>p`<primer-checkout-error></primer-checkout-error>`)} ${R(n,()=>p`<slot name=\"main\" @slotchange=${this.onSlotChange}></slot>${R(this.hasAssignedContent,()=>y,()=>p`<primer-main></primer-main>`)} `,()=>y)} `}addEventListener(e,a,i){super.addEventListener(e,a,i)}removeEventListener(e,a,i){super.removeEventListener(e,a,i)}}"
58
+ "default": "class extends v{constructor(){super();this.customStyles=\"\";this.clientToken=\"\";this.options={};this.disableLoader=!1;this._jsInitialized=!1;this.previousLoadingState=!0;this.hasAssignedContent=!1;this._loadingTimeoutId=null;this._eventListenerController=null;this.locale=Qt(vr());this.onSlotChange=e=>{let i=e.target.assignedNodes({flatten:!0});this.hasAssignedContent=i.length>0,this.requestUpdate()};this.sdkContextController=new nr(this),this.sdkStateController=new ir(this),this.primerEventsController=new Zt(this),this.styleProcessingController=new or(this),this.vaultManagerController=new ga(this),this.cardNetworkController=new wa(this),this.achPaymentEventsController=new _r(this),this.headlessSdkController=new xr(this)}set jsInitialized(e){this.requestUpdate(),this._jsInitialized=e}get jsInitialized(){return this._jsInitialized}get primerJS(){return this.headlessSdkController?.primerJSInstance??void 0}connectedCallback(){super.connectedCallback(),this.sdkContextController.setEventsController(this.primerEventsController),this._eventListenerController=new AbortController,document.addEventListener(\"primer:card-submit\",this.handleExternalCardSubmit.bind(this),{signal:this._eventListenerController.signal}),document.addEventListener(\"primer:vault-submit\",this.handleExternalVaultSubmit.bind(this),{signal:this._eventListenerController.signal}),document.addEventListener(\"primer:show-other-payments-toggle\",this.handleExternalShowOtherPaymentsToggle.bind(this),{signal:this._eventListenerController.signal})}attributeChangedCallback(e,a,i){e===Ap.CUSTOM_STYLES?this.styleProcessingController.processCustomStyles(i):super.attributeChangedCallback(e,a,i)}disconnectedCallback(){this._loadingTimeoutId&&(window.clearTimeout(this._loadingTimeoutId),this._loadingTimeoutId=null),this.sdkStateController?.currentState.isLoading&&this.sdkStateController.forceCompleteLoading(),this._eventListenerController&&(this._eventListenerController.abort(),this._eventListenerController=null),super.disconnectedCallback()}willUpdate(e){e.has(\"options\")&&(this.options?.locale&&(Fi(this.options?.locale)?this.locale=Qt(this.options?.locale):P.warn(\"\\u{1F30E}\\u2757 Unsupported locale provided:\",this.options?.locale,\"- Falling back to system locale\")),Gi(this.locale))}updated(){let e=getComputedStyle(this);this.sdkContextController.setComputedStyles(e),this.checkLoadingStateChange()}handleExternalCardSubmit(e){this._eventListenerController?.signal.aborted||e.target!==this&&this.primerEventsController.dispatchEvent(\"primer:card-submit\",e.detail)}handleExternalVaultSubmit(e){this._eventListenerController?.signal.aborted||e.target!==this&&this.primerEventsController.dispatchEvent(\"primer:vault-submit\",e.detail)}handleExternalShowOtherPaymentsToggle(e){this._eventListenerController?.signal.aborted||e.target!==this&&this.primerEventsController.dispatchEvent(\"primer:show-other-payments-toggle\",e.detail)}checkLoadingStateChange(){let e=this.sdkStateController?.currentState.isLoading||!1;if(this.previousLoadingState&&!e){this.jsInitialized=!0,Q({eventName:\"CHECKOUT_FLOW_STARTED\"});let a=Ye.getSdkInitStartTime(),i=a?Date.now()-a:void 0;Eo(i)}this.previousLoadingState=e,e&&!this._loadingTimeoutId?this._loadingTimeoutId=window.setTimeout(()=>{this.sdkStateController?.currentState.isLoading&&(P.warn(\"Loading timeout in component, forcing completion\"),this.sdkStateController.forceCompleteLoading(),this.jsInitialized=!0),this._loadingTimeoutId=null},1e4):!e&&this._loadingTimeoutId&&(window.clearTimeout(this._loadingTimeoutId),this._loadingTimeoutId=null)}render(){let e=this.sdkStateController.currentState,a=e.isLoading,i=e.primerJsError,n=!a&&!i;return p` ${R(a,()=>y)} ${R(i,()=>p`<primer-checkout-error></primer-checkout-error>`)} ${R(n,()=>p`<slot name=\"main\" @slotchange=${this.onSlotChange}></slot>${R(this.hasAssignedContent,()=>y,()=>p`<primer-main></primer-main>`)} `,()=>y)} `}addEventListener(e,a,i){super.addEventListener(e,a,i)}removeEventListener(e,a,i){super.removeEventListener(e,a,i)}}"
69
59
  },
70
60
  {
71
61
  "kind": "function",
72
- "name": "Ps"
62
+ "name": "Es"
73
63
  },
74
64
  {
75
65
  "kind": "function",
76
- "name": "Is"
66
+ "name": "Ts"
77
67
  },
78
68
  {
79
69
  "kind": "function",
80
- "name": "Np"
70
+ "name": "Pp"
81
71
  },
82
72
  {
83
73
  "kind": "function",
84
- "name": "kp"
74
+ "name": "Np"
85
75
  },
86
76
  {
87
77
  "kind": "variable",
88
- "name": "ze",
89
- "default": "class extends v{constructor(){super(...arguments);this.color=\"var(--primer-color-loader)\";this.size=\"medium\";this.compact=!1}getSize(){if(this.size in en)return en[this.size];let e=parseInt(this.size,10);return isNaN(e)?en.medium:e}render(){let e=this.getSize(),a=20,i=`0 0 ${a} ${a}`;return this.style.setProperty(\"--spinner-color\",this.color),this.style.setProperty(\"--spinner-size\",`${e}px`),p`<div class=\"spinner-container ${this.compact?\"compact\":\"\"}\"><svg class=\"spinner\" width=\"${e}\" height=\"${e}\" viewBox=\"${i}\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" role=\"status\" aria-label=\"Loading\" ><path d=\"M4.27827 10.002C4.27827 6.84166 6.84019 4.27973 10.0005 4.27973C10.7676 4.27973 11.3894 3.6579 11.3894 2.89084C11.3894 2.12378 10.7676 1.50195 10.0005 1.50195C5.30607 1.50195 1.50049 5.30753 1.50049 10.002C1.50049 14.6964 5.30607 18.502 10.0005 18.502C14.6949 18.502 18.5005 14.6964 18.5005 10.002C18.5005 9.23489 17.8787 8.61306 17.1116 8.61306C16.3445 8.61306 15.7227 9.23489 15.7227 10.002C15.7227 13.1622 13.1608 15.7242 10.0005 15.7242C6.84019 15.7242 4.27827 13.1622 4.27827 10.002Z\" fill=\"currentColor\" class=\"path\" /></svg></div>`}}"
78
+ "name": "$e",
79
+ "default": "class extends v{constructor(){super(...arguments);this.color=\"var(--primer-color-loader)\";this.size=\"medium\";this.compact=!1}getSize(){if(this.size in Qi)return Qi[this.size];let e=parseInt(this.size,10);return isNaN(e)?Qi.medium:e}render(){let e=this.getSize(),a=20,i=`0 0 ${a} ${a}`;return this.style.setProperty(\"--spinner-color\",this.color),this.style.setProperty(\"--spinner-size\",`${e}px`),p`<div class=\"spinner-container ${this.compact?\"compact\":\"\"}\"><svg class=\"spinner\" width=\"${e}\" height=\"${e}\" viewBox=\"${i}\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" role=\"status\" aria-label=\"Loading\" ><path d=\"M4.27827 10.002C4.27827 6.84166 6.84019 4.27973 10.0005 4.27973C10.7676 4.27973 11.3894 3.6579 11.3894 2.89084C11.3894 2.12378 10.7676 1.50195 10.0005 1.50195C5.30607 1.50195 1.50049 5.30753 1.50049 10.002C1.50049 14.6964 5.30607 18.502 10.0005 18.502C14.6949 18.502 18.5005 14.6964 18.5005 10.002C18.5005 9.23489 17.8787 8.61306 17.1116 8.61306C16.3445 8.61306 15.7227 9.23489 15.7227 10.002C15.7227 13.1622 13.1608 15.7242 10.0005 15.7242C6.84019 15.7242 4.27827 13.1622 4.27827 10.002Z\" fill=\"currentColor\" class=\"path\" /></svg></div>`}}"
90
80
  },
91
81
  {
92
82
  "kind": "variable",
93
- "name": "$e",
83
+ "name": "ze",
94
84
  "default": "class extends v{constructor(){super(...arguments);this.focusWithin=!1;this.hasError=!1;this.handleWrapperClick=e=>{if(e.target!==e.currentTarget)return;let a=this.findSlottedPrimerInput();a?a.focus():this.dispatchEvent(new CustomEvent(\"wrapper-click\",{bubbles:!0,composed:!0}))}}findSlottedPrimerInput(){if(!this.inputSlot)return null;let e=this.inputSlot.assignedElements({flatten:!0}),a=e.find(i=>i.tagName.toLowerCase()===\"primer-input\");if(a)return a;for(let i of e){let n=i.querySelector(\"primer-input\");if(n)return n}return null}render(){let e={\"input-slot\":!0,\"focus-within\":this.focusWithin};return p`<div class=\"input-wrapper\"><slot name=\"label\"></slot><div class=\"${oe(e)}\" @click=\"${this.handleWrapperClick}\"><slot name=\"input\"></slot></div><slot name=\"error\"></slot></div>`}}"
95
85
  },
96
86
  {
@@ -111,7 +101,7 @@
111
101
  {
112
102
  "kind": "variable",
113
103
  "name": "je",
114
- "default": "class extends v{constructor(){super(...arguments);this.color=\"var(--primer-color-icon-primary)\";this.size=\"lg\"}render(){let e=this.name?_s[this.name]:null;return p`<div style=\"--internal-icon-color: ${this.color}\">${e||p`<slot></slot>`}</div>`}}"
104
+ "default": "class extends v{constructor(){super(...arguments);this.color=\"var(--primer-color-icon-primary)\";this.size=\"lg\"}render(){let e=this.name?Rs[this.name]:null;return p`<div style=\"--internal-icon-color: ${this.color}\">${e||p`<slot></slot>`}</div>`}}"
115
105
  },
116
106
  {
117
107
  "kind": "variable",
@@ -126,7 +116,7 @@
126
116
  {
127
117
  "kind": "variable",
128
118
  "name": "Ae",
129
- "default": "class extends v{constructor(){super(...arguments);this.name=\"\";this.id=\"\";this.value=\"\";this.disabled=!1;this.hasError=!1;this.placeholder=\"\";this.options=[]}handleChange(e){let a=e.target,i=this.value;this.value=a.value,this.dispatchEvent(new CustomEvent(\"change\",{detail:this.value,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(\"input\",{detail:this.value,bubbles:!0,composed:!0})),this.requestUpdate(\"value\",i)}handleFocus(){this.dispatchEvent(new CustomEvent(\"focus\",{bubbles:!0,composed:!0}))}handleBlur(){this.dispatchEvent(new CustomEvent(\"blur\",{bubbles:!0,composed:!0}))}renderSelectOptions(){let e=[];for(let a of this.options)e.push(p`<option value=${a.value}>${a.label}</option>`);return e}render(){return p`<select id=${this.id} name=${this.name} .value=${Gs(this.value)} ?disabled=${this.disabled} ?required=${!this.value} @change=${this.handleChange} @focus=${this.handleFocus} @blur=${this.handleBlur} aria-invalid=${this.hasError?\"true\":\"false\"} ><option value=\"\" disabled ?selected=${!this.value}>${this.placeholder||\"Select an option\"}</option>${this.renderSelectOptions()}</select>`}}"
119
+ "default": "class extends v{constructor(){super(...arguments);this.name=\"\";this.id=\"\";this.value=\"\";this.disabled=!1;this.hasError=!1;this.placeholder=\"\";this.options=[]}handleChange(e){let a=e.target,i=this.value;this.value=a.value,this.dispatchEvent(new CustomEvent(\"change\",{detail:this.value,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(\"input\",{detail:this.value,bubbles:!0,composed:!0})),this.requestUpdate(\"value\",i)}handleFocus(){this.dispatchEvent(new CustomEvent(\"focus\",{bubbles:!0,composed:!0}))}handleBlur(){this.dispatchEvent(new CustomEvent(\"blur\",{bubbles:!0,composed:!0}))}renderSelectOptions(){let e=[];for(let a of this.options)e.push(p`<option value=${a.value}>${a.label}</option>`);return e}render(){return p`<select id=${this.id} name=${this.name} .value=${Bs(this.value)} ?disabled=${this.disabled} ?required=${!this.value} @change=${this.handleChange} @focus=${this.handleFocus} @blur=${this.handleBlur} aria-invalid=${this.hasError?\"true\":\"false\"} ><option value=\"\" disabled ?selected=${!this.value}>${this.placeholder||\"Select an option\"}</option>${this.renderSelectOptions()}</select>`}}"
130
120
  },
131
121
  {
132
122
  "kind": "variable",
@@ -156,17 +146,17 @@
156
146
  {
157
147
  "kind": "variable",
158
148
  "name": "Ze",
159
- "default": "class extends v{constructor(){super();this.paymentManagers=new Map;this.disabled=!1;this.loadManagerTask=new O(this,{args:()=>[this.paymentMethod?.type],task:([e])=>{if(!e)return w;let a=this.paymentManagers.get(e);if(!a)throw new Error(`No manager found for payment method type ${e}`);if(a.type!==\"GOOGLE_PAY\")throw new Error(\"Invalid payment method type for Google Pay component\");return a.manager}}),this.renderButtonTask=new O(this,{args:()=>[this.loadManagerTask.value],task:async([e])=>{if(!e)return w;await this.updateComplete;let a=e.createButton();return await a.render(this.shadowRoot?.getRootNode(),{style:{shadowRoot:!0}}),this.disabled&&await a.setDisabled(this.disabled),this.disabled&&this.shadowRoot&&(await this.updateComplete,Or(this.disabled,this.shadowRoot)),a}})}attributeChangedCallback(e,a,i){if(super.attributeChangedCallback(e,a,i),e===\"disabled\"&&a!==i){let n=i!==null,o=this.renderButtonTask.value;o&&o.setDisabled(n)}}updated(e){e.has(\"disabled\")&&this.shadowRoot&&Or(this.disabled,this.shadowRoot)}render(){return y}}"
149
+ "default": "class extends v{constructor(){super();this.paymentManagers=new Map;this.disabled=!1;this.loadManagerTask=new O(this,{args:()=>[this.paymentMethod?.type],task:([e])=>{if(!e)return w;let a=this.paymentManagers.get(e);if(!a)throw new Error(`No manager found for payment method type ${e}`);if(a.type!==\"GOOGLE_PAY\")throw new Error(\"Invalid payment method type for Google Pay component\");return a.manager}}),this.renderButtonTask=new O(this,{args:()=>[this.loadManagerTask.value],task:async([e])=>{if(!e)return w;await this.updateComplete;let a=e.createButton();return await a.render(this.shadowRoot?.getRootNode(),{style:{shadowRoot:!0}}),this.disabled&&await a.setDisabled(this.disabled),this.disabled&&this.shadowRoot&&(await this.updateComplete,Dr(this.disabled,this.shadowRoot)),a}})}attributeChangedCallback(e,a,i){if(super.attributeChangedCallback(e,a,i),e===\"disabled\"&&a!==i){let n=i!==null,o=this.renderButtonTask.value;o&&o.setDisabled(n)}}updated(e){e.has(\"disabled\")&&this.shadowRoot&&Dr(this.disabled,this.shadowRoot)}render(){return y}}"
160
150
  },
161
151
  {
162
152
  "kind": "variable",
163
153
  "name": "Je",
164
- "default": "class extends v{constructor(){super();this.paymentManagers=new Map;this.disabled=!1;this.buttonContainerRef=Kt();this.loadManagerTask=new O(this,{args:()=>[this.paymentMethod?.type],task:([e])=>{if(!e)return w;let a=this.paymentManagers.get(e);if(!a)throw new Error(`No manager found for payment method type ${e}`);if(a.type!==\"APPLE_PAY\")throw new Error(\"Invalid payment method type for Apple Pay component\");return a.manager}}),this.renderButtonTask=new O(this,{args:()=>[this.loadManagerTask.value],task:async([e])=>{if(!e)return w;await this.updateComplete;let a=this.buttonContainerRef.value;if(!a)throw new Error(\"Button container not found\");let i=e.createButton(),n=Kr(a);return await i.render(a,{style:{buttonHeight:n}}),this.disabled&&await i.setDisabled(this.disabled),this.disabled&&(await this.updateComplete,ta(this.disabled,this.buttonContainerRef)),i}})}attributeChangedCallback(e,a,i){if(super.attributeChangedCallback(e,a,i),e===\"disabled\"&&a!==i){let n=i!==null,o=this.renderButtonTask.value;o&&o.setDisabled(n)}}updated(e){e.has(\"disabled\")&&ta(this.disabled,this.buttonContainerRef)}render(){return p`<div class=\"native-button-container\" ${Et(this.buttonContainerRef)} ></div>`}}"
154
+ "default": "class extends v{constructor(){super();this.paymentManagers=new Map;this.disabled=!1;this.buttonContainerRef=Ft();this.loadManagerTask=new O(this,{args:()=>[this.paymentMethod?.type],task:([e])=>{if(!e)return w;let a=this.paymentManagers.get(e);if(!a)throw new Error(`No manager found for payment method type ${e}`);if(a.type!==\"APPLE_PAY\")throw new Error(\"Invalid payment method type for Apple Pay component\");return a.manager}}),this.renderButtonTask=new O(this,{args:()=>[this.loadManagerTask.value],task:async([e])=>{if(!e)return w;await this.updateComplete;let a=this.buttonContainerRef.value;if(!a)throw new Error(\"Button container not found\");let i=e.createButton(),n=Or(a);return await i.render(a,{style:{buttonHeight:n}}),this.disabled&&await i.setDisabled(this.disabled),this.disabled&&(await this.updateComplete,aa(this.disabled,this.buttonContainerRef)),i}})}attributeChangedCallback(e,a,i){if(super.attributeChangedCallback(e,a,i),e===\"disabled\"&&a!==i){let n=i!==null,o=this.renderButtonTask.value;o&&o.setDisabled(n)}}updated(e){e.has(\"disabled\")&&aa(this.disabled,this.buttonContainerRef)}render(){return p`<div class=\"native-button-container\" ${Et(this.buttonContainerRef)} ></div>`}}"
165
155
  },
166
156
  {
167
157
  "kind": "variable",
168
158
  "name": "qe",
169
- "default": "class extends v{constructor(){super();this.paymentManagers=new Map;this.disabled=!1;this.buttonContainerRef=Kt();this.loadManagerTask=new O(this,{args:()=>[this.paymentMethod?.type],task:([e])=>{if(!e)return w;let a=this.paymentManagers.get(e);if(!a)throw new Error(`No manager found for payment method type ${e}`);if(a.type!==\"PAYPAL\")throw new Error(\"Invalid payment method type for PayPal component\");return a.manager}}),this.renderButtonTask=new O(this,{args:()=>[this.loadManagerTask.value],task:async([e])=>{if(!e)return w;await this.updateComplete;let a=this.buttonContainerRef.value;if(!a)throw new Error(\"Button container not found\");let i=e.createButton(),n=Js(Kr(this));return await i.render(a,{style:{buttonHeight:n}}),this.disabled&&await i.setDisabled(this.disabled),this.disabled&&(await this.updateComplete,ta(this.disabled,this.buttonContainerRef)),i}})}attributeChangedCallback(e,a,i){if(super.attributeChangedCallback(e,a,i),e===\"disabled\"&&a!==i){let n=i!==null,o=this.renderButtonTask.value;o&&o.setDisabled(n)}}updated(e){e.has(\"disabled\")&&ta(this.disabled,this.buttonContainerRef)}render(){return p`<div class=\"native-button-container\" ${Et(this.buttonContainerRef)} ></div>`}}"
159
+ "default": "class extends v{constructor(){super();this.paymentManagers=new Map;this.disabled=!1;this.buttonContainerRef=Ft();this.loadManagerTask=new O(this,{args:()=>[this.paymentMethod?.type],task:([e])=>{if(!e)return w;let a=this.paymentManagers.get(e);if(!a)throw new Error(`No manager found for payment method type ${e}`);if(a.type!==\"PAYPAL\")throw new Error(\"Invalid payment method type for PayPal component\");return a.manager}}),this.renderButtonTask=new O(this,{args:()=>[this.loadManagerTask.value],task:async([e])=>{if(!e)return w;await this.updateComplete;let a=this.buttonContainerRef.value;if(!a)throw new Error(\"Button container not found\");let i=e.createButton(),n=Ws(Or(this));return await i.render(a,{style:{buttonHeight:n}}),this.disabled&&await i.setDisabled(this.disabled),this.disabled&&(await this.updateComplete,aa(this.disabled,this.buttonContainerRef)),i}})}attributeChangedCallback(e,a,i){if(super.attributeChangedCallback(e,a,i),e===\"disabled\"&&a!==i){let n=i!==null,o=this.renderButtonTask.value;o&&o.setDisabled(n)}}updated(e){e.has(\"disabled\")&&aa(this.disabled,this.buttonContainerRef)}render(){return p`<div class=\"native-button-container\" ${Et(this.buttonContainerRef)} ></div>`}}"
170
160
  },
171
161
  {
172
162
  "kind": "variable",
@@ -176,17 +166,17 @@
176
166
  {
177
167
  "kind": "variable",
178
168
  "name": "Fe",
179
- "default": "class extends v{constructor(){super(...arguments);this.type=void 0;this.disabled=!1;this.paymentMethods=null;this.analyticsUtils=null;this.handleClick=()=>{this.paymentMethods?.get(this.type)?.managerType!==\"CARD\"&&this.sendPaymentMethodSelectionEvent()}}sendPaymentMethodSelectionEvent(){this.type&&Q({eventName:\"PAYMENT_METHOD_SELECTION\",paymentMethod:this.type})}render(){if(!this.type)return y;let e=this.paymentMethods?.get(this.type);if(!e)return y;let a;switch(e?.managerType){case\"CARD\":a=p`<primer-card-form ?disabled=${this.disabled} ></primer-card-form>`;break;case\"NATIVE\":{let i=e.type;i===ka.GOOGLE_PAY?a=p`<primer-google-pay .paymentMethod=${e} ?disabled=${this.disabled} ></primer-google-pay>`:i===ka.APPLE_PAY?a=p`<primer-apple-pay .paymentMethod=${e} ?disabled=${this.disabled} ></primer-apple-pay>`:i===ka.PAYPAL?a=p`<primer-paypal .paymentMethod=${e} ?disabled=${this.disabled} ></primer-paypal>`:i===ka.ADYEN_BLIK&&(a=p`<primer-blik .paymentMethod=${e} ?disabled=${this.disabled} ></primer-blik>`);break}case\"REDIRECT\":a=p`<primer-redirect-payment .paymentMethod=${e} ?disabled=${this.disabled} ></primer-redirect-payment>`;break;case\"KLARNA\":a=p`<primer-klarna ?disabled=${this.disabled} ></primer-klarna>`;break;case\"ACH\":a=p`<primer-dynamic-payment .paymentMethod=${e} ></primer-dynamic-payment>`;break;default:return y}return p`<div @click=${this.handleClick}>${a}</div>`}}"
169
+ "default": "class extends v{constructor(){super(...arguments);this.type=void 0;this.disabled=!1;this.paymentMethods=null;this.analyticsUtils=null;this.handleClick=()=>{this.paymentMethods?.find(a=>a.type===this.type)?.managerType!==\"CARD\"&&this.sendPaymentMethodSelectionEvent()}}sendPaymentMethodSelectionEvent(){this.type&&Q({eventName:\"PAYMENT_METHOD_SELECTION\",paymentMethod:this.type})}render(){if(!this.type)return y;let e=this.paymentMethods?.find(i=>i.type===this.type);if(!e)return y;let a;switch(e?.managerType){case\"CARD\":a=p`<primer-card-form ?disabled=${this.disabled} ></primer-card-form>`;break;case\"NATIVE\":{let i=e.type;i===ka.GOOGLE_PAY?a=p`<primer-google-pay .paymentMethod=${e} ?disabled=${this.disabled} ></primer-google-pay>`:i===ka.APPLE_PAY?a=p`<primer-apple-pay .paymentMethod=${e} ?disabled=${this.disabled} ></primer-apple-pay>`:i===ka.PAYPAL?a=p`<primer-paypal .paymentMethod=${e} ?disabled=${this.disabled} ></primer-paypal>`:i===ka.ADYEN_BLIK&&(a=p`<primer-blik .paymentMethod=${e} ?disabled=${this.disabled} ></primer-blik>`);break}case\"REDIRECT\":a=p`<primer-redirect-payment .paymentMethod=${e} ?disabled=${this.disabled} ></primer-redirect-payment>`;break;case\"KLARNA\":a=p`<primer-klarna ?disabled=${this.disabled} ></primer-klarna>`;break;case\"ACH\":a=p`<primer-dynamic-payment .paymentMethod=${e} ></primer-dynamic-payment>`;break;default:return y}return p`<div @click=${this.handleClick}>${a}</div>`}}"
180
170
  },
181
171
  {
182
172
  "kind": "variable",
183
173
  "name": "Re",
184
- "default": "class extends v{constructor(){super(...arguments);this.disabled=!1;this.paymentMethods=null;this.clientOptions=null}getFilteredMethods(){if(!this.paymentMethods)return[];let e=this.paymentMethods.toArray();if(this.include){let a=this.include.split(\",\").map(i=>i.trim());e=e.filter(i=>a.includes(i.type))}if(this.exclude){let a=this.exclude.split(\",\").map(i=>i.trim());e=e.filter(i=>!a.includes(i.type))}return e}render(){let e=this.getFilteredMethods();return e.length===0?y:p`<div class=\"payment-methods-container\">${e.map(a=>p`<primer-payment-method type=\"${a.type}\" ?disabled=\"${this.disabled||this.clientOptions?.disabledPayments===!0}\" ></primer-payment-method>`)}</div>`}}"
174
+ "default": "class extends v{constructor(){super(...arguments);this.disabled=!1;this.paymentMethods=null;this.clientOptions=null}getFilteredMethods(){if(!this.paymentMethods)return[];let e=[...this.paymentMethods];if(this.include){let a=this.include.split(\",\").map(i=>i.trim());e=e.filter(i=>a.includes(i.type))}if(this.exclude){let a=this.exclude.split(\",\").map(i=>i.trim());e=e.filter(i=>!a.includes(i.type))}return e}render(){let e=this.getFilteredMethods();return e.length===0?y:p`<div class=\"payment-methods-container\">${e.map(a=>p`<primer-payment-method type=\"${a.type}\" ?disabled=\"${this.disabled||this.clientOptions?.disabledPayments===!0}\" ></primer-payment-method>`)}</div>`}}"
185
175
  },
186
176
  {
187
177
  "kind": "variable",
188
- "name": "Ie",
189
- "default": "class extends v{constructor(){super(...arguments);this.formController=new Fr(this,e=>this._paymentMethodManagerTask.value.setAndValidate(e));this.paymentManagers=new Map;this.sdkState=void 0;this.clientOptions=void 0;this.screen=\"form\";this.isSubmitting=!1;this._paymentMethodManagerTask=new O(this,{task:([e])=>e!==\"STRIPE_ACH\"?w:this.paymentManagers.get(e)?.manager,args:()=>[this.paymentMethod?.type]})}_handleInput(e,a){let i=e.target;this.formController.setFieldValue(a,i.value)}_handleBlur(e){this.formController.setFieldTouched(e)}_handleError(e){this.dispatchEvent(new CustomEvent(\"primer-ach-error\",{bubbles:!0,composed:!0,detail:{error:e instanceof Error?e:new Error(typeof e==\"string\"?e:\"Unknown error occurred\")}}))}async _handleSubmitButtonClick(e){if(!this.isSubmitting){this.isSubmitting=!0;try{let a=await e.start(this.formController.formData);if(!a||a.valid)return await this._handleCollectBankAccountDetails(e);a&&this.formController.setValidation(a,!0)}catch(a){this._handleError(a)}finally{this.isSubmitting=!1}}}async _handleCollectBankAccountDetails(e){try{await e.collectBankAccountDetails(),this.screen=\"mandate\",this.dispatchEvent(new CustomEvent(\"primer-ach-bank-details-collected\",{bubbles:!0,composed:!0}))}catch(a){this._handleError(a)}}async _handleConfirmMandate(){if(this._paymentMethodManagerTask.value){this.isSubmitting=!0;try{await this._paymentMethodManagerTask.value.confirmMandate(),this.dispatchEvent(new CustomEvent(\"primer-ach-mandate-confirmed\",{bubbles:!0,composed:!0}))}catch(e){this._handleError(e)}finally{this.isSubmitting=!1}}}async _handleDeclineMandate(){if(this._paymentMethodManagerTask.value){this.isSubmitting=!0;try{await this._paymentMethodManagerTask.value.declineMandate(),this.dispatchEvent(new CustomEvent(\"primer-ach-mandate-declined\",{bubbles:!0,composed:!0}))}catch(e){this._handleError(e)}finally{this.isSubmitting=!1}}}renderForm(e){return p`<h2>${b(\"payWithAch\",{id:\"payWithAch\"})}</h2><p>${b(\"stripe_ach_user_details_collection_subtitle_label\",{id:\"stripe_ach_user_details_collection_subtitle_label\"})}</p><form @submit=${a=>a.preventDefault()}><div class=\"form-row\"><primer-input-wrapper .hasError=${this.formController.hasError.firstName} ><primer-input-label slot=\"label\">${b(\"stripe_ach_user_details_collection_first_name_label\",{id:\"stripe_ach_user_details_collection_first_name_label\"})}</primer-input-label><primer-input slot=\"input\" .value=${this.formController.formState.firstName.value} @input=${a=>this._handleInput(a,\"firstName\")} @blur=${()=>this._handleBlur(\"firstName\")} ?disabled=${this.isSubmitting} ></primer-input><primer-input-error slot=\"error\">${this.formController.hasError.firstName?this.formController.formState.firstName.error:y}</primer-input-error></primer-input-wrapper><primer-input-wrapper .hasError=${this.formController.hasError.lastName} ><primer-input-label slot=\"label\">${b(\"stripe_ach_user_details_collection_last_name_label\",{id:\"stripe_ach_user_details_collection_last_name_label\"})}</primer-input-label><primer-input slot=\"input\" .value=${this.formController.formState.lastName.value} @input=${a=>this._handleInput(a,\"lastName\")} @blur=${()=>this._handleBlur(\"lastName\")} ?disabled=${this.isSubmitting} ></primer-input><primer-input-error slot=\"error\">${this.formController.hasError.lastName?this.formController.formState.lastName.error:y}</primer-input-error></primer-input-wrapper></div><primer-input-wrapper .hasError=${this.formController.hasError.emailAddress} ><primer-input-label slot=\"label\">${b(\"stripe_ach_user_details_collection_email_address_label\",{id:\"stripe_ach_user_details_collection_email_address_label\"})}</primer-input-label><primer-input slot=\"input\" type=\"email\" .value=${this.formController.formState.emailAddress.value} @input=${a=>this._handleInput(a,\"emailAddress\")} @blur=${()=>this._handleBlur(\"emailAddress\")} ?disabled=${this.isSubmitting} ></primer-input><primer-input-error slot=\"error\">${this.formController.hasError.emailAddress?this.formController.formState.emailAddress.error:y}</primer-input-error></primer-input-wrapper><p>${b(\"stripe_ach_user_details_collection_data_usage_label\",{id:\"stripe_ach_user_details_collection_data_usage_label\"})}</p><primer-button buttonType=\"submit\" variant=\"primary\" @click=${()=>this._handleSubmitButtonClick(e)} ?disabled=${this.isSubmitting} ?loading=${this.isSubmitting} >${b(\"stripe_ach_user_details_collection_continue_button\",{id:\"stripe_ach_user_details_collection_continue_button\"})}</primer-button></form>`}renderMandate(){return p`<h2>${b(\"payWithAch\",{id:\"payWithAch\"})}</h2><p>${this.clientOptions?.stripe?.mandateData.fullMandateText??b(\"stripe_ach_mandate_template_web\",{id:\"stripe_ach_mandate_template_web\"}).replace(/\\{merchantName\\}/g,this.clientOptions?.stripe?.mandateData.merchantName??\"Merchant\")}</p><div class=\"button-group\"><primer-button variant=\"primary\" @click=${this._handleConfirmMandate.bind(this)} ?disabled=${this.isSubmitting} ?loading=${this.isSubmitting} >${b(\"stripe_ach_mandate_accept_button\",{id:\"stripe_ach_mandate_accept_button\"})}</primer-button><primer-button variant=\"tertiary\" @click=${this._handleDeclineMandate.bind(this)} ?disabled=${this.isSubmitting} >${b(\"stripe_ach_mandate_cancel_payment_button\",{id:\"stripe_ach_mandate_cancel_payment_button\"})}</primer-button></div>`}render(){return this._paymentMethodManagerTask.render({complete:e=>e?this.screen===\"form\"?this.renderForm(e):this.renderMandate():y})}}"
178
+ "name": "Ne",
179
+ "default": "class extends v{constructor(){super(...arguments);this.formController=new Gr(this,e=>this._paymentMethodManagerTask.value.setAndValidate(e));this.paymentManagers=new Map;this.sdkState=void 0;this.clientOptions=void 0;this.screen=\"form\";this.isSubmitting=!1;this._paymentMethodManagerTask=new O(this,{task:([e])=>e!==\"STRIPE_ACH\"?w:this.paymentManagers.get(e)?.manager,args:()=>[this.paymentMethod?.type]})}_handleInput(e,a){let i=e.target;this.formController.setFieldValue(a,i.value)}_handleBlur(e){this.formController.setFieldTouched(e)}_handleError(e){this.dispatchEvent(new CustomEvent(\"primer-ach-error\",{bubbles:!0,composed:!0,detail:{error:e instanceof Error?e:new Error(typeof e==\"string\"?e:\"Unknown error occurred\")}}))}async _handleSubmitButtonClick(e){if(!this.isSubmitting){this.isSubmitting=!0;try{let a=await e.start(this.formController.formData);if(!a||a.valid)return await this._handleCollectBankAccountDetails(e);a&&this.formController.setValidation(a,!0)}catch(a){this._handleError(a)}finally{this.isSubmitting=!1}}}async _handleCollectBankAccountDetails(e){try{await e.collectBankAccountDetails(),this.screen=\"mandate\",this.dispatchEvent(new CustomEvent(\"primer-ach-bank-details-collected\",{bubbles:!0,composed:!0}))}catch(a){this._handleError(a)}}async _handleConfirmMandate(){if(this._paymentMethodManagerTask.value){this.isSubmitting=!0;try{await this._paymentMethodManagerTask.value.confirmMandate(),this.dispatchEvent(new CustomEvent(\"primer-ach-mandate-confirmed\",{bubbles:!0,composed:!0}))}catch(e){this._handleError(e)}finally{this.isSubmitting=!1}}}async _handleDeclineMandate(){if(this._paymentMethodManagerTask.value){this.isSubmitting=!0;try{await this._paymentMethodManagerTask.value.declineMandate(),this.dispatchEvent(new CustomEvent(\"primer-ach-mandate-declined\",{bubbles:!0,composed:!0}))}catch(e){this._handleError(e)}finally{this.isSubmitting=!1}}}renderForm(e){return p`<h2>${b(\"payWithAch\",{id:\"payWithAch\"})}</h2><p>${b(\"stripe_ach_user_details_collection_subtitle_label\",{id:\"stripe_ach_user_details_collection_subtitle_label\"})}</p><form @submit=${a=>a.preventDefault()}><div class=\"form-row\"><primer-input-wrapper .hasError=${this.formController.hasError.firstName} ><primer-input-label slot=\"label\">${b(\"stripe_ach_user_details_collection_first_name_label\",{id:\"stripe_ach_user_details_collection_first_name_label\"})}</primer-input-label><primer-input slot=\"input\" .value=${this.formController.formState.firstName.value} @input=${a=>this._handleInput(a,\"firstName\")} @blur=${()=>this._handleBlur(\"firstName\")} ?disabled=${this.isSubmitting} ></primer-input><primer-input-error slot=\"error\">${this.formController.hasError.firstName?this.formController.formState.firstName.error:y}</primer-input-error></primer-input-wrapper><primer-input-wrapper .hasError=${this.formController.hasError.lastName} ><primer-input-label slot=\"label\">${b(\"stripe_ach_user_details_collection_last_name_label\",{id:\"stripe_ach_user_details_collection_last_name_label\"})}</primer-input-label><primer-input slot=\"input\" .value=${this.formController.formState.lastName.value} @input=${a=>this._handleInput(a,\"lastName\")} @blur=${()=>this._handleBlur(\"lastName\")} ?disabled=${this.isSubmitting} ></primer-input><primer-input-error slot=\"error\">${this.formController.hasError.lastName?this.formController.formState.lastName.error:y}</primer-input-error></primer-input-wrapper></div><primer-input-wrapper .hasError=${this.formController.hasError.emailAddress} ><primer-input-label slot=\"label\">${b(\"stripe_ach_user_details_collection_email_address_label\",{id:\"stripe_ach_user_details_collection_email_address_label\"})}</primer-input-label><primer-input slot=\"input\" type=\"email\" .value=${this.formController.formState.emailAddress.value} @input=${a=>this._handleInput(a,\"emailAddress\")} @blur=${()=>this._handleBlur(\"emailAddress\")} ?disabled=${this.isSubmitting} ></primer-input><primer-input-error slot=\"error\">${this.formController.hasError.emailAddress?this.formController.formState.emailAddress.error:y}</primer-input-error></primer-input-wrapper><p>${b(\"stripe_ach_user_details_collection_data_usage_label\",{id:\"stripe_ach_user_details_collection_data_usage_label\"})}</p><primer-button buttonType=\"submit\" variant=\"primary\" @click=${()=>this._handleSubmitButtonClick(e)} ?disabled=${this.isSubmitting} ?loading=${this.isSubmitting} >${b(\"stripe_ach_user_details_collection_continue_button\",{id:\"stripe_ach_user_details_collection_continue_button\"})}</primer-button></form>`}renderMandate(){return p`<h2>${b(\"payWithAch\",{id:\"payWithAch\"})}</h2><p>${this.clientOptions?.stripe?.mandateData.fullMandateText??b(\"stripe_ach_mandate_template_web\",{id:\"stripe_ach_mandate_template_web\"}).replace(/\\{merchantName\\}/g,this.clientOptions?.stripe?.mandateData.merchantName??\"Merchant\")}</p><div class=\"button-group\"><primer-button variant=\"primary\" @click=${this._handleConfirmMandate.bind(this)} ?disabled=${this.isSubmitting} ?loading=${this.isSubmitting} >${b(\"stripe_ach_mandate_accept_button\",{id:\"stripe_ach_mandate_accept_button\"})}</primer-button><primer-button variant=\"tertiary\" @click=${this._handleDeclineMandate.bind(this)} ?disabled=${this.isSubmitting} >${b(\"stripe_ach_mandate_cancel_payment_button\",{id:\"stripe_ach_mandate_cancel_payment_button\"})}</primer-button></div>`}render(){return this._paymentMethodManagerTask.render({complete:e=>e?this.screen===\"form\"?this.renderForm(e):this.renderMandate():y})}}"
190
180
  },
191
181
  {
192
182
  "kind": "variable",
@@ -201,17 +191,17 @@
201
191
  {
202
192
  "kind": "variable",
203
193
  "name": "le",
204
- "default": "class extends v{constructor(){super(...arguments);this.configuration=null;this.headlessUtils=null;this.formData={};this.errors={};this.touchedFields=new Set;this.dirtyFields=new Set;this.focusedField=null;this.submitted=!1;this.countryOptions=[];this._initializationTask=new O(this,{task:async([e,a])=>{if(!e||!a)return w;let i=this.extractFieldConfig(e);return await this.initializeCountryOptions(),i},args:()=>[this.configuration,this.headlessUtils]})}connectedCallback(){super.connectedCallback(),this._initializationTask.value}extractFieldConfig(e){if(e?.checkoutModules){let a=e.checkoutModules.find(i=>i.type===\"BILLING_ADDRESS\");if(a?.options){let i=a.options;return Object.keys(sn).reduce((n,o)=>({...n,[o]:i[o]??!1}),{})}}return this.defaultFieldConfig}async initializeCountryOptions(){try{let e=on(\"en\");this.countryOptions=[...e.map(([n,o])=>({value:n,label:o}))],this.requestUpdate(\"countryOptions\");let a=Ui();if(a===\"en\"||a===\"en-GB\"||a.startsWith(\"en-\"))return;if(await Ul(a)){let n=on(a);this.countryOptions=[...n.map(([o,s])=>({value:o,label:s}))],this.requestUpdate(\"countryOptions\")}}catch(e){P.errorWithDatadog(\"Failed to load country locale\",{error:e})}}get fieldConfig(){return this.extractFieldConfig(this.configuration)}get defaultFieldConfig(){return Object.keys(sn).reduce((e,a)=>({...e,[a]:!1}),{})}get shouldShowForm(){return this.fieldConfig.postalCode}handleInput(e,a){this.formData={...this.formData,[e]:a},this.dirtyFields.add(e),(this.submitted||this.dirtyFields.has(e)&&this.touchedFields.has(e))&&this.validateField(e),this.dispatchEvent(new CustomEvent(\"primer-billing-address-change\",{detail:this.formData,bubbles:!0,composed:!0}))}handleFocus(e){this.focusedField=e}handleBlur(e){this.focusedField=null,this.touchedFields.add(e),this.validateField(e)}validateField(e){let a=this.formData[e],i=this.fieldConfig[e];if(!i){delete this.errors[e];return}if(i&&(!a||a.trim()===\"\")){let n=`${e}ErrorRequired`;this.errors={...this.errors,[e]:b(\"This field is required\",{id:n})}}else{let n={...this.errors};delete n[e],this.errors=n}}validateForm(){return Object.keys(sn).forEach(e=>{let a=e;this.fieldConfig[a]&&this.validateField(a)}),Object.keys(this.errors).length===0}async validateForSubmission(){if(!this.shouldShowForm)return!0;this.submitted=!0,Object.keys(this.fieldConfig).forEach(a=>{this.fieldConfig[a]&&this.touchedFields.add(a)});let e=this.validateForm();return this.requestUpdate(),await this.updateComplete,e}async submitToSDK(){if(this.headlessUtils?.setBillingAddress)try{return await this.headlessUtils.setBillingAddress(this.formData),this.dispatchEvent(new CustomEvent(\"primer-billing-address-submit\",{detail:this.formData,bubbles:!0,composed:!0})),!0}catch(e){return P.errorWithDatadog(\"Failed to set billing address\",{error:e}),!1}return!0}shouldShowError(e){let a=!!this.errors[e],i=this.dirtyFields.has(e),n=this.touchedFields.has(e);return a&&(this.submitted||i&&n)}render(){return this._initializationTask.render({pending:()=>y,error:()=>y,complete:()=>this.shouldShowForm?(this.removeAttribute(\"hidden\"),p`<div class=\"billing-address-form\"><div class=\"billing-address-title\">${b(\"Billing address\",{id:\"billingAddressLabel\"})}</div>${R(this.fieldConfig.countryCode,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"countryCode\"} .hasError=${this.shouldShowError(\"countryCode\")} ><primer-input-label slot=\"label\">${b(\"Country code\",{id:\"countryCodeLabel\"})}</primer-input-label><primer-select slot=\"input\" id=\"countryCode\" name=\"countryCode\" .value=${this.formData.countryCode||\"\"} .options=${this.countryOptions} .hasError=${this.shouldShowError(\"countryCode\")} placeholder=${b(\"Select a country\",{id:\"countrySelectPlaceholder\"})} @input=${e=>this.handleInput(\"countryCode\",e.detail)} @focus=${()=>this.handleFocus(\"countryCode\")} @blur=${()=>this.handleBlur(\"countryCode\")} ></primer-select>${R(this.shouldShowError(\"countryCode\"),()=>p`<primer-input-error slot=\"error\">${this.errors.countryCode}</primer-input-error>`)}</primer-input-wrapper>`)} ${R(this.fieldConfig.firstName||this.fieldConfig.lastName,()=>p`<div class=\"billing-address-row\">${R(this.fieldConfig.firstName,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"firstName\"} .hasError=${this.shouldShowError(\"firstName\")} ><primer-input-label slot=\"label\">${b(\"First name\",{id:\"firstNameLabel\"})}</primer-input-label><primer-input slot=\"input\" id=\"firstName\" name=\"firstName\" type=\"text\" .value=${this.formData.firstName||\"\"} placeholder=${b(\"First name\",{id:\"firstNamePlaceholder\"})} @input=${e=>this.handleInput(\"firstName\",e.detail)} @focus=${()=>this.handleFocus(\"firstName\")} @blur=${()=>this.handleBlur(\"firstName\")} ></primer-input>${R(this.shouldShowError(\"firstName\"),()=>p`<primer-input-error slot=\"error\">${this.errors.firstName}</primer-input-error>`)}</primer-input-wrapper>`)} ${R(this.fieldConfig.lastName,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"lastName\"} .hasError=${this.shouldShowError(\"lastName\")} ><primer-input-label slot=\"label\">${b(\"Last name\",{id:\"lastNameLabel\"})}</primer-input-label><primer-input slot=\"input\" id=\"lastName\" name=\"lastName\" type=\"text\" .value=${this.formData.lastName||\"\"} placeholder=${b(\"Last name\",{id:\"lastNamePlaceholder\"})} @input=${e=>this.handleInput(\"lastName\",e.detail)} @focus=${()=>this.handleFocus(\"lastName\")} @blur=${()=>this.handleBlur(\"lastName\")} ></primer-input>${R(this.shouldShowError(\"lastName\"),()=>p`<primer-input-error slot=\"error\">${this.errors.lastName}</primer-input-error>`)}</primer-input-wrapper>`)}</div>`)} ${R(this.fieldConfig.addressLine1,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"addressLine1\"} .hasError=${this.shouldShowError(\"addressLine1\")} ><primer-input-label slot=\"label\">${b(\"Address line 1\",{id:\"addressLine1\"})}</primer-input-label><primer-input slot=\"input\" id=\"addressLine1\" name=\"addressLine1\" type=\"text\" .value=${this.formData.addressLine1||\"\"} placeholder=${b(\"Address line 1\",{id:\"addressLine1Placeholder\"})} @input=${e=>this.handleInput(\"addressLine1\",e.detail)} @focus=${()=>this.handleFocus(\"addressLine1\")} @blur=${()=>this.handleBlur(\"addressLine1\")} ></primer-input>${R(this.shouldShowError(\"addressLine1\"),()=>p`<primer-input-error slot=\"error\">${this.errors.addressLine1}</primer-input-error>`)}</primer-input-wrapper>`)} ${R(this.fieldConfig.addressLine2,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"addressLine2\"} .hasError=${this.shouldShowError(\"addressLine2\")} ><primer-input-label slot=\"label\">${b(\"Address line 2\",{id:\"addressLine2\"})}</primer-input-label><primer-input slot=\"input\" id=\"addressLine2\" name=\"addressLine2\" type=\"text\" .value=${this.formData.addressLine2||\"\"} placeholder=${b(\"Address line 2\",{id:\"addressLine2Placeholder\"})} @input=${e=>this.handleInput(\"addressLine2\",e.detail)} @focus=${()=>this.handleFocus(\"addressLine2\")} @blur=${()=>this.handleBlur(\"addressLine2\")} ></primer-input>${R(this.shouldShowError(\"addressLine2\"),()=>p`<primer-input-error slot=\"error\">${this.errors.addressLine2}</primer-input-error>`)}</primer-input-wrapper>`)} ${R(this.fieldConfig.postalCode||this.fieldConfig.city,()=>p`<div class=\"billing-address-row\">${R(this.fieldConfig.postalCode,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"postalCode\"} .hasError=${this.shouldShowError(\"postalCode\")} ><primer-input-label slot=\"label\">${b(\"Postal code\",{id:\"postalCodeLabel\"})}</primer-input-label><primer-input slot=\"input\" id=\"postalCode\" name=\"postalCode\" type=\"text\" .value=${this.formData.postalCode||\"\"} placeholder=${b(\"90210\",{id:\"postalCodePlaceholder\"})} @input=${e=>this.handleInput(\"postalCode\",e.detail)} @focus=${()=>this.handleFocus(\"postalCode\")} @blur=${()=>this.handleBlur(\"postalCode\")} ></primer-input>${R(this.shouldShowError(\"postalCode\"),()=>p`<primer-input-error slot=\"error\">${this.errors.postalCode}</primer-input-error>`)}</primer-input-wrapper>`)} ${R(this.fieldConfig.city,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"city\"} .hasError=${this.shouldShowError(\"city\")} ><primer-input-label slot=\"label\">${b(\"City\",{id:\"cityLabel\"})}</primer-input-label><primer-input slot=\"input\" id=\"city\" name=\"city\" type=\"text\" .value=${this.formData.city||\"\"} placeholder=${b(\"Cape Town\",{id:\"cityPlaceholder\"})} @input=${e=>this.handleInput(\"city\",e.detail)} @focus=${()=>this.handleFocus(\"city\")} @blur=${()=>this.handleBlur(\"city\")} ></primer-input>${R(this.shouldShowError(\"city\"),()=>p`<primer-input-error slot=\"error\">${this.errors.city}</primer-input-error>`)}</primer-input-wrapper>`)}</div>`)} ${R(this.fieldConfig.state,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"state\"} .hasError=${this.shouldShowError(\"state\")} ><primer-input-label slot=\"label\">${b(\"State / Region / County\",{id:\"stateLabel\"})}</primer-input-label><primer-input slot=\"input\" id=\"state\" name=\"state\" type=\"text\" .value=${this.formData.state||\"\"} placeholder=${b(\"State / Region / County\",{id:\"statePlaceholder\"})} @input=${e=>this.handleInput(\"state\",e.detail)} @focus=${()=>this.handleFocus(\"state\")} @blur=${()=>this.handleBlur(\"state\")} ></primer-input>${R(this.shouldShowError(\"state\"),()=>p`<primer-input-error slot=\"error\">${this.errors.state}</primer-input-error>`)}</primer-input-wrapper>`)}</div>`):(this.setAttribute(\"hidden\",\"\"),y)})}}"
194
+ "default": "class extends v{constructor(){super(...arguments);this.configuration=null;this.headlessUtils=null;this.formData={};this.errors={};this.touchedFields=new Set;this.dirtyFields=new Set;this.focusedField=null;this.submitted=!1;this.countryOptions=[];this._initializationTask=new O(this,{task:async([e,a])=>{if(!e||!a)return w;let i=this.extractFieldConfig(e);return await this.initializeCountryOptions(),i},args:()=>[this.configuration,this.headlessUtils]})}connectedCallback(){super.connectedCallback(),this._initializationTask.value}extractFieldConfig(e){if(e?.checkoutModules){let a=e.checkoutModules.find(i=>i.type===\"BILLING_ADDRESS\");if(a?.options){let i=a.options;return Object.keys(nn).reduce((n,o)=>({...n,[o]:i[o]??!1}),{})}}return this.defaultFieldConfig}async initializeCountryOptions(){try{let e=rn(\"en\");this.countryOptions=[...e.map(([n,o])=>({value:n,label:o}))],this.requestUpdate(\"countryOptions\");let a=Ki();if(a===\"en\"||a===\"en-GB\"||a.startsWith(\"en-\"))return;if(await Kl(a)){let n=rn(a);this.countryOptions=[...n.map(([o,s])=>({value:o,label:s}))],this.requestUpdate(\"countryOptions\")}}catch(e){P.errorWithDatadog(\"Failed to load country locale\",{error:e})}}get fieldConfig(){return this.extractFieldConfig(this.configuration)}get defaultFieldConfig(){return Object.keys(nn).reduce((e,a)=>({...e,[a]:!1}),{})}get shouldShowForm(){return this.fieldConfig.postalCode}handleInput(e,a){this.formData={...this.formData,[e]:a},this.dirtyFields.add(e),(this.submitted||this.dirtyFields.has(e)&&this.touchedFields.has(e))&&this.validateField(e),this.dispatchEvent(new CustomEvent(\"primer-billing-address-change\",{detail:this.formData,bubbles:!0,composed:!0}))}handleFocus(e){this.focusedField=e}handleBlur(e){this.focusedField=null,this.touchedFields.add(e),this.validateField(e)}validateField(e){let a=this.formData[e],i=this.fieldConfig[e];if(!i){delete this.errors[e];return}if(i&&(!a||a.trim()===\"\")){let n=`${e}ErrorRequired`;this.errors={...this.errors,[e]:b(\"This field is required\",{id:n})}}else{let n={...this.errors};delete n[e],this.errors=n}}validateForm(){return Object.keys(nn).forEach(e=>{let a=e;this.fieldConfig[a]&&this.validateField(a)}),Object.keys(this.errors).length===0}async validateForSubmission(){if(!this.shouldShowForm)return!0;this.submitted=!0,Object.keys(this.fieldConfig).forEach(a=>{this.fieldConfig[a]&&this.touchedFields.add(a)});let e=this.validateForm();return this.requestUpdate(),await this.updateComplete,e}async submitToSDK(){if(this.headlessUtils?.setBillingAddress)try{return await this.headlessUtils.setBillingAddress(this.formData),this.dispatchEvent(new CustomEvent(\"primer-billing-address-submit\",{detail:this.formData,bubbles:!0,composed:!0})),!0}catch(e){return P.errorWithDatadog(\"Failed to set billing address\",{error:e}),!1}return!0}shouldShowError(e){let a=!!this.errors[e],i=this.dirtyFields.has(e),n=this.touchedFields.has(e);return a&&(this.submitted||i&&n)}render(){return this._initializationTask.render({pending:()=>y,error:()=>y,complete:()=>this.shouldShowForm?(this.removeAttribute(\"hidden\"),p`<div class=\"billing-address-form\"><div class=\"billing-address-title\">${b(\"Billing address\",{id:\"billingAddressLabel\"})}</div>${R(this.fieldConfig.countryCode,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"countryCode\"} .hasError=${this.shouldShowError(\"countryCode\")} ><primer-input-label slot=\"label\">${b(\"Country code\",{id:\"countryCodeLabel\"})}</primer-input-label><primer-select slot=\"input\" id=\"countryCode\" name=\"countryCode\" .value=${this.formData.countryCode||\"\"} .options=${this.countryOptions} .hasError=${this.shouldShowError(\"countryCode\")} placeholder=${b(\"Select a country\",{id:\"countrySelectPlaceholder\"})} @input=${e=>this.handleInput(\"countryCode\",e.detail)} @focus=${()=>this.handleFocus(\"countryCode\")} @blur=${()=>this.handleBlur(\"countryCode\")} ></primer-select>${R(this.shouldShowError(\"countryCode\"),()=>p`<primer-input-error slot=\"error\">${this.errors.countryCode}</primer-input-error>`)}</primer-input-wrapper>`)} ${R(this.fieldConfig.firstName||this.fieldConfig.lastName,()=>p`<div class=\"billing-address-row\">${R(this.fieldConfig.firstName,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"firstName\"} .hasError=${this.shouldShowError(\"firstName\")} ><primer-input-label slot=\"label\">${b(\"First name\",{id:\"firstNameLabel\"})}</primer-input-label><primer-input slot=\"input\" id=\"firstName\" name=\"firstName\" type=\"text\" .value=${this.formData.firstName||\"\"} placeholder=${b(\"First name\",{id:\"firstNamePlaceholder\"})} @input=${e=>this.handleInput(\"firstName\",e.detail)} @focus=${()=>this.handleFocus(\"firstName\")} @blur=${()=>this.handleBlur(\"firstName\")} ></primer-input>${R(this.shouldShowError(\"firstName\"),()=>p`<primer-input-error slot=\"error\">${this.errors.firstName}</primer-input-error>`)}</primer-input-wrapper>`)} ${R(this.fieldConfig.lastName,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"lastName\"} .hasError=${this.shouldShowError(\"lastName\")} ><primer-input-label slot=\"label\">${b(\"Last name\",{id:\"lastNameLabel\"})}</primer-input-label><primer-input slot=\"input\" id=\"lastName\" name=\"lastName\" type=\"text\" .value=${this.formData.lastName||\"\"} placeholder=${b(\"Last name\",{id:\"lastNamePlaceholder\"})} @input=${e=>this.handleInput(\"lastName\",e.detail)} @focus=${()=>this.handleFocus(\"lastName\")} @blur=${()=>this.handleBlur(\"lastName\")} ></primer-input>${R(this.shouldShowError(\"lastName\"),()=>p`<primer-input-error slot=\"error\">${this.errors.lastName}</primer-input-error>`)}</primer-input-wrapper>`)}</div>`)} ${R(this.fieldConfig.addressLine1,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"addressLine1\"} .hasError=${this.shouldShowError(\"addressLine1\")} ><primer-input-label slot=\"label\">${b(\"Address line 1\",{id:\"addressLine1\"})}</primer-input-label><primer-input slot=\"input\" id=\"addressLine1\" name=\"addressLine1\" type=\"text\" .value=${this.formData.addressLine1||\"\"} placeholder=${b(\"Address line 1\",{id:\"addressLine1Placeholder\"})} @input=${e=>this.handleInput(\"addressLine1\",e.detail)} @focus=${()=>this.handleFocus(\"addressLine1\")} @blur=${()=>this.handleBlur(\"addressLine1\")} ></primer-input>${R(this.shouldShowError(\"addressLine1\"),()=>p`<primer-input-error slot=\"error\">${this.errors.addressLine1}</primer-input-error>`)}</primer-input-wrapper>`)} ${R(this.fieldConfig.addressLine2,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"addressLine2\"} .hasError=${this.shouldShowError(\"addressLine2\")} ><primer-input-label slot=\"label\">${b(\"Address line 2\",{id:\"addressLine2\"})}</primer-input-label><primer-input slot=\"input\" id=\"addressLine2\" name=\"addressLine2\" type=\"text\" .value=${this.formData.addressLine2||\"\"} placeholder=${b(\"Address line 2\",{id:\"addressLine2Placeholder\"})} @input=${e=>this.handleInput(\"addressLine2\",e.detail)} @focus=${()=>this.handleFocus(\"addressLine2\")} @blur=${()=>this.handleBlur(\"addressLine2\")} ></primer-input>${R(this.shouldShowError(\"addressLine2\"),()=>p`<primer-input-error slot=\"error\">${this.errors.addressLine2}</primer-input-error>`)}</primer-input-wrapper>`)} ${R(this.fieldConfig.postalCode||this.fieldConfig.city,()=>p`<div class=\"billing-address-row\">${R(this.fieldConfig.postalCode,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"postalCode\"} .hasError=${this.shouldShowError(\"postalCode\")} ><primer-input-label slot=\"label\">${b(\"Postal code\",{id:\"postalCodeLabel\"})}</primer-input-label><primer-input slot=\"input\" id=\"postalCode\" name=\"postalCode\" type=\"text\" .value=${this.formData.postalCode||\"\"} placeholder=${b(\"90210\",{id:\"postalCodePlaceholder\"})} @input=${e=>this.handleInput(\"postalCode\",e.detail)} @focus=${()=>this.handleFocus(\"postalCode\")} @blur=${()=>this.handleBlur(\"postalCode\")} ></primer-input>${R(this.shouldShowError(\"postalCode\"),()=>p`<primer-input-error slot=\"error\">${this.errors.postalCode}</primer-input-error>`)}</primer-input-wrapper>`)} ${R(this.fieldConfig.city,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"city\"} .hasError=${this.shouldShowError(\"city\")} ><primer-input-label slot=\"label\">${b(\"City\",{id:\"cityLabel\"})}</primer-input-label><primer-input slot=\"input\" id=\"city\" name=\"city\" type=\"text\" .value=${this.formData.city||\"\"} placeholder=${b(\"Cape Town\",{id:\"cityPlaceholder\"})} @input=${e=>this.handleInput(\"city\",e.detail)} @focus=${()=>this.handleFocus(\"city\")} @blur=${()=>this.handleBlur(\"city\")} ></primer-input>${R(this.shouldShowError(\"city\"),()=>p`<primer-input-error slot=\"error\">${this.errors.city}</primer-input-error>`)}</primer-input-wrapper>`)}</div>`)} ${R(this.fieldConfig.state,()=>p`<primer-input-wrapper .focusWithin=${this.focusedField===\"state\"} .hasError=${this.shouldShowError(\"state\")} ><primer-input-label slot=\"label\">${b(\"State / Region / County\",{id:\"stateLabel\"})}</primer-input-label><primer-input slot=\"input\" id=\"state\" name=\"state\" type=\"text\" .value=${this.formData.state||\"\"} placeholder=${b(\"State / Region / County\",{id:\"statePlaceholder\"})} @input=${e=>this.handleInput(\"state\",e.detail)} @focus=${()=>this.handleFocus(\"state\")} @blur=${()=>this.handleBlur(\"state\")} ></primer-input>${R(this.shouldShowError(\"state\"),()=>p`<primer-input-error slot=\"error\">${this.errors.state}</primer-input-error>`)}</primer-input-wrapper>`)}</div>`):(this.setAttribute(\"hidden\",\"\"),y)})}}"
205
195
  },
206
196
  {
207
197
  "kind": "variable",
208
198
  "name": "X",
209
- "default": "class extends v{constructor(){super();this.vaultManagerContext=null;this.vaultItemContext=null;this.headlessUtils=null;this.contextEventsController=null;this.hasSlottedSubmit=!1;this.isEditMode=!1;this.deletePaymentMethodId=null;this.isDeleting=!1;this.errorMessage=\"\";this.animationDuration=300;this._isHandlingContextEvent=!1;this._contextVaultSubmitListener=null;this.deleteAssetConfig=null;this.handleSubmitSlotChange=e=>{let i=e.target.assignedNodes({flatten:!0});this.hasSlottedSubmit=i.length>0};this.handleToggleEditMode=e=>{this.isEditMode=e.detail,this.deletePaymentMethodId=null,this.isEditMode&&this.vaultItemContext&&this.vaultItemContext.setSelectedVaultedPaymentMethod(null)};this.handleDeletePaymentMethod=async e=>{if(this.deletePaymentMethodId=e.detail,this.deletePaymentMethodId&&this.vaultManagerContext&&this.headlessUtils){let a=this.vaultManagerContext.vaultedPaymentMethods.find(i=>i.id===this.deletePaymentMethodId);a&&(this.deleteAssetConfig=await Vr(a,this.headlessUtils,this.vaultManagerContext))}};this.handleCancelDelete=()=>{this.deletePaymentMethodId=null,this.deleteAssetConfig=null};this.handleConfirmDelete=async()=>{if(!this.vaultManagerContext?.deleteVaultedPaymentMethod||!this.deletePaymentMethodId){this.errorMessage=b(\"something_went_wrong_error\",{id:\"something_went_wrong_error\"});return}try{this.isDeleting=!0,await this.vaultManagerContext.deleteVaultedPaymentMethod(this.deletePaymentMethodId),this.deletePaymentMethodId=null,this.deleteAssetConfig=null}catch(e){this.errorMessage=e instanceof Error?e.message:b(\"something_went_wrong_error\",{id:\"something_went_wrong_error\"})}finally{this.isDeleting=!1}};this.handlePaymentError=e=>{let a=e.detail?.error;this.errorMessage=a instanceof Error?a.message:b(\"payment_processing_error\",{id:\"payment_processing_error\"})};this.handleCloseError=()=>{this.errorMessage=\"\"};this.handleSlotButtonClick=e=>{let i=e.target.closest(\"button, primer-button\");if(!i)return;let n=i;this.isSubmitButton(n)&&(e.preventDefault(),this.submitVaultPayment())};this.handleDirectSubmit=()=>{this.submitVaultPayment()};this.handleContextVaultSubmit=e=>{if(!this._isHandlingContextEvent){this._isHandlingContextEvent=!0;try{e.target!==this&&(e.stopPropagation(),this.submitVaultPayment())}finally{this._isHandlingContextEvent=!1}}};new aa(this,{defaultOptions:{keyframeOptions:{duration:Number(getComputedStyle(document.documentElement).getPropertyValue(\"--primer-animation-duration\").trim().replace(\"ms\",\"\")),easing:getComputedStyle(document.documentElement).getPropertyValue(\"--primer-animation-easing\").trim()}}})}getAnimationConfig(){return{keyframeOptions:{duration:this.animationDuration,easing:getComputedStyle(document.documentElement).getPropertyValue(\"--primer-animation-easing\").trim(),fill:\"both\"}}}isSubmitButton(e){let a=e.tagName.toLowerCase(),i=a===\"button\",n=a===\"primer-button\";return i&&(e.getAttribute(\"type\")===\"submit\"||e.hasAttribute(\"data-submit\"))||n&&(e.getAttribute(\"type\")===\"submit\"||e.hasAttribute(\"data-submit\"))}async submitVaultPayment(){if(this.vaultManagerContext)try{await this.vaultManagerContext.startVaultedPaymentFlow()}catch(e){this.dispatchEvent(new CustomEvent(\"primer-vault-payment-error\",{detail:{error:e},bubbles:!0,composed:!0}))}}getPaymentMethodName(e){if(!this.vaultManagerContext)return\"\";let a=this.vaultManagerContext.vaultedPaymentMethods.find(i=>i.id===e);if(!a)return\"\";try{return dn(a).description||\"\"}catch{return\"\"}}setupContextEventListeners(){this.contextEventsController?.host&&this._contextVaultSubmitListener&&this.contextEventsController.host.addEventListener(\"primer:vault-submit\",this._contextVaultSubmitListener)}cleanupContextEventListeners(){this.contextEventsController?.host&&this._contextVaultSubmitListener&&this.contextEventsController.host.removeEventListener(\"primer:vault-submit\",this._contextVaultSubmitListener)}connectedCallback(){super.connectedCallback(),this.addEventListener(\"click\",this.handleSlotButtonClick),this.addEventListener(\"primer:vault-submit\",this.handleDirectSubmit),this._contextVaultSubmitListener=e=>{this.handleContextVaultSubmit(e)},this.setupContextEventListeners()}disconnectedCallback(){this.removeEventListener(\"click\",this.handleSlotButtonClick),this.removeEventListener(\"primer:vault-submit\",this.handleDirectSubmit),this.cleanupContextEventListeners(),super.disconnectedCallback()}renderLoadingOverlay(){return p`<div class=\"loading-overlay\" ${Tt({...this.getAnimationConfig(),properties:[\"opacity\"],in:[{opacity:0},{opacity:1}],out:[{opacity:1},{opacity:0}]})} ><primer-spinner size=\"medium\" color=\"var(--primer-color-loader)\" ></primer-spinner></div>`}renderDeleteConfirmation(){if(!this.deletePaymentMethodId||!this.deleteAssetConfig)return y;let e=this.getPaymentMethodName(this.deletePaymentMethodId);return p`<div class=\"delete-confirmation-container\"><primer-button disabled variant=\"secondary\"><primer-payment-method-content .assetConfig=${this.deleteAssetConfig} ></primer-payment-method-content></primer-button><primer-vault-delete-confirmation .isDeleting=${this.isDeleting} .paymentMethodId=${this.deletePaymentMethodId} .paymentMethodName=${e} @confirm-delete=${this.handleConfirmDelete} @cancel-delete=${this.handleCancelDelete} ${Tt({...this.getAnimationConfig(),properties:[\"opacity\"],in:[{opacity:0},{opacity:1}],out:[{opacity:1},{opacity:0}]})} ></primer-vault-delete-confirmation></div>`}renderPaymentMethodItem(e){return this.deletePaymentMethodId===e.id?y:p`<primer-vault-payment-method-item .paymentMethod=${e} .isEditMode=${this.isEditMode} @delete-payment-method=${this.handleDeletePaymentMethod} ${Tt({...this.getAnimationConfig(),properties:[\"opacity\"],in:[{opacity:0},{opacity:1}],out:[{opacity:1},{opacity:0}]})} ></primer-vault-payment-method-item>`}renderPaymentMethodList(){let e=this.vaultManagerContext?.vaultedPaymentMethods||[],a=!this.isEditMode&&e.length>0&&!this.deletePaymentMethodId;return p`<div class=\"payment-methods-list\">${e.map(i=>this.renderPaymentMethodItem(i))} ${R(a,()=>p`<div class=\"submit-button-container\"><slot name=\"submit-button\" @slotchange=${this.handleSubmitSlotChange} ${Tt({...this.getAnimationConfig(),properties:[\"opacity\"],in:[{opacity:0},{opacity:1}],out:[{opacity:1},{opacity:0}]})} ></slot>${R(!this.hasSlottedSubmit,()=>p`<primer-vault-payment-submit class=\"submit-button\" @primer-vault-payment-error=${this.handlePaymentError} ></primer-vault-payment-submit>`)}</div>`,()=>y)}</div>`}render(){if(!this.vaultManagerContext?.enabled||this.vaultManagerContext?.headless)return y;let e=this.vaultManagerContext.vaultedPaymentMethods.length>0,a=this.vaultManagerContext.isLoading,i=this.vaultManagerContext.isUpdating;return p` ${R(!this.vaultManagerContext?.showEmptyState&&!e,()=>y,()=>p`<slot name=\"vault-empty-state\"><div class=\"vault-manager ${i?\"is-updating\":\"\"}\"><primer-vault-manager-header .isEditMode=${this.isEditMode} .hasPaymentMethods=${e} @toggle-edit-mode=${this.handleToggleEditMode} ></primer-vault-manager-header>${R(this.errorMessage,()=>p`<primer-vault-error-message .errorMessage=${this.errorMessage} @close-error=${this.handleCloseError} ${Tt({...this.getAnimationConfig(),properties:[\"opacity\"],in:[{opacity:0},{opacity:1}],out:[{opacity:1},{opacity:0}]})} ></primer-vault-error-message>`,()=>y)}<div class=\"vault-manager-content\">${R(!a&&!e,()=>p`<div class=\"content-container\"><primer-vault-empty-state ${Tt({...this.getAnimationConfig(),properties:[\"opacity\"],in:[{opacity:0},{opacity:1}],out:[{opacity:1},{opacity:0}]})} ></primer-vault-empty-state></div>`,()=>y)} ${R(!a&&e,()=>p`<div class=\"content-container\">${R(this.deletePaymentMethodId,()=>this.renderDeleteConfirmation(),()=>this.renderPaymentMethodList())}</div>`,()=>y)}</div>${R(i,()=>this.renderLoadingOverlay(),()=>y)}</div></slot>`)} `}}"
199
+ "default": "class extends v{constructor(){super();this.vaultManagerContext=null;this.vaultItemContext=null;this.headlessUtils=null;this.contextEventsController=null;this.hasSlottedSubmit=!1;this.isEditMode=!1;this.deletePaymentMethodId=null;this.isDeleting=!1;this.errorMessage=\"\";this.animationDuration=300;this._isHandlingContextEvent=!1;this._contextVaultSubmitListener=null;this.deleteAssetConfig=null;this.handleSubmitSlotChange=e=>{let i=e.target.assignedNodes({flatten:!0});this.hasSlottedSubmit=i.length>0};this.handleToggleEditMode=e=>{this.isEditMode=e.detail,this.deletePaymentMethodId=null,this.isEditMode&&this.vaultItemContext&&this.vaultItemContext.setSelectedVaultedPaymentMethod(null)};this.handleDeletePaymentMethod=async e=>{if(this.deletePaymentMethodId=e.detail,this.deletePaymentMethodId&&this.vaultManagerContext&&this.headlessUtils){let a=this.vaultManagerContext.vaultedPaymentMethods.find(i=>i.id===this.deletePaymentMethodId);a&&(this.deleteAssetConfig=await Fr(a,this.headlessUtils,this.vaultManagerContext))}};this.handleCancelDelete=()=>{this.deletePaymentMethodId=null,this.deleteAssetConfig=null};this.handleConfirmDelete=async()=>{if(!this.vaultManagerContext?.deleteVaultedPaymentMethod||!this.deletePaymentMethodId){this.errorMessage=b(\"something_went_wrong_error\",{id:\"something_went_wrong_error\"});return}try{this.isDeleting=!0,await this.vaultManagerContext.deleteVaultedPaymentMethod(this.deletePaymentMethodId),this.deletePaymentMethodId=null,this.deleteAssetConfig=null}catch(e){this.errorMessage=e instanceof Error?e.message:b(\"something_went_wrong_error\",{id:\"something_went_wrong_error\"})}finally{this.isDeleting=!1}};this.handlePaymentError=e=>{let a=e.detail?.error;this.errorMessage=a instanceof Error?a.message:b(\"payment_processing_error\",{id:\"payment_processing_error\"})};this.handleCloseError=()=>{this.errorMessage=\"\"};this.handleSlotButtonClick=e=>{let i=e.target.closest(\"button, primer-button\");if(!i)return;let n=i;this.isSubmitButton(n)&&(e.preventDefault(),this.submitVaultPayment())};this.handleDirectSubmit=()=>{this.submitVaultPayment()};this.handleContextVaultSubmit=e=>{if(!this._isHandlingContextEvent){this._isHandlingContextEvent=!0;try{e.target!==this&&(e.stopPropagation(),this.submitVaultPayment())}finally{this._isHandlingContextEvent=!1}}};new ra(this,{defaultOptions:{keyframeOptions:{duration:Number(getComputedStyle(document.documentElement).getPropertyValue(\"--primer-animation-duration\").trim().replace(\"ms\",\"\")),easing:getComputedStyle(document.documentElement).getPropertyValue(\"--primer-animation-easing\").trim()}}})}getAnimationConfig(){return{keyframeOptions:{duration:this.animationDuration,easing:getComputedStyle(document.documentElement).getPropertyValue(\"--primer-animation-easing\").trim(),fill:\"both\"}}}isSubmitButton(e){let a=e.tagName.toLowerCase(),i=a===\"button\",n=a===\"primer-button\";return i&&(e.getAttribute(\"type\")===\"submit\"||e.hasAttribute(\"data-submit\"))||n&&(e.getAttribute(\"type\")===\"submit\"||e.hasAttribute(\"data-submit\"))}async submitVaultPayment(){if(this.vaultManagerContext)try{await this.vaultManagerContext.startVaultedPaymentFlow()}catch(e){this.dispatchEvent(new CustomEvent(\"primer-vault-payment-error\",{detail:{error:e},bubbles:!0,composed:!0}))}}getPaymentMethodName(e){if(!this.vaultManagerContext)return\"\";let a=this.vaultManagerContext.vaultedPaymentMethods.find(i=>i.id===e);if(!a)return\"\";try{return sn(a).description||\"\"}catch{return\"\"}}setupContextEventListeners(){this.contextEventsController?.host&&this._contextVaultSubmitListener&&this.contextEventsController.host.addEventListener(\"primer:vault-submit\",this._contextVaultSubmitListener)}cleanupContextEventListeners(){this.contextEventsController?.host&&this._contextVaultSubmitListener&&this.contextEventsController.host.removeEventListener(\"primer:vault-submit\",this._contextVaultSubmitListener)}connectedCallback(){super.connectedCallback(),this.addEventListener(\"click\",this.handleSlotButtonClick),this.addEventListener(\"primer:vault-submit\",this.handleDirectSubmit),this._contextVaultSubmitListener=e=>{this.handleContextVaultSubmit(e)},this.setupContextEventListeners()}disconnectedCallback(){this.removeEventListener(\"click\",this.handleSlotButtonClick),this.removeEventListener(\"primer:vault-submit\",this.handleDirectSubmit),this.cleanupContextEventListeners(),super.disconnectedCallback()}renderLoadingOverlay(){return p`<div class=\"loading-overlay\" ${Tt({...this.getAnimationConfig(),properties:[\"opacity\"],in:[{opacity:0},{opacity:1}],out:[{opacity:1},{opacity:0}]})} ><primer-spinner size=\"medium\" color=\"var(--primer-color-loader)\" ></primer-spinner></div>`}renderDeleteConfirmation(){if(!this.deletePaymentMethodId||!this.deleteAssetConfig)return y;let e=this.getPaymentMethodName(this.deletePaymentMethodId);return p`<div class=\"delete-confirmation-container\"><primer-button disabled variant=\"secondary\"><primer-payment-method-content .assetConfig=${this.deleteAssetConfig} ></primer-payment-method-content></primer-button><primer-vault-delete-confirmation .isDeleting=${this.isDeleting} .paymentMethodId=${this.deletePaymentMethodId} .paymentMethodName=${e} @confirm-delete=${this.handleConfirmDelete} @cancel-delete=${this.handleCancelDelete} ${Tt({...this.getAnimationConfig(),properties:[\"opacity\"],in:[{opacity:0},{opacity:1}],out:[{opacity:1},{opacity:0}]})} ></primer-vault-delete-confirmation></div>`}renderPaymentMethodItem(e){return this.deletePaymentMethodId===e.id?y:p`<primer-vault-payment-method-item .paymentMethod=${e} .isEditMode=${this.isEditMode} @delete-payment-method=${this.handleDeletePaymentMethod} ${Tt({...this.getAnimationConfig(),properties:[\"opacity\"],in:[{opacity:0},{opacity:1}],out:[{opacity:1},{opacity:0}]})} ></primer-vault-payment-method-item>`}renderPaymentMethodList(){let e=this.vaultManagerContext?.vaultedPaymentMethods||[],a=!this.isEditMode&&e.length>0&&!this.deletePaymentMethodId;return p`<div class=\"payment-methods-list\">${e.map(i=>this.renderPaymentMethodItem(i))} ${R(a,()=>p`<div class=\"submit-button-container\"><slot name=\"submit-button\" @slotchange=${this.handleSubmitSlotChange} ${Tt({...this.getAnimationConfig(),properties:[\"opacity\"],in:[{opacity:0},{opacity:1}],out:[{opacity:1},{opacity:0}]})} ></slot>${R(!this.hasSlottedSubmit,()=>p`<primer-vault-payment-submit class=\"submit-button\" @primer-vault-payment-error=${this.handlePaymentError} ></primer-vault-payment-submit>`)}</div>`,()=>y)}</div>`}render(){if(!this.vaultManagerContext?.enabled||this.vaultManagerContext?.headless)return y;let e=this.vaultManagerContext.vaultedPaymentMethods.length>0,a=this.vaultManagerContext.isLoading,i=this.vaultManagerContext.isUpdating;return p` ${R(!this.vaultManagerContext?.showEmptyState&&!e,()=>y,()=>p`<slot name=\"vault-empty-state\"><div class=\"vault-manager ${i?\"is-updating\":\"\"}\"><primer-vault-manager-header .isEditMode=${this.isEditMode} .hasPaymentMethods=${e} @toggle-edit-mode=${this.handleToggleEditMode} ></primer-vault-manager-header>${R(this.errorMessage,()=>p`<primer-vault-error-message .errorMessage=${this.errorMessage} @close-error=${this.handleCloseError} ${Tt({...this.getAnimationConfig(),properties:[\"opacity\"],in:[{opacity:0},{opacity:1}],out:[{opacity:1},{opacity:0}]})} ></primer-vault-error-message>`,()=>y)}<div class=\"vault-manager-content\">${R(!a&&!e,()=>p`<div class=\"content-container\"><primer-vault-empty-state ${Tt({...this.getAnimationConfig(),properties:[\"opacity\"],in:[{opacity:0},{opacity:1}],out:[{opacity:1},{opacity:0}]})} ></primer-vault-empty-state></div>`,()=>y)} ${R(!a&&e,()=>p`<div class=\"content-container\">${R(this.deletePaymentMethodId,()=>this.renderDeleteConfirmation(),()=>this.renderPaymentMethodList())}</div>`,()=>y)}</div>${R(i,()=>this.renderLoadingOverlay(),()=>y)}</div></slot>`)} `}}"
210
200
  },
211
201
  {
212
202
  "kind": "variable",
213
203
  "name": "Ee",
214
- "default": "class extends v{constructor(){super(...arguments);this.vaultManagerContext=null;this.vaultItemContext=null;this.headlessUtils=null;this.paymentMethod=null;this.isEditMode=!1;this._getAssetsTask=new O(this,{task:async([e,a,i])=>await Vr(e,a,i),args:()=>[this.paymentMethod,this.headlessUtils,this.vaultManagerContext]});this.handleClick=()=>{this.isEditMode||!this.vaultManagerContext||!this.paymentMethod||(this.isSelected()?this.vaultItemContext?.setSelectedVaultedPaymentMethod(null):this.vaultItemContext?.setSelectedVaultedPaymentMethod(this.paymentMethod))};this.handleDeleteClick=e=>{e.stopPropagation(),this.dispatchEvent(new CustomEvent(\"delete-payment-method\",{detail:this.paymentMethod?.id,bubbles:!0,composed:!0}))}}isSelected(){if(!this.vaultManagerContext||!this.paymentMethod)return!1;let e=this.vaultItemContext?.selectedVaultedPaymentMethod;return!!e&&e.id===this.paymentMethod.id}render(){return this._getAssetsTask.render({error:()=>y,complete:e=>{let a=this.isSelected()?\"checked\":\"default\",i=!1,n=e?.description;return p`<div class=\"payment-method-wrapper\"><div class=\"payment-method-container\"><primer-button variant=\"secondary\" class=\"payment-method-button ${e.shouldShowCVV?\"with-cvv\":\"\"}\" selectable ?disabled=${this.isEditMode} selectionState=${a} .flex=${i} @click=${this.handleClick} ><primer-payment-method-content .assetConfig=${e} ></primer-payment-method-content>${R(e.shouldShowCVV&&this.isSelected()&&!this.isEditMode,()=>p`<div class=\"payment-method-row mt-2\"><span class=\"flex-center\"><primer-icon name=\"lock\" size=\"sm\"></primer-icon><span class=\"payment-method-subtitle\"> Input the card CVV for a secure payment</span ></span><span class=\"cell-2\"><primer-vault-cvv-input .paymentMethod=\"${this.paymentMethod}\" ><span slot=\"label\"></span></primer-vault-cvv-input></span></div>`,()=>y)}</primer-button>${this.isEditMode?p`<primer-button variant=\"tertiary\" class=\"delete-button\" @click=${this.handleDeleteClick} aria-label=${`${b(\"delete\",{id:\"delete\"})} ${n}`} ><primer-icon name=\"close\" size=\"sm\"></primer-icon></primer-button>`:y}</div></div>`}})}}"
204
+ "default": "class extends v{constructor(){super(...arguments);this.vaultManagerContext=null;this.vaultItemContext=null;this.headlessUtils=null;this.paymentMethod=null;this.isEditMode=!1;this._getAssetsTask=new O(this,{task:async([e,a,i])=>await Fr(e,a,i),args:()=>[this.paymentMethod,this.headlessUtils,this.vaultManagerContext]});this.handleClick=()=>{this.isEditMode||!this.vaultManagerContext||!this.paymentMethod||(this.isSelected()?this.vaultItemContext?.setSelectedVaultedPaymentMethod(null):this.vaultItemContext?.setSelectedVaultedPaymentMethod(this.paymentMethod))};this.handleDeleteClick=e=>{e.stopPropagation(),this.dispatchEvent(new CustomEvent(\"delete-payment-method\",{detail:this.paymentMethod?.id,bubbles:!0,composed:!0}))}}isSelected(){if(!this.vaultManagerContext||!this.paymentMethod)return!1;let e=this.vaultItemContext?.selectedVaultedPaymentMethod;return!!e&&e.id===this.paymentMethod.id}render(){return this._getAssetsTask.render({error:()=>y,complete:e=>{let a=this.isSelected()?\"checked\":\"default\",i=!1,n=e?.description;return p`<div class=\"payment-method-wrapper\"><div class=\"payment-method-container\"><primer-button variant=\"secondary\" class=\"payment-method-button ${e.shouldShowCVV?\"with-cvv\":\"\"}\" selectable ?disabled=${this.isEditMode} selectionState=${a} .flex=${i} @click=${this.handleClick} ><primer-payment-method-content .assetConfig=${e} ></primer-payment-method-content>${R(e.shouldShowCVV&&this.isSelected()&&!this.isEditMode,()=>p`<div class=\"payment-method-row mt-2\"><span class=\"flex-center\"><primer-icon name=\"lock\" size=\"sm\"></primer-icon><span class=\"payment-method-subtitle\"> Input the card CVV for a secure payment</span ></span><span class=\"cell-2\"><primer-vault-cvv-input .paymentMethod=\"${this.paymentMethod}\" ><span slot=\"label\"></span></primer-vault-cvv-input></span></div>`,()=>y)}</primer-button>${this.isEditMode?p`<primer-button variant=\"tertiary\" class=\"delete-button\" @click=${this.handleDeleteClick} aria-label=${`${b(\"delete\",{id:\"delete\"})} ${n}`} ><primer-icon name=\"close\" size=\"sm\"></primer-icon></primer-button>`:y}</div></div>`}})}}"
215
205
  },
216
206
  {
217
207
  "kind": "variable",
@@ -220,7 +210,7 @@
220
210
  },
221
211
  {
222
212
  "kind": "variable",
223
- "name": "Ne",
213
+ "name": "Ie",
224
214
  "default": "class extends v{constructor(){super(...arguments);this.isDeleting=!1;this.paymentMethodId=\"\";this.paymentMethodName=\"\";this.vaultManager=null;this.handleConfirmClick=()=>{this.dispatchEvent(new CustomEvent(\"confirm-delete\",{bubbles:!0,composed:!0}))};this.handleCancelClick=()=>{this.dispatchEvent(new CustomEvent(\"cancel-delete\",{bubbles:!0,composed:!0}))}}render(){return p`<div class=\"delete-confirmation\"><p class=\"delete-confirmation-text\"> Are you sure you want to delete this payment method? </p><div class=\"delete-actions\"><primer-button variant=\"secondary\" @click=${this.handleCancelClick} ?disabled=${this.isDeleting} >${b(\"cancel\",{id:\"cancel\"})}</primer-button><primer-button @click=${this.handleConfirmClick} ?disabled=${this.isDeleting} >${this.isDeleting?b(\"deleting\",{id:\"deleting\"}):b(\"confirmVaultedPaymentMethodDeletion\",{id:\"confirmVaultedPaymentMethodDeletion\"})}</primer-button></div></div>`}}"
225
215
  },
226
216
  {
@@ -241,7 +231,7 @@
241
231
  {
242
232
  "kind": "variable",
243
233
  "name": "ee",
244
- "default": "class extends v{constructor(){super();this.vaultManagerFormContext=null;this.vaultManagerCvvContext=null;this.computedStyles=null;this.paymentMethod=null;this.cvvError=null;this.cvvInputIsDirty=!1;this.cvvInputIsBlurred=!1;this.cvvInput=null;this.isFocused=!1;this._setupCVVIframe=new O(this,{task:([e,a])=>!e||!a||e.paymentMethodType!==\"PAYMENT_CARD\"||!e.paymentInstrumentData?.network||a.createCvvInput===null?w:{network:e.paymentInstrumentData.network,createCvvInput:a.createCvvInput},args:()=>[this.paymentMethod,this.vaultManagerFormContext]});this.cvvContainerId=`cvv-container-${Math.random().toString(36).substring(2,9)}`,new O(this,{task:async([e])=>{if(!e)return w;await this.updateComplete;let a=this.renderRoot.querySelector(`#${this.cvvContainerId}`);if(!a)return;let i=jr(this.computedStyles),n=i?{input:{base:i}}:void 0,o={cardNetwork:e.network,container:a,name:\"cvv\",placeholder:\"123\",style:n,ariaLabel:b(\"CVV\",{id:\"cardCVV\"})};this.cvvInput=await e.createCvvInput?.(o)??null,this.cvvInput&&(this.cvvInput.focus(),this.cvvError=this.cvvInput.metadata.errorCode||null,this.vaultManagerCvvContext?.setCvvInput(this.cvvInput),this.cvvInput.addListener(\"change\",()=>{this.onCvvInputChange()}),this.cvvInput.addListener(\"blur\",()=>{this.onBlur()}),this.cvvInput.addListener(\"focus\",()=>{this.onFocus()}))},args:()=>[this._setupCVVIframe.value]})}disconnectedCallback(){super.disconnectedCallback(),this.cvvInput&&(this.cvvInput.remove(),this.cvvInput=null,this.cvvError=null,this.vaultManagerCvvContext?.setCvvInput(null))}onCvvInputChange(){!this.cvvInput||!this.vaultManagerCvvContext||(this.cvvInputIsDirty=!0,this.cvvError=this.cvvInput.metadata.errorCode||null)}onBlur(){this.cvvInput&&(this.cvvInputIsBlurred=!0,this.cvvError=this.cvvInput.metadata.errorCode||null,this.isFocused=!1)}onFocus(){this.isFocused=!0}render(){return this._setupCVVIframe.render({error:()=>y,complete:()=>p`<div class=\"cvv-input-container\"><primer-input-wrapper .focusWithin=${this.isFocused} .hasError=${!!this.cvvError&&(this.vaultManagerCvvContext?.formIsDirty||this.cvvInputIsDirty&&this.cvvInputIsBlurred)} ><slot name=\"label\" slot=\"label\"><primer-input-label>CVV</primer-input-label></slot><div slot=\"input\" id=\"${this.cvvContainerId}\"></div>${R(this.cvvError&&(this.vaultManagerCvvContext?.formIsDirty||this.cvvInputIsDirty&&this.cvvInputIsBlurred),()=>p`<primer-input-error slot=\"error\">${b(this.cvvError,{id:this.cvvError})}</primer-input-error>`)}</primer-input-wrapper></div>`})}}"
234
+ "default": "class extends v{constructor(){super();this.vaultManagerFormContext=null;this.vaultManagerCvvContext=null;this.computedStyles=null;this.paymentMethod=null;this.cvvError=null;this.cvvInputIsDirty=!1;this.cvvInputIsBlurred=!1;this.cvvInput=null;this.isFocused=!1;this._setupCVVIframe=new O(this,{task:([e,a])=>!e||!a||e.paymentMethodType!==\"PAYMENT_CARD\"||!e.paymentInstrumentData?.network||a.createCvvInput===null?w:{network:e.paymentInstrumentData.network,createCvvInput:a.createCvvInput},args:()=>[this.paymentMethod,this.vaultManagerFormContext]});this.cvvContainerId=`cvv-container-${Math.random().toString(36).substring(2,9)}`,new O(this,{task:async([e])=>{if(!e)return w;await this.updateComplete;let a=this.renderRoot.querySelector(`#${this.cvvContainerId}`);if(!a)return;let i=$r(this.computedStyles),n=i?{input:{base:i}}:void 0,o={cardNetwork:e.network,container:a,name:\"cvv\",placeholder:\"123\",style:n,ariaLabel:b(\"CVV\",{id:\"cardCVV\"})};this.cvvInput=await e.createCvvInput?.(o)??null,this.cvvInput&&(this.cvvInput.focus(),this.cvvError=this.cvvInput.metadata.errorCode||null,this.vaultManagerCvvContext?.setCvvInput(this.cvvInput),this.cvvInput.addListener(\"change\",()=>{this.onCvvInputChange()}),this.cvvInput.addListener(\"blur\",()=>{this.onBlur()}),this.cvvInput.addListener(\"focus\",()=>{this.onFocus()}))},args:()=>[this._setupCVVIframe.value]})}disconnectedCallback(){super.disconnectedCallback(),this.cvvInput&&(this.cvvInput.remove(),this.cvvInput=null,this.cvvError=null,this.vaultManagerCvvContext?.setCvvInput(null))}onCvvInputChange(){!this.cvvInput||!this.vaultManagerCvvContext||(this.cvvInputIsDirty=!0,this.cvvError=this.cvvInput.metadata.errorCode||null)}onBlur(){this.cvvInput&&(this.cvvInputIsBlurred=!0,this.cvvError=this.cvvInput.metadata.errorCode||null,this.isFocused=!1)}onFocus(){this.isFocused=!0}render(){return this._setupCVVIframe.render({error:()=>y,complete:()=>p`<div class=\"cvv-input-container\"><primer-input-wrapper .focusWithin=${this.isFocused} .hasError=${!!this.cvvError&&(this.vaultManagerCvvContext?.formIsDirty||this.cvvInputIsDirty&&this.cvvInputIsBlurred)} ><slot name=\"label\" slot=\"label\"><primer-input-label>CVV</primer-input-label></slot><div slot=\"input\" id=\"${this.cvvContainerId}\"></div>${R(this.cvvError&&(this.vaultManagerCvvContext?.formIsDirty||this.cvvInputIsDirty&&this.cvvInputIsBlurred),()=>p`<primer-input-error slot=\"error\">${b(this.cvvError,{id:this.cvvError})}</primer-input-error>`)}</primer-input-wrapper></div>`})}}"
245
235
  },
246
236
  {
247
237
  "kind": "variable",
@@ -251,7 +241,7 @@
251
241
  {
252
242
  "kind": "variable",
253
243
  "name": "ie",
254
- "default": "class extends v{constructor(){super(...arguments);this.hideLabels=!1;this.disabled=!1;this.hasAssignedContent=!1;this.selectedCardNetwork=null;this.formErrorMessage=null;this.paymentMethodSelectionSent=!1;this.paymentManagers=new Map;this.clientOptions=null;this.headlessUtils=null;this.analyticsUtils=null;this.contextEventsController=null;this.cardFormProvider=new W(this,{context:ra,initialValue:null});this.eventsController=new Wt(this);this._contextCardSubmitListener=null;this._isHandlingContextEvent=!1;this.inputControllers=new Map;this.setupCardFormTask=new O(this,{task:([e])=>{if(!e?.manager)return w;let{manager:a}=e,i=a.createHostedInputs(),{cardNumberInput:n,expiryInput:o,cvvInput:s}=i;return this.cardFormProvider.setValue({cardholderNameInput:i.cardholderNameInput,cardNumberInput:n,expiryInput:o,cvvInput:s,setCardholderName:l=>{a.setCardholderName(l),this.shouldRequireCardholderName&&a.validate?.().then(c=>{let g=c?.validationErrors?.find(T=>T.name===pd.cardholderName),h=this.inputControllers.get(\"cardholderName\");h&&h.updateMetaFromValidation({valid:!1,error:g?.message||g?.error||null,errorCode:g?.message||g?.error||null})})},setCardNetwork:l=>{this.selectedCardNetwork=l},validate:()=>a.validate(),submit:l=>a.submit(l),hideLabels:this.hideLabels,disabled:this.disabled,setSubmissionState:l=>{this.inputControllers.forEach(c=>{c.setSubmitted(l)})},propagateValidationErrors:l=>{l&&l.forEach(c=>{let m=c.field||c.name,g=c.message||c.error,h=pd[m];if(h){let T=this.inputControllers.get(h);if(T){let M={valid:!1,error:g,errorCode:g};T.updateMetaFromValidation(M)}}})},registerInputController:(l,c)=>{this.inputControllers.set(l,c)},unregisterInputController:l=>{this.inputControllers.delete(l)},onUserInteraction:()=>{this.sendPaymentMethodSelectionEvent(),this.checkAndSendPaymentDetailsEnteredEvent()}}),!0},args:()=>[this.paymentManagers.get(\"PAYMENT_CARD\")]});this.paymentDetailsEnteredSent=!1;this.handleSlotButtonClick=e=>{let i=e.target.closest(\"button, primer-button\");if(!i)return;let n=i;this.isSubmitButton(n)&&(e.preventDefault(),this.submitCardPayment())};this.handleDirectSubmit=e=>{e.stopPropagation(),this.submitCardPayment()};this.handleContextCardSubmit=e=>{if(!this._isHandlingContextEvent){this._isHandlingContextEvent=!0;try{e.target!==this&&(e.stopPropagation(),this.submitCardPayment())}finally{this._isHandlingContextEvent=!1}}};this.onSlotChange=e=>{let i=e.target.assignedNodes({flatten:!0});this.hasAssignedContent=i.length>0};this.handleFormSubmit=e=>{e.preventDefault(),e.stopPropagation(),this.submitCardPayment()}}updated(e){if(super.updated(e),(e.has(\"hideLabels\")||e.has(\"disabled\"))&&this.cardFormProvider.value&&this.cardFormProvider.setValue({...this.cardFormProvider.value,hideLabels:this.hideLabels,disabled:this.disabled}),e.has(\"contextEventsController\")){let a=e.get(\"contextEventsController\");a?.host&&this._contextCardSubmitListener&&a.host.removeEventListener(\"primer:card-submit\",this._contextCardSubmitListener),this.setupContextEventListeners()}}get shouldShowCardholderName(){let e=this.clientOptions?.card?.cardholderName;return typeof e?.visible==\"boolean\"?e.visible:!0}get shouldRequireCardholderName(){if(!this.shouldShowCardholderName)return!1;let e=this.clientOptions?.card?.cardholderName;return typeof e?.required==\"boolean\"?e.required:!0}sendPaymentMethodSelectionEvent(){this.paymentMethodSelectionSent||(this.paymentMethodSelectionSent=!0,Q({eventName:\"PAYMENT_METHOD_SELECTION\",paymentMethod:\"PAYMENT_CARD\"}))}checkAndSendPaymentDetailsEnteredEvent(){if(this.paymentDetailsEnteredSent)return;let e=this.inputControllers.get(\"cardNumber\"),a=this.inputControllers.get(\"expire\"),i=this.inputControllers.get(\"cvv\"),n=e?.meta?.dirty===!0,o=a?.meta?.dirty===!0,s=i?.meta?.dirty===!0,l=!0;this.shouldRequireCardholderName&&(l=this.inputControllers.get(\"cardholderName\")?.meta?.dirty===!0),n&&o&&s&&l&&(this.sendPaymentDetailsEnteredEvent(),this.paymentDetailsEnteredSent=!0)}sendPaymentDetailsEnteredEvent(){Q({eventName:\"PAYMENT_DETAILS_ENTERED\",paymentMethod:\"PAYMENT_CARD\"})}connectedCallback(){super.connectedCallback(),this.addEventListener(\"click\",this.handleSlotButtonClick),this.addEventListener(\"primer:card-submit\",this.handleDirectSubmit),this._contextCardSubmitListener=e=>{this.handleContextCardSubmit(e)},this.setupContextEventListeners()}disconnectedCallback(){this.removeEventListener(\"click\",this.handleSlotButtonClick),this.removeEventListener(\"primer:card-submit\",this.handleDirectSubmit),this.cleanupContextEventListeners(),super.disconnectedCallback()}setupContextEventListeners(){this.contextEventsController?.host&&this._contextCardSubmitListener&&this.contextEventsController.host.addEventListener(\"primer:card-submit\",this._contextCardSubmitListener)}cleanupContextEventListeners(){this.contextEventsController?.host&&this._contextCardSubmitListener&&this.contextEventsController.host.removeEventListener(\"primer:card-submit\",this._contextCardSubmitListener)}isSubmitButton(e){let a=e.tagName.toLowerCase(),i=a===\"button\",n=a===\"primer-button\";return i&&(e.getAttribute(\"type\")===\"submit\"||e.hasAttribute(\"data-submit\"))||n&&(e.getAttribute(\"type\")===\"submit\"||e.hasAttribute(\"data-submit\"))}async submitCardPayment(){let e=this.cardFormProvider.value;if(!e||this.disabled)return;this.formErrorMessage=null,e.setSubmissionState?.(!0);let a=this.querySelector(\"primer-billing-address\")||this.renderRoot.querySelector(\"primer-billing-address\"),i=!0;a&&(i=await a.validateForSubmission());let n=await e.validate?.();if(n?.valid&&i){if(a&&!await a.submitToSDK()){let c=b(\"tokenizationError\",{id:\"tokenizationError\"});this.formErrorMessage=c,this.eventsController.dispatchFormSubmitErrors([{field:\"billingAddress\",name:\"billingAddress\",error:\"BILLING_ADDRESS_SUBMISSION_FAILED\",message:c}]);return}let o=this.selectedCardNetwork?{cardNetwork:this.selectedCardNetwork}:void 0;await e.submit?.(o);let s={success:!0};this.eventsController.dispatchFormSubmitSuccess(s)}else{let o=n?.validationErrors;e.propagateValidationErrors?.(o||[]),this.cardFormProvider.setValue({...e,errors:o}),this.eventsController.dispatchFormSubmitErrors(o)}}render(){return this.setupCardFormTask.status===vt.ERROR||this.setupCardFormTask.status===vt.INITIAL?y:p`<form @submit=${this.handleFormSubmit}><slot name=\"card-form-content\" @slotchange=${this.onSlotChange}></slot>${this.setupCardFormTask.render({complete:()=>R(this.hasAssignedContent,()=>y,()=>p`<div class=\"card-form\"><primer-input-card-number></primer-input-card-number><div class=\"card-form-row\"><primer-input-card-expiry></primer-input-card-expiry><primer-input-cvv></primer-input-cvv></div>${R(this.shouldShowCardholderName,()=>p`<primer-input-card-holder-name></primer-input-card-holder-name>`,()=>y)}<primer-billing-address></primer-billing-address></div><primer-card-form-submit></primer-card-form-submit><primer-error-message message=\"${this.formErrorMessage||\"\"}\" ?visible=\"${!!this.formErrorMessage}\" ></primer-error-message>`)})}</form>`}}"
244
+ "default": "class extends v{constructor(){super(...arguments);this.hideLabels=!1;this.disabled=!1;this.hasAssignedContent=!1;this.selectedCardNetwork=null;this.formErrorMessage=null;this.paymentMethodSelectionSent=!1;this.paymentManagers=new Map;this.clientOptions=null;this.headlessUtils=null;this.analyticsUtils=null;this.contextEventsController=null;this.cardFormProvider=new W(this,{context:ia,initialValue:null});this.eventsController=new Zt(this);this._contextCardSubmitListener=null;this._isHandlingContextEvent=!1;this.inputControllers=new Map;this.setupCardFormTask=new O(this,{task:([e])=>{if(!e?.manager)return w;let{manager:a}=e,i=a.createHostedInputs(),{cardNumberInput:n,expiryInput:o,cvvInput:s}=i;return this.cardFormProvider.setValue({cardholderNameInput:i.cardholderNameInput,cardNumberInput:n,expiryInput:o,cvvInput:s,setCardholderName:l=>{a.setCardholderName(l),this.shouldRequireCardholderName&&a.validate?.().then(c=>{let g=c?.validationErrors?.find(T=>T.name===cd.cardholderName),h=this.inputControllers.get(\"cardholderName\");h&&h.updateMetaFromValidation({valid:!1,error:g?.message||g?.error||null,errorCode:g?.message||g?.error||null})})},setCardNetwork:l=>{this.selectedCardNetwork=l},validate:()=>a.validate(),submit:l=>a.submit(l),hideLabels:this.hideLabels,disabled:this.disabled,setSubmissionState:l=>{this.inputControllers.forEach(c=>{c.setSubmitted(l)})},propagateValidationErrors:l=>{l&&l.forEach(c=>{let m=c.field||c.name,g=c.message||c.error,h=cd[m];if(h){let T=this.inputControllers.get(h);if(T){let M={valid:!1,error:g,errorCode:g};T.updateMetaFromValidation(M)}}})},registerInputController:(l,c)=>{this.inputControllers.set(l,c)},unregisterInputController:l=>{this.inputControllers.delete(l)},onUserInteraction:()=>{this.sendPaymentMethodSelectionEvent(),this.checkAndSendPaymentDetailsEnteredEvent()}}),!0},args:()=>[this.paymentManagers.get(\"PAYMENT_CARD\")]});this.paymentDetailsEnteredSent=!1;this.handleSlotButtonClick=e=>{let i=e.target.closest(\"button, primer-button\");if(!i)return;let n=i;this.isSubmitButton(n)&&(e.preventDefault(),this.submitCardPayment())};this.handleDirectSubmit=e=>{e.stopPropagation(),this.submitCardPayment()};this.handleContextCardSubmit=e=>{if(!this._isHandlingContextEvent){this._isHandlingContextEvent=!0;try{e.target!==this&&(e.stopPropagation(),this.submitCardPayment())}finally{this._isHandlingContextEvent=!1}}};this.onSlotChange=e=>{let i=e.target.assignedNodes({flatten:!0});this.hasAssignedContent=i.length>0};this.handleFormSubmit=e=>{e.preventDefault(),e.stopPropagation(),this.submitCardPayment()}}updated(e){if(super.updated(e),(e.has(\"hideLabels\")||e.has(\"disabled\"))&&this.cardFormProvider.value&&this.cardFormProvider.setValue({...this.cardFormProvider.value,hideLabels:this.hideLabels,disabled:this.disabled}),e.has(\"contextEventsController\")){let a=e.get(\"contextEventsController\");a?.host&&this._contextCardSubmitListener&&a.host.removeEventListener(\"primer:card-submit\",this._contextCardSubmitListener),this.setupContextEventListeners()}}get shouldShowCardholderName(){let e=this.clientOptions?.card?.cardholderName;return typeof e?.visible==\"boolean\"?e.visible:!0}get shouldRequireCardholderName(){if(!this.shouldShowCardholderName)return!1;let e=this.clientOptions?.card?.cardholderName;return typeof e?.required==\"boolean\"?e.required:!0}sendPaymentMethodSelectionEvent(){this.paymentMethodSelectionSent||(this.paymentMethodSelectionSent=!0,Q({eventName:\"PAYMENT_METHOD_SELECTION\",paymentMethod:\"PAYMENT_CARD\"}))}checkAndSendPaymentDetailsEnteredEvent(){if(this.paymentDetailsEnteredSent)return;let e=this.inputControllers.get(\"cardNumber\"),a=this.inputControllers.get(\"expire\"),i=this.inputControllers.get(\"cvv\"),n=e?.meta?.dirty===!0,o=a?.meta?.dirty===!0,s=i?.meta?.dirty===!0,l=!0;this.shouldRequireCardholderName&&(l=this.inputControllers.get(\"cardholderName\")?.meta?.dirty===!0),n&&o&&s&&l&&(this.sendPaymentDetailsEnteredEvent(),this.paymentDetailsEnteredSent=!0)}sendPaymentDetailsEnteredEvent(){Q({eventName:\"PAYMENT_DETAILS_ENTERED\",paymentMethod:\"PAYMENT_CARD\"})}connectedCallback(){super.connectedCallback(),this.addEventListener(\"click\",this.handleSlotButtonClick),this.addEventListener(\"primer:card-submit\",this.handleDirectSubmit),this._contextCardSubmitListener=e=>{this.handleContextCardSubmit(e)},this.setupContextEventListeners()}disconnectedCallback(){this.removeEventListener(\"click\",this.handleSlotButtonClick),this.removeEventListener(\"primer:card-submit\",this.handleDirectSubmit),this.cleanupContextEventListeners(),super.disconnectedCallback()}setupContextEventListeners(){this.contextEventsController?.host&&this._contextCardSubmitListener&&this.contextEventsController.host.addEventListener(\"primer:card-submit\",this._contextCardSubmitListener)}cleanupContextEventListeners(){this.contextEventsController?.host&&this._contextCardSubmitListener&&this.contextEventsController.host.removeEventListener(\"primer:card-submit\",this._contextCardSubmitListener)}isSubmitButton(e){let a=e.tagName.toLowerCase(),i=a===\"button\",n=a===\"primer-button\";return i&&(e.getAttribute(\"type\")===\"submit\"||e.hasAttribute(\"data-submit\"))||n&&(e.getAttribute(\"type\")===\"submit\"||e.hasAttribute(\"data-submit\"))}async submitCardPayment(){let e=this.cardFormProvider.value;if(!e||this.disabled)return;this.formErrorMessage=null,e.setSubmissionState?.(!0);let a=this.querySelector(\"primer-billing-address\")||this.renderRoot.querySelector(\"primer-billing-address\"),i=!0;a&&(i=await a.validateForSubmission());let n=await e.validate?.();if(n?.valid&&i){if(a&&!await a.submitToSDK()){let c=b(\"tokenizationError\",{id:\"tokenizationError\"});this.formErrorMessage=c,this.eventsController.dispatchFormSubmitErrors([{field:\"billingAddress\",name:\"billingAddress\",error:\"BILLING_ADDRESS_SUBMISSION_FAILED\",message:c}]);return}let o=this.selectedCardNetwork?{cardNetwork:this.selectedCardNetwork}:void 0;await e.submit?.(o);let s={success:!0};this.eventsController.dispatchFormSubmitSuccess(s)}else{let o=n?.validationErrors;e.propagateValidationErrors?.(o||[]),this.cardFormProvider.setValue({...e,errors:o}),this.eventsController.dispatchFormSubmitErrors(o)}}render(){return this.setupCardFormTask.status===vt.ERROR||this.setupCardFormTask.status===vt.INITIAL?y:p`<form @submit=${this.handleFormSubmit}><slot name=\"card-form-content\" @slotchange=${this.onSlotChange}></slot>${this.setupCardFormTask.render({complete:()=>R(this.hasAssignedContent,()=>y,()=>p`<div class=\"card-form\"><primer-input-card-number></primer-input-card-number><div class=\"card-form-row\"><primer-input-card-expiry></primer-input-card-expiry><primer-input-cvv></primer-input-cvv></div>${R(this.shouldShowCardholderName,()=>p`<primer-input-card-holder-name></primer-input-card-holder-name>`,()=>y)}<primer-billing-address></primer-billing-address></div><primer-card-form-submit></primer-card-form-submit><primer-error-message message=\"${this.formErrorMessage||\"\"}\" ?visible=\"${!!this.formErrorMessage}\" ></primer-error-message>`)})}</form>`}}"
255
245
  },
256
246
  {
257
247
  "kind": "variable",
@@ -281,7 +271,7 @@
281
271
  {
282
272
  "kind": "variable",
283
273
  "name": "me",
284
- "default": "class extends v{constructor(){super(...arguments);this.cardNetworks=null;this.headlessUtils=null;this.selectedCardNetwork=null;this.isDropdownOpen=!1;this.focusedNetworkIndex=0;this.isKeyboardNavigation=!1;this.buttonRef=Kt();this.dropdownRef=Kt();this.networkOptionRefs=[];this.toggleDropdown=e=>{this.isKeyboardNavigation=!1,e.stopPropagation(),this.getSelectableNetworks().length>1&&(this.isDropdownOpen=!this.isDropdownOpen,this.isDropdownOpen&&(this.focusedNetworkIndex=this.getSelectedNetworkIndex()))};this.handleClickOutside=e=>{this.isDropdownOpen&&(this.contains(e.target)||(this.isDropdownOpen=!1,this.isKeyboardNavigation=!1))};this.handleMouseMove=()=>{this.isKeyboardNavigation&&(this.isKeyboardNavigation=!1)};this.handleKeyDown=e=>{if(!(!(this.getSelectableNetworks().length>1)||!(this.contains(e.target)||this===e.target||this.isDropdownOpen&&e.target===document.body)))switch(this.isKeyboardNavigation=!0,e.key){case\"ArrowDown\":e.preventDefault(),this.isDropdownOpen?(this.focusedNetworkIndex=(this.focusedNetworkIndex+1)%this.getSelectableNetworks().length,this.focusNetworkOption()):(this.isDropdownOpen=!0,this.focusedNetworkIndex=this.getSelectedNetworkIndex());break;case\"ArrowUp\":e.preventDefault(),this.isDropdownOpen?(this.focusedNetworkIndex=(this.focusedNetworkIndex-1+this.getSelectableNetworks().length)%this.getSelectableNetworks().length,this.focusNetworkOption()):(this.isDropdownOpen=!0,this.focusedNetworkIndex=this.getSelectedNetworkIndex());break;case\"Enter\":case\" \":this.isDropdownOpen&&this.focusedNetworkIndex>=0?(e.preventDefault(),this.selectNetwork(e,this.getSelectableNetworks()[this.focusedNetworkIndex])):!this.isDropdownOpen&&this.buttonRef.value===document.activeElement&&(e.preventDefault(),this.isDropdownOpen=!0,this.focusedNetworkIndex=this.getSelectedNetworkIndex());break;case\"Escape\":this.isDropdownOpen&&(e.preventDefault(),this.isDropdownOpen=!1,this.buttonRef.value?.focus());break;case\"Tab\":this.isDropdownOpen&&(this.isDropdownOpen=!1);break}};this.handleDocumentKeyDown=e=>{this.isDropdownOpen&&this.handleKeyDown(e)}}getNetworkIconUrl(e){return this.headlessUtils?.getCardNetworkAsset(e.network)?.cardUrl}getSelectableNetworks(){return this.cardNetworks?.selectableCardNetworks||[]}getDetectedNetwork(){return this.selectedCardNetwork??(this.cardNetworks?.detectedCardNetwork||null)}getSelectedNetworkIndex(){let e=this.getDetectedNetwork();if(!e)return 0;let a=this.getSelectableNetworks().findIndex(i=>i.network===e.network);return a>=0?a:0}selectNetwork(e,a){e.stopPropagation(),this.selectedCardNetwork=a,this.isDropdownOpen=!1,this.buttonRef.value?.focus(),this.cardNetworks&&this.dispatchEvent(new CustomEvent(\"network-selected\",{detail:{network:a.network},bubbles:!0,composed:!0}))}focusNetworkOption(){requestAnimationFrame(()=>{this.networkOptionRefs[this.focusedNetworkIndex]&&this.networkOptionRefs[this.focusedNetworkIndex].focus()})}setNetworkOptionRef(e,a){this.networkOptionRefs[a]=e}connectedCallback(){super.connectedCallback(),setTimeout(()=>{document.addEventListener(\"click\",this.handleClickOutside),document.addEventListener(\"mousemove\",this.handleMouseMove),this.addEventListener(\"keydown\",this.handleKeyDown),document.addEventListener(\"keydown\",this.handleDocumentKeyDown)},0)}disconnectedCallback(){document.removeEventListener(\"click\",this.handleClickOutside),document.removeEventListener(\"keydown\",this.handleDocumentKeyDown),document.removeEventListener(\"mousemove\",this.handleMouseMove),this.removeEventListener(\"keydown\",this.handleKeyDown),super.disconnectedCallback()}render(){if(this.cardNetworks?.isLoading)return p`<primer-spinner size=\"small\" compact></primer-spinner>`;let e=this.getSelectableNetworks();if(!this.getDetectedNetwork()&&e.length===0)return p`<primer-icon name=\"payment-card\" size=\"sm\"></primer-icon>`;let a=this.getDetectedNetwork()||(e.length>0?e[0]:null);if(!a)return p`<primer-icon name=\"payment-card\" size=\"sm\"></primer-icon>`;let i=e.length>1;return p`<button ${Et(this.buttonRef)} class=\"network-selector\" @click=${this.toggleDropdown} @keydown=${n=>{(n.key===\" \"||n.key===\"Enter\")&&i&&(n.preventDefault(),this.isDropdownOpen=!this.isDropdownOpen,this.isDropdownOpen&&(this.focusedNetworkIndex=this.getSelectedNetworkIndex()))}} aria-label=${i?`Selected card network: ${a.displayName}. Click to change.`:`Card network: ${a.displayName}`} aria-expanded=${i?this.isDropdownOpen:y} aria-haspopup=${i?\"true\":y} aria-controls=${i?\"network-dropdown\":y} ><img class=\"network-icon\" src=${this.getNetworkIconUrl(a)} alt=${a.displayName} />${R(i,()=>p`<primer-icon class=\"caret ${this.isDropdownOpen?\"open\":\"\"}\" size=\"sm\" name=\"chevron-down\" ></primer-icon>`,()=>y)}</button>${R(this.isDropdownOpen,()=>p`<div ${Et(this.dropdownRef)} id=\"network-dropdown\" class=\"dropdown open\" role=\"listbox\" aria-label=\"Select card network\" >${e.map((n,o)=>p`<div ${Et(s=>this.setNetworkOptionRef(s,o))} class=\"network-option ${this.isKeyboardNavigation&&o===this.focusedNetworkIndex?\"focused\":\"\"}\" @click=${s=>this.selectNetwork(s,n)} @keydown=${s=>{(s.key===\"Enter\"||s.key===\" \")&&this.selectNetwork(s,n)}} role=\"option\" aria-selected=${n.network===a.network} tabindex=\"${o===this.focusedNetworkIndex?\"0\":\"-1\"}\" ><img class=\"network-option-icon\" src=${this.getNetworkIconUrl(n)} alt=${n.displayName} /><span class=\"network-name\">${n.displayName}</span>${R(n.network===a.network,()=>p`<primer-icon class=\"checkmark\" name=\"checkmark\" size=\"sm\" ></primer-icon>`,()=>y)}</div>`)}</div>`,()=>y)} `}}"
274
+ "default": "class extends v{constructor(){super(...arguments);this.cardNetworks=null;this.headlessUtils=null;this.selectedCardNetwork=null;this.isDropdownOpen=!1;this.focusedNetworkIndex=0;this.isKeyboardNavigation=!1;this.buttonRef=Ft();this.dropdownRef=Ft();this.networkOptionRefs=[];this.toggleDropdown=e=>{this.isKeyboardNavigation=!1,e.stopPropagation(),this.getSelectableNetworks().length>1&&(this.isDropdownOpen=!this.isDropdownOpen,this.isDropdownOpen&&(this.focusedNetworkIndex=this.getSelectedNetworkIndex()))};this.handleClickOutside=e=>{this.isDropdownOpen&&(this.contains(e.target)||(this.isDropdownOpen=!1,this.isKeyboardNavigation=!1))};this.handleMouseMove=()=>{this.isKeyboardNavigation&&(this.isKeyboardNavigation=!1)};this.handleKeyDown=e=>{if(!(!(this.getSelectableNetworks().length>1)||!(this.contains(e.target)||this===e.target||this.isDropdownOpen&&e.target===document.body)))switch(this.isKeyboardNavigation=!0,e.key){case\"ArrowDown\":e.preventDefault(),this.isDropdownOpen?(this.focusedNetworkIndex=(this.focusedNetworkIndex+1)%this.getSelectableNetworks().length,this.focusNetworkOption()):(this.isDropdownOpen=!0,this.focusedNetworkIndex=this.getSelectedNetworkIndex());break;case\"ArrowUp\":e.preventDefault(),this.isDropdownOpen?(this.focusedNetworkIndex=(this.focusedNetworkIndex-1+this.getSelectableNetworks().length)%this.getSelectableNetworks().length,this.focusNetworkOption()):(this.isDropdownOpen=!0,this.focusedNetworkIndex=this.getSelectedNetworkIndex());break;case\"Enter\":case\" \":this.isDropdownOpen&&this.focusedNetworkIndex>=0?(e.preventDefault(),this.selectNetwork(e,this.getSelectableNetworks()[this.focusedNetworkIndex])):!this.isDropdownOpen&&this.buttonRef.value===document.activeElement&&(e.preventDefault(),this.isDropdownOpen=!0,this.focusedNetworkIndex=this.getSelectedNetworkIndex());break;case\"Escape\":this.isDropdownOpen&&(e.preventDefault(),this.isDropdownOpen=!1,this.buttonRef.value?.focus());break;case\"Tab\":this.isDropdownOpen&&(this.isDropdownOpen=!1);break}};this.handleDocumentKeyDown=e=>{this.isDropdownOpen&&this.handleKeyDown(e)}}getNetworkIconUrl(e){return this.headlessUtils?.getCardNetworkAsset(e.network)?.cardUrl}getSelectableNetworks(){return this.cardNetworks?.selectableCardNetworks||[]}getDetectedNetwork(){return this.selectedCardNetwork??(this.cardNetworks?.detectedCardNetwork||null)}getSelectedNetworkIndex(){let e=this.getDetectedNetwork();if(!e)return 0;let a=this.getSelectableNetworks().findIndex(i=>i.network===e.network);return a>=0?a:0}selectNetwork(e,a){e.stopPropagation(),this.selectedCardNetwork=a,this.isDropdownOpen=!1,this.buttonRef.value?.focus(),this.cardNetworks&&this.dispatchEvent(new CustomEvent(\"network-selected\",{detail:{network:a.network},bubbles:!0,composed:!0}))}focusNetworkOption(){requestAnimationFrame(()=>{this.networkOptionRefs[this.focusedNetworkIndex]&&this.networkOptionRefs[this.focusedNetworkIndex].focus()})}setNetworkOptionRef(e,a){this.networkOptionRefs[a]=e}connectedCallback(){super.connectedCallback(),setTimeout(()=>{document.addEventListener(\"click\",this.handleClickOutside),document.addEventListener(\"mousemove\",this.handleMouseMove),this.addEventListener(\"keydown\",this.handleKeyDown),document.addEventListener(\"keydown\",this.handleDocumentKeyDown)},0)}disconnectedCallback(){document.removeEventListener(\"click\",this.handleClickOutside),document.removeEventListener(\"keydown\",this.handleDocumentKeyDown),document.removeEventListener(\"mousemove\",this.handleMouseMove),this.removeEventListener(\"keydown\",this.handleKeyDown),super.disconnectedCallback()}render(){if(this.cardNetworks?.isLoading)return p`<primer-spinner size=\"small\" compact></primer-spinner>`;let e=this.getSelectableNetworks();if(!this.getDetectedNetwork()&&e.length===0)return p`<primer-icon name=\"payment-card\" size=\"sm\"></primer-icon>`;let a=this.getDetectedNetwork()||(e.length>0?e[0]:null);if(!a)return p`<primer-icon name=\"payment-card\" size=\"sm\"></primer-icon>`;let i=e.length>1;return p`<button ${Et(this.buttonRef)} class=\"network-selector\" @click=${this.toggleDropdown} @keydown=${n=>{(n.key===\" \"||n.key===\"Enter\")&&i&&(n.preventDefault(),this.isDropdownOpen=!this.isDropdownOpen,this.isDropdownOpen&&(this.focusedNetworkIndex=this.getSelectedNetworkIndex()))}} aria-label=${i?`Selected card network: ${a.displayName}. Click to change.`:`Card network: ${a.displayName}`} aria-expanded=${i?this.isDropdownOpen:y} aria-haspopup=${i?\"true\":y} aria-controls=${i?\"network-dropdown\":y} ><img class=\"network-icon\" src=${this.getNetworkIconUrl(a)} alt=${a.displayName} />${R(i,()=>p`<primer-icon class=\"caret ${this.isDropdownOpen?\"open\":\"\"}\" size=\"sm\" name=\"chevron-down\" ></primer-icon>`,()=>y)}</button>${R(this.isDropdownOpen,()=>p`<div ${Et(this.dropdownRef)} id=\"network-dropdown\" class=\"dropdown open\" role=\"listbox\" aria-label=\"Select card network\" >${e.map((n,o)=>p`<div ${Et(s=>this.setNetworkOptionRef(s,o))} class=\"network-option ${this.isKeyboardNavigation&&o===this.focusedNetworkIndex?\"focused\":\"\"}\" @click=${s=>this.selectNetwork(s,n)} @keydown=${s=>{(s.key===\"Enter\"||s.key===\" \")&&this.selectNetwork(s,n)}} role=\"option\" aria-selected=${n.network===a.network} tabindex=\"${o===this.focusedNetworkIndex?\"0\":\"-1\"}\" ><img class=\"network-option-icon\" src=${this.getNetworkIconUrl(n)} alt=${n.displayName} /><span class=\"network-name\">${n.displayName}</span>${R(n.network===a.network,()=>p`<primer-icon class=\"checkmark\" name=\"checkmark\" size=\"sm\" ></primer-icon>`,()=>y)}</div>`)}</div>`,()=>y)} `}}"
285
275
  },
286
276
  {
287
277
  "kind": "variable",
@@ -290,12 +280,12 @@
290
280
  },
291
281
  {
292
282
  "kind": "variable",
293
- "name": "ia",
283
+ "name": "na",
294
284
  "default": "class extends v{render(){return p`<primer-checkout-state type=\"complete\"></primer-checkout-state>`}}"
295
285
  },
296
286
  {
297
287
  "kind": "variable",
298
- "name": "Ft",
288
+ "name": "Ut",
299
289
  "default": "class extends v{constructor(){super(...arguments);this.sdkState=null}render(){return p`<primer-checkout-state type=\"failure\" description=${this.sdkState?.primerJsError?.message||\"\"} ></primer-checkout-state>`}}"
300
290
  },
301
291
  {
@@ -306,11 +296,11 @@
306
296
  {
307
297
  "kind": "variable",
308
298
  "name": "et",
309
- "default": "class extends v{constructor(){super(...arguments);this.hasAssignedContent=!1;this.onSlotChange=e=>{let i=e.target.assignedNodes({flatten:!0});this.hasAssignedContent=i.length>0,this.requestUpdate()};this.paymentMethods=null;this.sdkState=null;this.clientOptions=null}render(){return this.sdkState?.isSuccessful?p`<slot name=\"checkout-complete\"><primer-checkout-complete></primer-checkout-complete></slot>`:p`<slot name=\"payments\" @slotchange=${this.onSlotChange}></slot>${R(this.hasAssignedContent,()=>y,()=>p`<div class=${oe({\"primer-is-processing\":!!this.sdkState?.isProcessing})} ><primer-vault-manager></primer-vault-manager><primer-show-other-payments><div slot=\"other-payments\" class=\"primer-main-list\">${this.paymentMethods?.toArray().map(e=>p`<primer-payment-method type=${e.type} ?disabled=${this.clientOptions?.disabledPayments===!0} ></primer-payment-method>`)}</div></primer-show-other-payments><primer-error-message-container></primer-error-message-container></div>`)} `}}"
299
+ "default": "class extends v{constructor(){super(...arguments);this.hasAssignedContent=!1;this.onSlotChange=e=>{let i=e.target.assignedNodes({flatten:!0});this.hasAssignedContent=i.length>0,this.requestUpdate()};this.paymentMethods=null;this.sdkState=null;this.clientOptions=null}render(){return this.sdkState?.isSuccessful?p`<slot name=\"checkout-complete\"><primer-checkout-complete></primer-checkout-complete></slot>`:p`<slot name=\"payments\" @slotchange=${this.onSlotChange}></slot>${R(this.hasAssignedContent,()=>y,()=>p`<div class=${oe({\"primer-is-processing\":!!this.sdkState?.isProcessing})} ><primer-vault-manager></primer-vault-manager><primer-show-other-payments><div slot=\"other-payments\" class=\"primer-main-list\">${this.paymentMethods?.map(e=>p`<primer-payment-method type=${e.type} ?disabled=${this.clientOptions?.disabledPayments===!0} ></primer-payment-method>`)}</div></primer-show-other-payments><primer-error-message-container></primer-error-message-container></div>`)} `}}"
310
300
  },
311
301
  {
312
302
  "kind": "function",
313
- "name": "rB"
303
+ "name": "QD"
314
304
  }
315
305
  ],
316
306
  "exports": [
@@ -334,7 +324,7 @@
334
324
  "kind": "js",
335
325
  "name": "AchPayment",
336
326
  "declaration": {
337
- "name": "Ie",
327
+ "name": "Ne",
338
328
  "module": "dist/primer-loader.js"
339
329
  }
340
330
  },
@@ -482,22 +472,6 @@
482
472
  "module": "dist/primer-loader.js"
483
473
  }
484
474
  },
485
- {
486
- "kind": "js",
487
- "name": "InitializedPayments",
488
- "declaration": {
489
- "name": "pr",
490
- "module": "dist/primer-loader.js"
491
- }
492
- },
493
- {
494
- "kind": "js",
495
- "name": "InitializedVaultedPayments",
496
- "declaration": {
497
- "name": "mr",
498
- "module": "dist/primer-loader.js"
499
- }
500
- },
501
475
  {
502
476
  "kind": "js",
503
477
  "name": "Input",
@@ -518,7 +492,7 @@
518
492
  "kind": "js",
519
493
  "name": "InputWrapper",
520
494
  "declaration": {
521
- "name": "$e",
495
+ "name": "ze",
522
496
  "module": "dist/primer-loader.js"
523
497
  }
524
498
  },
@@ -574,7 +548,7 @@
574
548
  "kind": "js",
575
549
  "name": "PrimerCheckoutComplete",
576
550
  "declaration": {
577
- "name": "ia",
551
+ "name": "na",
578
552
  "module": "dist/primer-loader.js"
579
553
  }
580
554
  },
@@ -590,7 +564,7 @@
590
564
  "kind": "js",
591
565
  "name": "PrimerCheckoutFailure",
592
566
  "declaration": {
593
- "name": "Ft",
567
+ "name": "Ut",
594
568
  "module": "dist/primer-loader.js"
595
569
  }
596
570
  },
@@ -654,7 +628,7 @@
654
628
  "kind": "js",
655
629
  "name": "Spinner",
656
630
  "declaration": {
657
- "name": "ze",
631
+ "name": "$e",
658
632
  "module": "dist/primer-loader.js"
659
633
  }
660
634
  },
@@ -670,7 +644,7 @@
670
644
  "kind": "js",
671
645
  "name": "VaultDeleteConfirmation",
672
646
  "declaration": {
673
- "name": "Ne",
647
+ "name": "Ie",
674
648
  "module": "dist/primer-loader.js"
675
649
  }
676
650
  },
@@ -726,7 +700,7 @@
726
700
  "kind": "js",
727
701
  "name": "injectDarkTheme",
728
702
  "declaration": {
729
- "name": "kp",
703
+ "name": "Np",
730
704
  "module": "dist/primer-loader.js"
731
705
  }
732
706
  },
@@ -734,7 +708,7 @@
734
708
  "kind": "js",
735
709
  "name": "injectLightTheme",
736
710
  "declaration": {
737
- "name": "Np",
711
+ "name": "Pp",
738
712
  "module": "dist/primer-loader.js"
739
713
  }
740
714
  },
@@ -742,7 +716,7 @@
742
716
  "kind": "js",
743
717
  "name": "injectLoaderStyles",
744
718
  "declaration": {
745
- "name": "Ps",
719
+ "name": "Es",
746
720
  "module": "dist/primer-loader.js"
747
721
  }
748
722
  },
@@ -750,7 +724,7 @@
750
724
  "kind": "js",
751
725
  "name": "injectThemeStyles",
752
726
  "declaration": {
753
- "name": "Is",
727
+ "name": "Ts",
754
728
  "module": "dist/primer-loader.js"
755
729
  }
756
730
  },
@@ -758,7 +732,7 @@
758
732
  "kind": "js",
759
733
  "name": "loadPrimer",
760
734
  "declaration": {
761
- "name": "rB",
735
+ "name": "QD",
762
736
  "module": "dist/primer-loader.js"
763
737
  }
764
738
  }
@@ -3246,233 +3220,514 @@
3246
3220
  },
3247
3221
  {
3248
3222
  "kind": "javascript-module",
3249
- "path": "src/controllers/card-network-controller.ts",
3223
+ "path": "src/contexts/analytics-context.ts",
3250
3224
  "declarations": [
3251
3225
  {
3252
- "kind": "class",
3253
- "description": "CardNetworkController manages and processes card network data\n\nThis controller is responsible for:\n- Handling card network change events\n- Processing detected and selectable card networks\n- Maintaining card network state",
3254
- "name": "CardNetworkController",
3255
- "members": [
3256
- {
3257
- "kind": "field",
3258
- "name": "host",
3259
- "type": {
3260
- "text": "PrimerCheckoutType"
3261
- },
3262
- "privacy": "private"
3263
- },
3264
- {
3265
- "kind": "method",
3266
- "name": "hostConnected",
3267
- "return": {
3268
- "type": {
3269
- "text": "void"
3270
- }
3271
- }
3272
- },
3273
- {
3274
- "kind": "method",
3275
- "name": "setCardNetworksLoading",
3276
- "return": {
3277
- "type": {
3278
- "text": "void"
3279
- }
3280
- },
3281
- "description": "Sets the card networks to loading state"
3282
- },
3283
- {
3284
- "kind": "method",
3285
- "name": "updateCardNetworksState",
3286
- "privacy": "private",
3287
- "return": {
3288
- "type": {
3289
- "text": "void"
3290
- }
3291
- },
3292
- "parameters": [
3293
- {
3294
- "name": "cardNetworks",
3295
- "type": {
3296
- "text": "CardNetworksContextType"
3297
- },
3298
- "description": "The new card networks context"
3299
- }
3300
- ],
3301
- "description": "Updates card networks state and dispatches events"
3302
- },
3303
- {
3304
- "kind": "method",
3305
- "name": "processCardNetworkChangeEvent",
3306
- "return": {
3307
- "type": {
3308
- "text": "void"
3309
- }
3310
- },
3311
- "parameters": [
3312
- {
3313
- "name": "event",
3314
- "type": {
3315
- "text": "CardNetworkChangeEvent"
3316
- },
3317
- "description": "The card network change event"
3318
- }
3319
- ],
3320
- "description": "Processes a card network change event"
3321
- },
3322
- {
3323
- "kind": "method",
3324
- "name": "processBinDataAvailableEvent",
3325
- "return": {
3326
- "type": {
3327
- "text": "void"
3328
- }
3329
- },
3330
- "parameters": [
3331
- {
3332
- "name": "event",
3333
- "type": {
3334
- "text": "BinDataAvailableEvent"
3335
- }
3336
- }
3337
- ]
3338
- }
3339
- ]
3226
+ "kind": "variable",
3227
+ "name": "analyticsContext"
3340
3228
  }
3341
3229
  ],
3342
3230
  "exports": [
3343
3231
  {
3344
3232
  "kind": "js",
3345
- "name": "CardNetworkController",
3233
+ "name": "analyticsContext",
3346
3234
  "declaration": {
3347
- "name": "CardNetworkController",
3348
- "module": "src/controllers/card-network-controller.ts"
3235
+ "name": "analyticsContext",
3236
+ "module": "src/contexts/analytics-context.ts"
3349
3237
  }
3350
3238
  }
3351
3239
  ]
3352
3240
  },
3353
3241
  {
3354
3242
  "kind": "javascript-module",
3355
- "path": "src/controllers/headless-sdk-controller.ts",
3243
+ "path": "src/contexts/card-networks-context.ts",
3356
3244
  "declarations": [
3357
3245
  {
3358
- "kind": "class",
3359
- "description": "",
3360
- "name": "HeadlessSdkController",
3361
- "members": [
3362
- {
3363
- "kind": "field",
3364
- "name": "host",
3365
- "type": {
3366
- "text": "PrimerCheckoutType"
3367
- }
3368
- },
3369
- {
3370
- "kind": "field",
3371
- "name": "sdkInstanceTask",
3372
- "type": {
3373
- "text": "Task<\n [string | null, PrimerCheckoutOptions | null],\n PrimerHeadlessCheckout | null\n >"
3374
- },
3375
- "privacy": "private",
3376
- "default": "new Task(host, { args: () => [this.host.clientToken, this.host.options] as const, task: this.initializeHeadless(), })"
3377
- },
3378
- {
3379
- "kind": "field",
3380
- "name": "createPaymentMethodManager",
3381
- "type": {
3382
- "text": "CreatePaymentMethodManager | null"
3383
- },
3384
- "privacy": "private",
3385
- "default": "null"
3386
- },
3387
- {
3388
- "kind": "field",
3389
- "name": "_paymentsList",
3390
- "type": {
3391
- "text": "PaymentMethodInfo[]"
3392
- },
3393
- "privacy": "private",
3394
- "default": "[]"
3395
- },
3396
- {
3397
- "kind": "field",
3398
- "name": "currentSdkInstance",
3399
- "type": {
3400
- "text": "PrimerHeadlessCheckout | null"
3401
- },
3402
- "privacy": "private",
3403
- "default": "null"
3404
- },
3405
- {
3406
- "kind": "field",
3407
- "name": "primerJS",
3408
- "type": {
3409
- "text": "PrimerJS | null"
3410
- },
3411
- "privacy": "private",
3412
- "default": "null"
3413
- },
3414
- {
3415
- "kind": "field",
3416
- "name": "loadingTimeout",
3417
- "type": {
3418
- "text": "ReturnType<typeof setTimeout> | null"
3419
- },
3420
- "privacy": "private",
3421
- "default": "null"
3422
- },
3423
- {
3424
- "kind": "field",
3425
- "name": "isDisconnected",
3426
- "type": {
3427
- "text": "boolean"
3428
- },
3429
- "privacy": "private",
3430
- "default": "false"
3431
- },
3432
- {
3433
- "kind": "field",
3434
- "name": "paymentsList",
3435
- "type": {
3436
- "text": "PaymentMethodInfo[]"
3437
- }
3438
- },
3439
- {
3440
- "kind": "field",
3441
- "name": "primerJSInstance",
3442
- "type": {
3443
- "text": "PrimerJS | null"
3444
- },
3445
- "readonly": true
3446
- },
3447
- {
3448
- "kind": "method",
3449
- "name": "hostConnected",
3450
- "return": {
3451
- "type": {
3452
- "text": "void"
3453
- }
3454
- }
3455
- },
3456
- {
3457
- "kind": "method",
3458
- "name": "hostDisconnected",
3459
- "return": {
3460
- "type": {
3461
- "text": "void"
3462
- }
3463
- }
3464
- },
3465
- {
3466
- "kind": "method",
3467
- "name": "normalizeOptionsForLegacySdk",
3468
- "privacy": "private",
3469
- "return": {
3470
- "type": {
3471
- "text": "PrimerCheckoutOptions"
3472
- }
3473
- },
3474
- "parameters": [
3475
- {
3246
+ "kind": "variable",
3247
+ "name": "cardNetworksContext"
3248
+ }
3249
+ ],
3250
+ "exports": [
3251
+ {
3252
+ "kind": "js",
3253
+ "name": "cardNetworksContext",
3254
+ "declaration": {
3255
+ "name": "cardNetworksContext",
3256
+ "module": "src/contexts/card-networks-context.ts"
3257
+ }
3258
+ }
3259
+ ]
3260
+ },
3261
+ {
3262
+ "kind": "javascript-module",
3263
+ "path": "src/contexts/client-options-context.ts",
3264
+ "declarations": [
3265
+ {
3266
+ "kind": "variable",
3267
+ "name": "clientOptionsContext"
3268
+ }
3269
+ ],
3270
+ "exports": [
3271
+ {
3272
+ "kind": "js",
3273
+ "name": "clientOptionsContext",
3274
+ "declaration": {
3275
+ "name": "clientOptionsContext",
3276
+ "module": "src/contexts/client-options-context.ts"
3277
+ }
3278
+ }
3279
+ ]
3280
+ },
3281
+ {
3282
+ "kind": "javascript-module",
3283
+ "path": "src/contexts/computed-styles-context.ts",
3284
+ "declarations": [
3285
+ {
3286
+ "kind": "variable",
3287
+ "name": "computedStylesContext"
3288
+ }
3289
+ ],
3290
+ "exports": [
3291
+ {
3292
+ "kind": "js",
3293
+ "name": "computedStylesContext",
3294
+ "declaration": {
3295
+ "name": "computedStylesContext",
3296
+ "module": "src/contexts/computed-styles-context.ts"
3297
+ }
3298
+ }
3299
+ ]
3300
+ },
3301
+ {
3302
+ "kind": "javascript-module",
3303
+ "path": "src/contexts/configuration-context.ts",
3304
+ "declarations": [
3305
+ {
3306
+ "kind": "variable",
3307
+ "name": "configurationContext"
3308
+ }
3309
+ ],
3310
+ "exports": [
3311
+ {
3312
+ "kind": "js",
3313
+ "name": "configurationContext",
3314
+ "declaration": {
3315
+ "name": "configurationContext",
3316
+ "module": "src/contexts/configuration-context.ts"
3317
+ }
3318
+ }
3319
+ ]
3320
+ },
3321
+ {
3322
+ "kind": "javascript-module",
3323
+ "path": "src/contexts/events-context.ts",
3324
+ "declarations": [
3325
+ {
3326
+ "kind": "variable",
3327
+ "name": "eventsContext"
3328
+ }
3329
+ ],
3330
+ "exports": [
3331
+ {
3332
+ "kind": "js",
3333
+ "name": "eventsContext",
3334
+ "declaration": {
3335
+ "name": "eventsContext",
3336
+ "module": "src/contexts/events-context.ts"
3337
+ }
3338
+ }
3339
+ ]
3340
+ },
3341
+ {
3342
+ "kind": "javascript-module",
3343
+ "path": "src/contexts/headless-utils-context.ts",
3344
+ "declarations": [
3345
+ {
3346
+ "kind": "variable",
3347
+ "name": "headlessUtilsContext"
3348
+ }
3349
+ ],
3350
+ "exports": [
3351
+ {
3352
+ "kind": "js",
3353
+ "name": "headlessUtilsContext",
3354
+ "declaration": {
3355
+ "name": "headlessUtilsContext",
3356
+ "module": "src/contexts/headless-utils-context.ts"
3357
+ }
3358
+ }
3359
+ ]
3360
+ },
3361
+ {
3362
+ "kind": "javascript-module",
3363
+ "path": "src/contexts/klarna-categories-context.ts",
3364
+ "declarations": [
3365
+ {
3366
+ "kind": "variable",
3367
+ "name": "klarnaCategoriesContext"
3368
+ }
3369
+ ],
3370
+ "exports": [
3371
+ {
3372
+ "kind": "js",
3373
+ "name": "klarnaCategoriesContext",
3374
+ "declaration": {
3375
+ "name": "klarnaCategoriesContext",
3376
+ "module": "src/contexts/klarna-categories-context.ts"
3377
+ }
3378
+ }
3379
+ ]
3380
+ },
3381
+ {
3382
+ "kind": "javascript-module",
3383
+ "path": "src/contexts/payment-manager-context.ts",
3384
+ "declarations": [
3385
+ {
3386
+ "kind": "variable",
3387
+ "name": "paymentManagerContext"
3388
+ }
3389
+ ],
3390
+ "exports": [
3391
+ {
3392
+ "kind": "js",
3393
+ "name": "paymentManagerContext",
3394
+ "declaration": {
3395
+ "name": "paymentManagerContext",
3396
+ "module": "src/contexts/payment-manager-context.ts"
3397
+ }
3398
+ }
3399
+ ]
3400
+ },
3401
+ {
3402
+ "kind": "javascript-module",
3403
+ "path": "src/contexts/payment-methods-context.ts",
3404
+ "declarations": [
3405
+ {
3406
+ "kind": "variable",
3407
+ "name": "paymentMethodsContext"
3408
+ }
3409
+ ],
3410
+ "exports": [
3411
+ {
3412
+ "kind": "js",
3413
+ "name": "paymentMethodsContext",
3414
+ "declaration": {
3415
+ "name": "paymentMethodsContext",
3416
+ "module": "src/contexts/payment-methods-context.ts"
3417
+ }
3418
+ }
3419
+ ]
3420
+ },
3421
+ {
3422
+ "kind": "javascript-module",
3423
+ "path": "src/contexts/payments-objects.ts",
3424
+ "declarations": [],
3425
+ "exports": [
3426
+ {
3427
+ "kind": "js",
3428
+ "name": "VaultedPaymentMethodSummary",
3429
+ "declaration": {
3430
+ "name": "VaultedPaymentMethodSummary",
3431
+ "module": "src/contexts/payments-objects.ts"
3432
+ }
3433
+ }
3434
+ ]
3435
+ },
3436
+ {
3437
+ "kind": "javascript-module",
3438
+ "path": "src/contexts/sdk-state-context.ts",
3439
+ "declarations": [
3440
+ {
3441
+ "kind": "variable",
3442
+ "name": "sdkStateContext"
3443
+ }
3444
+ ],
3445
+ "exports": [
3446
+ {
3447
+ "kind": "js",
3448
+ "name": "sdkStateContext",
3449
+ "declaration": {
3450
+ "name": "sdkStateContext",
3451
+ "module": "src/contexts/sdk-state-context.ts"
3452
+ }
3453
+ }
3454
+ ]
3455
+ },
3456
+ {
3457
+ "kind": "javascript-module",
3458
+ "path": "src/contexts/types.ts",
3459
+ "declarations": [],
3460
+ "exports": []
3461
+ },
3462
+ {
3463
+ "kind": "javascript-module",
3464
+ "path": "src/contexts/vault-item-context.ts",
3465
+ "declarations": [
3466
+ {
3467
+ "kind": "variable",
3468
+ "name": "vaultItemContext"
3469
+ }
3470
+ ],
3471
+ "exports": [
3472
+ {
3473
+ "kind": "js",
3474
+ "name": "vaultItemContext",
3475
+ "declaration": {
3476
+ "name": "vaultItemContext",
3477
+ "module": "src/contexts/vault-item-context.ts"
3478
+ }
3479
+ }
3480
+ ]
3481
+ },
3482
+ {
3483
+ "kind": "javascript-module",
3484
+ "path": "src/contexts/vault-manager-context.ts",
3485
+ "declarations": [
3486
+ {
3487
+ "kind": "variable",
3488
+ "name": "vaultManagerContext"
3489
+ }
3490
+ ],
3491
+ "exports": [
3492
+ {
3493
+ "kind": "js",
3494
+ "name": "vaultManagerContext",
3495
+ "declaration": {
3496
+ "name": "vaultManagerContext",
3497
+ "module": "src/contexts/vault-manager-context.ts"
3498
+ }
3499
+ }
3500
+ ]
3501
+ },
3502
+ {
3503
+ "kind": "javascript-module",
3504
+ "path": "src/controllers/card-network-controller.ts",
3505
+ "declarations": [
3506
+ {
3507
+ "kind": "class",
3508
+ "description": "CardNetworkController manages and processes card network data\n\nThis controller is responsible for:\n- Handling card network change events\n- Processing detected and selectable card networks\n- Maintaining card network state",
3509
+ "name": "CardNetworkController",
3510
+ "members": [
3511
+ {
3512
+ "kind": "field",
3513
+ "name": "host",
3514
+ "type": {
3515
+ "text": "PrimerCheckoutType"
3516
+ },
3517
+ "privacy": "private"
3518
+ },
3519
+ {
3520
+ "kind": "method",
3521
+ "name": "hostConnected",
3522
+ "return": {
3523
+ "type": {
3524
+ "text": "void"
3525
+ }
3526
+ }
3527
+ },
3528
+ {
3529
+ "kind": "method",
3530
+ "name": "setCardNetworksLoading",
3531
+ "return": {
3532
+ "type": {
3533
+ "text": "void"
3534
+ }
3535
+ },
3536
+ "description": "Sets the card networks to loading state"
3537
+ },
3538
+ {
3539
+ "kind": "method",
3540
+ "name": "updateCardNetworksState",
3541
+ "privacy": "private",
3542
+ "return": {
3543
+ "type": {
3544
+ "text": "void"
3545
+ }
3546
+ },
3547
+ "parameters": [
3548
+ {
3549
+ "name": "cardNetworks",
3550
+ "type": {
3551
+ "text": "CardNetworksContextType"
3552
+ },
3553
+ "description": "The new card networks context"
3554
+ }
3555
+ ],
3556
+ "description": "Updates card networks state and dispatches events"
3557
+ },
3558
+ {
3559
+ "kind": "method",
3560
+ "name": "processCardNetworkChangeEvent",
3561
+ "return": {
3562
+ "type": {
3563
+ "text": "void"
3564
+ }
3565
+ },
3566
+ "parameters": [
3567
+ {
3568
+ "name": "event",
3569
+ "type": {
3570
+ "text": "CardNetworkChangeEvent"
3571
+ },
3572
+ "description": "The card network change event"
3573
+ }
3574
+ ],
3575
+ "description": "Processes a card network change event"
3576
+ },
3577
+ {
3578
+ "kind": "method",
3579
+ "name": "processBinDataAvailableEvent",
3580
+ "return": {
3581
+ "type": {
3582
+ "text": "void"
3583
+ }
3584
+ },
3585
+ "parameters": [
3586
+ {
3587
+ "name": "event",
3588
+ "type": {
3589
+ "text": "BinDataAvailableEvent"
3590
+ }
3591
+ }
3592
+ ]
3593
+ }
3594
+ ]
3595
+ }
3596
+ ],
3597
+ "exports": [
3598
+ {
3599
+ "kind": "js",
3600
+ "name": "CardNetworkController",
3601
+ "declaration": {
3602
+ "name": "CardNetworkController",
3603
+ "module": "src/controllers/card-network-controller.ts"
3604
+ }
3605
+ }
3606
+ ]
3607
+ },
3608
+ {
3609
+ "kind": "javascript-module",
3610
+ "path": "src/controllers/headless-sdk-controller.ts",
3611
+ "declarations": [
3612
+ {
3613
+ "kind": "class",
3614
+ "description": "",
3615
+ "name": "HeadlessSdkController",
3616
+ "members": [
3617
+ {
3618
+ "kind": "field",
3619
+ "name": "host",
3620
+ "type": {
3621
+ "text": "PrimerCheckoutType"
3622
+ }
3623
+ },
3624
+ {
3625
+ "kind": "field",
3626
+ "name": "sdkInstanceTask",
3627
+ "type": {
3628
+ "text": "Task<\n [string | null, PrimerCheckoutOptions | null],\n PrimerHeadlessCheckout | null\n >"
3629
+ },
3630
+ "privacy": "private",
3631
+ "default": "new Task(host, { args: () => [this.host.clientToken, this.host.options] as const, task: this.initializeHeadless(), })"
3632
+ },
3633
+ {
3634
+ "kind": "field",
3635
+ "name": "createPaymentMethodManager",
3636
+ "type": {
3637
+ "text": "CreatePaymentMethodManager | null"
3638
+ },
3639
+ "privacy": "private",
3640
+ "default": "null"
3641
+ },
3642
+ {
3643
+ "kind": "field",
3644
+ "name": "_paymentsList",
3645
+ "type": {
3646
+ "text": "PaymentMethodInfo[]"
3647
+ },
3648
+ "privacy": "private",
3649
+ "default": "[]"
3650
+ },
3651
+ {
3652
+ "kind": "field",
3653
+ "name": "currentSdkInstance",
3654
+ "type": {
3655
+ "text": "PrimerHeadlessCheckout | null"
3656
+ },
3657
+ "privacy": "private",
3658
+ "default": "null"
3659
+ },
3660
+ {
3661
+ "kind": "field",
3662
+ "name": "primerJS",
3663
+ "type": {
3664
+ "text": "PrimerJS | null"
3665
+ },
3666
+ "privacy": "private",
3667
+ "default": "null"
3668
+ },
3669
+ {
3670
+ "kind": "field",
3671
+ "name": "loadingTimeout",
3672
+ "type": {
3673
+ "text": "ReturnType<typeof setTimeout> | null"
3674
+ },
3675
+ "privacy": "private",
3676
+ "default": "null"
3677
+ },
3678
+ {
3679
+ "kind": "field",
3680
+ "name": "isDisconnected",
3681
+ "type": {
3682
+ "text": "boolean"
3683
+ },
3684
+ "privacy": "private",
3685
+ "default": "false"
3686
+ },
3687
+ {
3688
+ "kind": "field",
3689
+ "name": "paymentsList",
3690
+ "type": {
3691
+ "text": "PaymentMethodInfo[]"
3692
+ }
3693
+ },
3694
+ {
3695
+ "kind": "field",
3696
+ "name": "primerJSInstance",
3697
+ "type": {
3698
+ "text": "PrimerJS | null"
3699
+ },
3700
+ "readonly": true
3701
+ },
3702
+ {
3703
+ "kind": "method",
3704
+ "name": "hostConnected",
3705
+ "return": {
3706
+ "type": {
3707
+ "text": "void"
3708
+ }
3709
+ }
3710
+ },
3711
+ {
3712
+ "kind": "method",
3713
+ "name": "hostDisconnected",
3714
+ "return": {
3715
+ "type": {
3716
+ "text": "void"
3717
+ }
3718
+ }
3719
+ },
3720
+ {
3721
+ "kind": "method",
3722
+ "name": "normalizeOptionsForLegacySdk",
3723
+ "privacy": "private",
3724
+ "return": {
3725
+ "type": {
3726
+ "text": "PrimerCheckoutOptions"
3727
+ }
3728
+ },
3729
+ "parameters": [
3730
+ {
3476
3731
  "name": "options",
3477
3732
  "type": {
3478
3733
  "text": "PrimerCheckoutOptions"
@@ -3573,7 +3828,7 @@
3573
3828
  "name": "handlePaymentStart",
3574
3829
  "return": {
3575
3830
  "type": {
3576
- "text": "void"
3831
+ "text": ""
3577
3832
  }
3578
3833
  },
3579
3834
  "parameters": [
@@ -3588,9 +3843,15 @@
3588
3843
  "type": {
3589
3844
  "text": "PaymentMethodType"
3590
3845
  }
3846
+ },
3847
+ {
3848
+ "name": "handler",
3849
+ "type": {
3850
+ "text": "PrepareHandler"
3851
+ }
3591
3852
  }
3592
3853
  ],
3593
- "description": "Handle common payment start logic including reattempt tracking.\nCentralizes state updates and analytics for payment initiation."
3854
+ "description": "Handle common payment start logic including reattempt tracking.\nCentralizes state updates, event dispatching, and analytics for payment initiation."
3594
3855
  },
3595
3856
  {
3596
3857
  "kind": "function",
@@ -3767,7 +4028,7 @@
3767
4028
  {
3768
4029
  "name": "paymentMethods",
3769
4030
  "type": {
3770
- "text": "InitializedPayments"
4031
+ "text": "InitializedPaymentMethod[]"
3771
4032
  }
3772
4033
  }
3773
4034
  ]
@@ -3892,6 +4153,18 @@
3892
4153
  }
3893
4154
  ]
3894
4155
  },
4156
+ {
4157
+ "kind": "method",
4158
+ "name": "dispatchPaymentCancel",
4159
+ "parameters": [
4160
+ {
4161
+ "name": "data",
4162
+ "type": {
4163
+ "text": "{ paymentMethodType: PaymentMethodType | null }"
4164
+ }
4165
+ }
4166
+ ]
4167
+ },
3895
4168
  {
3896
4169
  "kind": "method",
3897
4170
  "name": "handleExternalCardSubmit",
@@ -3916,10 +4189,24 @@
3916
4189
  "name": "dispatchPaymentStart",
3917
4190
  "return": {
3918
4191
  "type": {
3919
- "text": "void"
4192
+ "text": ""
3920
4193
  }
3921
4194
  },
3922
- "description": "Dispatch payment start event.\nCalled when payment flow begins."
4195
+ "parameters": [
4196
+ {
4197
+ "name": "paymentMethodType",
4198
+ "type": {
4199
+ "text": "PaymentMethodType"
4200
+ }
4201
+ },
4202
+ {
4203
+ "name": "handler",
4204
+ "type": {
4205
+ "text": "PrepareHandler"
4206
+ }
4207
+ }
4208
+ ],
4209
+ "description": "Dispatch payment start event.\nCalled when payment flow begins, before payment creation.\n\nEvent detail includes handlers to control the payment flow:\n- abortPaymentCreation: Call to abort the payment\n- continuePaymentCreation: Call to continue (optionally with idempotencyKey)"
3923
4210
  },
3924
4211
  {
3925
4212
  "kind": "method",
@@ -3988,9 +4275,16 @@
3988
4275
  {
3989
4276
  "name": "vaultedPayments",
3990
4277
  "type": {
3991
- "text": "InitializedVaultedPayments"
4278
+ "text": "VaultedPaymentMethodSummary[]"
3992
4279
  },
3993
- "description": "Wrapper containing filtered vaulted payment methods"
4280
+ "description": "Array of filtered vaulted payment method summaries"
4281
+ },
4282
+ {
4283
+ "name": "cvvRecapture",
4284
+ "type": {
4285
+ "text": "boolean"
4286
+ },
4287
+ "description": "Whether CVV recapture is required for vaulted payments"
3994
4288
  }
3995
4289
  ],
3996
4290
  "description": "Dispatch vault methods update event.\nCalled when vaulted payment methods are loaded or updated."
@@ -4152,7 +4446,7 @@
4152
4446
  "kind": "field",
4153
4447
  "name": "paymentMethods",
4154
4448
  "type": {
4155
- "text": "InitializedPayments | null"
4449
+ "text": "InitializedPaymentMethod[] | null"
4156
4450
  },
4157
4451
  "privacy": "private",
4158
4452
  "default": "null"
@@ -4193,7 +4487,7 @@
4193
4487
  "text": "() => void | undefined"
4194
4488
  },
4195
4489
  "privacy": "public",
4196
- "description": "Called when payment flow begins.\nUse for analytics tracking or UI updates (e.g., disable form)."
4490
+ "deprecated": "Use the `primer:payment-start` event instead.\n\nListen to the event on the checkout element:\n```typescript\ncheckout.addEventListener('primer:payment-start', (e) => {\nanalytics.track('payment_started');\ndisablePaymentForm();\n});\n```"
4197
4491
  },
4198
4492
  {
4199
4493
  "kind": "field",
@@ -4202,17 +4496,7 @@
4202
4496
  "text": "(\n data: PaymentData,\n handler: PrepareHandler,\n ) => void | undefined"
4203
4497
  },
4204
4498
  "privacy": "public",
4205
- "description": "Called before payment creation for validation or abort control flow.\nUse for last-chance validation or conditional payment creation.",
4206
- "parameters": [
4207
- {
4208
- "description": "Payment method information",
4209
- "name": "data"
4210
- },
4211
- {
4212
- "description": "Control flow handler (continue or abort)",
4213
- "name": "handler"
4214
- }
4215
- ]
4499
+ "deprecated": "Use the `primer:payment-start` event instead.\n\nListen to the event on the checkout element:\n```typescript\ncheckout.addEventListener('primer:payment-start', (e) => {\nconst { paymentMethodType, abortPaymentCreation, continuePaymentCreation } = e.detail;\n\nif (!validateBusinessRules(paymentMethodType)) {\nabortPaymentCreation();\nreturn;\n}\ncontinuePaymentCreation({ idempotencyKey: 'optional-key' });\n});\n```"
4216
4500
  },
4217
4501
  {
4218
4502
  "kind": "field",
@@ -4221,13 +4505,7 @@
4221
4505
  "text": "(data: PaymentSuccessData) => void | undefined"
4222
4506
  },
4223
4507
  "privacy": "public",
4224
- "description": "Called when payment completes successfully.\nReceives minimal payment summary with reduced PII exposure.\n\nUse for:\n- Order confirmation and backend sync\n- Receipt generation\n- Payment processing with minimal PII exposure",
4225
- "parameters": [
4226
- {
4227
- "description": "Payment success data with PaymentSummary (ID, orderId, last4, brand)",
4228
- "name": "data"
4229
- }
4230
- ]
4508
+ "deprecated": "Use the `primer:payment-success` event instead.\n\nListen to the event on the checkout element:\n```typescript\ncheckout.addEventListener('primer:payment-success', (e) => {\nconst { payment, paymentMethodType } = e.detail;\n\n// Update backend\nawait fetch(`/api/orders/${payment.orderId}/complete`, {\nmethod: 'POST',\nbody: JSON.stringify({ paymentId: payment.id }),\n});\n\n// Redirect to success page\nwindow.location.href = `/order-success?id=${payment.orderId}`;\n});\n```"
4231
4509
  },
4232
4510
  {
4233
4511
  "kind": "field",
@@ -4236,13 +4514,7 @@
4236
4514
  "text": "(data: PaymentFailureData) => void | undefined"
4237
4515
  },
4238
4516
  "privacy": "public",
4239
- "description": "Called when payment fails or is declined.\nReceives error details and optional payment summary if created before failure.\n\nUse for:\n- Error handling and user messaging\n- Support ticket creation with diagnosticsId\n- Retry logic for specific error types",
4240
- "parameters": [
4241
- {
4242
- "description": "Payment failure data with error details and optional PaymentSummary",
4243
- "name": "data"
4244
- }
4245
- ]
4517
+ "deprecated": "Use the `primer:payment-failure` event instead.\n\nListen to the event on the checkout element:\n```typescript\ncheckout.addEventListener('primer:payment-failure', (e) => {\nconst { error, payment } = e.detail;\nconsole.error('Payment failed:', error.code, error.message);\n\n// Log to error tracking\nSentry.captureException(new Error(error.message), {\nextra: {\ndiagnosticsId: error.diagnosticsId,\npaymentId: payment?.id,\n},\n});\n\n// Show user-friendly message\nshowErrorMessage(error.message);\n});\n```"
4246
4518
  },
4247
4519
  {
4248
4520
  "kind": "field",
@@ -4251,13 +4523,7 @@
4251
4523
  "text": "(data: VaultedMethodsUpdateData) => void | undefined"
4252
4524
  },
4253
4525
  "privacy": "public",
4254
- "description": "Called when vaulted payment methods are loaded or updated.\nReceives filtered vaulted payment method data with minimal PII exposure.\n\nUse for:\n- Building custom vault UI\n- Determining if CVV recapture is required (check cvvRecapture flag)\n- Analytics tracking for vault usage\n- Syncing vault state with backend",
4255
- "parameters": [
4256
- {
4257
- "description": "Vault methods update data with filtered payment methods and cvvRecapture flag",
4258
- "name": "data"
4259
- }
4260
- ]
4526
+ "deprecated": "Use the `primer:vault-methods-update` event instead.\n\nListen to the event on the checkout element:\n```typescript\ncheckout.addEventListener('primer:vault-methods-update', (e) => {\nconst { vaultedPayments } = e.detail;\nconsole.log(`Vault contains ${vaultedPayments.length} methods`);\n\n// Display in custom UI\nvaultedPayments.forEach(method => {\ndisplayVaultedMethod({\nid: method.id,\ntype: method.paymentMethodType,\nlast4: method.paymentInstrumentData?.last4Digits,\nnetwork: method.paymentInstrumentData?.network,\n});\n});\n});\n```"
4261
4527
  },
4262
4528
  {
4263
4529
  "kind": "method",
@@ -4528,7 +4794,7 @@
4528
4794
  {
4529
4795
  "name": "value",
4530
4796
  "type": {
4531
- "text": "InitializedPayments"
4797
+ "text": "InitializedPaymentMethod[]"
4532
4798
  },
4533
4799
  "description": "The new payment methods data."
4534
4800
  }
@@ -4958,214 +5224,19 @@
4958
5224
  {
4959
5225
  "name": "action",
4960
5226
  "type": {
4961
- "text": "Action"
4962
- }
4963
- }
4964
- ],
4965
- "inheritedFrom": {
4966
- "name": "ReactiveStateController",
4967
- "module": "src/controllers/reactive-state/index.ts"
4968
- }
4969
- },
4970
- {
4971
- "kind": "method",
4972
- "name": "setCallbacks",
4973
- "privacy": "protected",
4974
- "return": {
4975
- "type": {
4976
- "text": "void"
4977
- }
4978
- },
4979
- "parameters": [
4980
- {
4981
- "name": "callbacks",
4982
- "type": {
4983
- "text": "Partial<Callbacks>"
4984
- }
4985
- }
4986
- ],
4987
- "inheritedFrom": {
4988
- "name": "ReactiveStateController",
4989
- "module": "src/controllers/reactive-state/index.ts"
4990
- }
4991
- },
4992
- {
4993
- "kind": "method",
4994
- "name": "hostConnected",
4995
- "return": {
4996
- "type": {
4997
- "text": "void"
4998
- }
4999
- },
5000
- "inheritedFrom": {
5001
- "name": "ReactiveStateController",
5002
- "module": "src/controllers/reactive-state/index.ts"
5003
- }
5004
- },
5005
- {
5006
- "kind": "method",
5007
- "name": "hostDisconnected",
5008
- "return": {
5009
- "type": {
5010
- "text": "void"
5011
- }
5012
- },
5013
- "inheritedFrom": {
5014
- "name": "ReactiveStateController",
5015
- "module": "src/controllers/reactive-state/index.ts"
5016
- }
5017
- }
5018
- ],
5019
- "superclass": {
5020
- "name": "ReactiveStateController",
5021
- "module": "/src/controllers/reactive-state"
5022
- }
5023
- }
5024
- ],
5025
- "exports": [
5026
- {
5027
- "kind": "js",
5028
- "name": "initialSDKState",
5029
- "declaration": {
5030
- "name": "initialSDKState",
5031
- "module": "src/controllers/sdk-state-controller.ts"
5032
- }
5033
- },
5034
- {
5035
- "kind": "js",
5036
- "name": "SdkStateController",
5037
- "declaration": {
5038
- "name": "SdkStateController",
5039
- "module": "src/controllers/sdk-state-controller.ts"
5040
- }
5041
- }
5042
- ]
5043
- },
5044
- {
5045
- "kind": "javascript-module",
5046
- "path": "src/controllers/style-processing-controller.ts",
5047
- "declarations": [
5048
- {
5049
- "kind": "class",
5050
- "description": "Controller that handles processing and application of custom styles to Lit components.\nSafely converts JSON style objects to CSS variables applied to the host element.",
5051
- "name": "StyleProcessingController",
5052
- "members": [
5053
- {
5054
- "kind": "field",
5055
- "name": "host",
5056
- "type": {
5057
- "text": "ReactiveControllerHost & LitElement"
5058
- }
5059
- },
5060
- {
5061
- "kind": "field",
5062
- "name": "cssVarCache",
5063
- "privacy": "private",
5064
- "static": true,
5065
- "default": "new Map<string, string>()"
5066
- },
5067
- {
5068
- "kind": "method",
5069
- "name": "processCustomStyles",
5070
- "return": {
5071
- "type": {
5072
- "text": "void"
5073
- }
5074
- },
5075
- "parameters": [
5076
- {
5077
- "name": "jsonString",
5078
- "type": {
5079
- "text": "string"
5080
- },
5081
- "description": "The JSON string representing custom styles."
5082
- }
5083
- ],
5084
- "description": "Processes the customStyles JSON string.\nExpected JSON contains only CSS variable properties in camelCase."
5085
- },
5086
- {
5087
- "kind": "method",
5088
- "name": "isValidCssProperty",
5089
- "privacy": "private",
5090
- "return": {
5091
- "type": {
5092
- "text": ""
5093
- }
5094
- },
5095
- "parameters": [
5096
- {
5097
- "name": "property",
5098
- "type": {
5099
- "text": "string"
5100
- },
5101
- "description": "The CSS property name to validate."
5102
- }
5103
- ],
5104
- "description": "Validates a CSS property name to ensure it follows expected patterns."
5105
- },
5106
- {
5107
- "kind": "method",
5108
- "name": "isValidCssValue",
5109
- "privacy": "private",
5110
- "return": {
5111
- "type": {
5112
- "text": ""
5113
- }
5114
- },
5115
- "parameters": [
5116
- {
5117
- "name": "value",
5118
- "type": {
5119
- "text": "string"
5120
- },
5121
- "description": "The CSS value to validate."
5122
- }
5123
- ],
5124
- "description": "Validates a CSS value to ensure it only contains safe, expected characters.\nAllowed characters include alphanumerics, whitespace, and common CSS punctuation.\nThis helps prevent CSS injection attacks."
5125
- },
5126
- {
5127
- "kind": "method",
5128
- "name": "getCssVarName",
5129
- "privacy": "private",
5130
- "return": {
5131
- "type": {
5132
- "text": ""
5133
- }
5134
- },
5135
- "parameters": [
5136
- {
5137
- "name": "key",
5138
- "type": {
5139
- "text": "string"
5140
- },
5141
- "description": "The camelCase property key"
5142
- }
5143
- ],
5144
- "description": "Gets the CSS variable name for a camelCase property key.\nUses caching for performance."
5145
- },
5146
- {
5147
- "kind": "method",
5148
- "name": "applyStyles",
5149
- "privacy": "private",
5150
- "return": {
5151
- "type": {
5152
- "text": "void"
5153
- }
5154
- },
5155
- "parameters": [
5156
- {
5157
- "name": "styles",
5158
- "type": {
5159
- "text": "StylesObject"
5160
- },
5161
- "description": "An object with style keys and corresponding CSS values."
5227
+ "text": "Action"
5228
+ }
5162
5229
  }
5163
5230
  ],
5164
- "description": "Transforms a styles object into CSS variables and applies them to the host element.\nEach key (in camelCase) is converted into a kebab-case CSS variable prefixed with '--'.\nOnly valid CSS properties and values are applied."
5231
+ "inheritedFrom": {
5232
+ "name": "ReactiveStateController",
5233
+ "module": "src/controllers/reactive-state/index.ts"
5234
+ }
5165
5235
  },
5166
5236
  {
5167
5237
  "kind": "method",
5168
- "name": "removeStyle",
5238
+ "name": "setCallbacks",
5239
+ "privacy": "protected",
5169
5240
  "return": {
5170
5241
  "type": {
5171
5242
  "text": "void"
@@ -5173,24 +5244,29 @@
5173
5244
  },
5174
5245
  "parameters": [
5175
5246
  {
5176
- "name": "key",
5247
+ "name": "callbacks",
5177
5248
  "type": {
5178
- "text": "string"
5179
- },
5180
- "description": "The camelCase property key to remove"
5249
+ "text": "Partial<Callbacks>"
5250
+ }
5181
5251
  }
5182
5252
  ],
5183
- "description": "Removes a specific CSS variable from the host element"
5253
+ "inheritedFrom": {
5254
+ "name": "ReactiveStateController",
5255
+ "module": "src/controllers/reactive-state/index.ts"
5256
+ }
5184
5257
  },
5185
5258
  {
5186
5259
  "kind": "method",
5187
- "name": "clearAllStyles",
5260
+ "name": "hostConnected",
5188
5261
  "return": {
5189
5262
  "type": {
5190
5263
  "text": "void"
5191
5264
  }
5192
5265
  },
5193
- "description": "Removes all custom styles from the host element"
5266
+ "inheritedFrom": {
5267
+ "name": "ReactiveStateController",
5268
+ "module": "src/controllers/reactive-state/index.ts"
5269
+ }
5194
5270
  },
5195
5271
  {
5196
5272
  "kind": "method",
@@ -5200,360 +5276,197 @@
5200
5276
  "text": "void"
5201
5277
  }
5202
5278
  },
5203
- "description": "Optional cleanup when the host is disconnected"
5279
+ "inheritedFrom": {
5280
+ "name": "ReactiveStateController",
5281
+ "module": "src/controllers/reactive-state/index.ts"
5282
+ }
5204
5283
  }
5205
- ]
5206
- }
5207
- ],
5208
- "exports": [
5209
- {
5210
- "kind": "js",
5211
- "name": "StyleProcessingController",
5212
- "declaration": {
5213
- "name": "StyleProcessingController",
5214
- "module": "src/controllers/style-processing-controller.ts"
5215
- }
5216
- }
5217
- ]
5218
- },
5219
- {
5220
- "kind": "javascript-module",
5221
- "path": "src/contexts/analytics-context.ts",
5222
- "declarations": [
5223
- {
5224
- "kind": "variable",
5225
- "name": "analyticsContext"
5226
- }
5227
- ],
5228
- "exports": [
5229
- {
5230
- "kind": "js",
5231
- "name": "analyticsContext",
5232
- "declaration": {
5233
- "name": "analyticsContext",
5234
- "module": "src/contexts/analytics-context.ts"
5235
- }
5236
- }
5237
- ]
5238
- },
5239
- {
5240
- "kind": "javascript-module",
5241
- "path": "src/contexts/card-networks-context.ts",
5242
- "declarations": [
5243
- {
5244
- "kind": "variable",
5245
- "name": "cardNetworksContext"
5246
- }
5247
- ],
5248
- "exports": [
5249
- {
5250
- "kind": "js",
5251
- "name": "cardNetworksContext",
5252
- "declaration": {
5253
- "name": "cardNetworksContext",
5254
- "module": "src/contexts/card-networks-context.ts"
5255
- }
5256
- }
5257
- ]
5258
- },
5259
- {
5260
- "kind": "javascript-module",
5261
- "path": "src/contexts/client-options-context.ts",
5262
- "declarations": [
5263
- {
5264
- "kind": "variable",
5265
- "name": "clientOptionsContext"
5266
- }
5267
- ],
5268
- "exports": [
5269
- {
5270
- "kind": "js",
5271
- "name": "clientOptionsContext",
5272
- "declaration": {
5273
- "name": "clientOptionsContext",
5274
- "module": "src/contexts/client-options-context.ts"
5275
- }
5276
- }
5277
- ]
5278
- },
5279
- {
5280
- "kind": "javascript-module",
5281
- "path": "src/contexts/computed-styles-context.ts",
5282
- "declarations": [
5283
- {
5284
- "kind": "variable",
5285
- "name": "computedStylesContext"
5286
- }
5287
- ],
5288
- "exports": [
5289
- {
5290
- "kind": "js",
5291
- "name": "computedStylesContext",
5292
- "declaration": {
5293
- "name": "computedStylesContext",
5294
- "module": "src/contexts/computed-styles-context.ts"
5295
- }
5296
- }
5297
- ]
5298
- },
5299
- {
5300
- "kind": "javascript-module",
5301
- "path": "src/contexts/configuration-context.ts",
5302
- "declarations": [
5303
- {
5304
- "kind": "variable",
5305
- "name": "configurationContext"
5306
- }
5307
- ],
5308
- "exports": [
5309
- {
5310
- "kind": "js",
5311
- "name": "configurationContext",
5312
- "declaration": {
5313
- "name": "configurationContext",
5314
- "module": "src/contexts/configuration-context.ts"
5315
- }
5316
- }
5317
- ]
5318
- },
5319
- {
5320
- "kind": "javascript-module",
5321
- "path": "src/contexts/events-context.ts",
5322
- "declarations": [
5323
- {
5324
- "kind": "variable",
5325
- "name": "eventsContext"
5326
- }
5327
- ],
5328
- "exports": [
5329
- {
5330
- "kind": "js",
5331
- "name": "eventsContext",
5332
- "declaration": {
5333
- "name": "eventsContext",
5334
- "module": "src/contexts/events-context.ts"
5335
- }
5336
- }
5337
- ]
5338
- },
5339
- {
5340
- "kind": "javascript-module",
5341
- "path": "src/contexts/headless-utils-context.ts",
5342
- "declarations": [
5343
- {
5344
- "kind": "variable",
5345
- "name": "headlessUtilsContext"
5346
- }
5347
- ],
5348
- "exports": [
5349
- {
5350
- "kind": "js",
5351
- "name": "headlessUtilsContext",
5352
- "declaration": {
5353
- "name": "headlessUtilsContext",
5354
- "module": "src/contexts/headless-utils-context.ts"
5355
- }
5356
- }
5357
- ]
5358
- },
5359
- {
5360
- "kind": "javascript-module",
5361
- "path": "src/contexts/klarna-categories-context.ts",
5362
- "declarations": [
5363
- {
5364
- "kind": "variable",
5365
- "name": "klarnaCategoriesContext"
5366
- }
5367
- ],
5368
- "exports": [
5369
- {
5370
- "kind": "js",
5371
- "name": "klarnaCategoriesContext",
5372
- "declaration": {
5373
- "name": "klarnaCategoriesContext",
5374
- "module": "src/contexts/klarna-categories-context.ts"
5284
+ ],
5285
+ "superclass": {
5286
+ "name": "ReactiveStateController",
5287
+ "module": "/src/controllers/reactive-state"
5375
5288
  }
5376
5289
  }
5377
- ]
5378
- },
5379
- {
5380
- "kind": "javascript-module",
5381
- "path": "src/contexts/payment-manager-context.ts",
5382
- "declarations": [
5383
- {
5384
- "kind": "variable",
5385
- "name": "paymentManagerContext"
5386
- }
5387
5290
  ],
5388
5291
  "exports": [
5389
5292
  {
5390
5293
  "kind": "js",
5391
- "name": "paymentManagerContext",
5294
+ "name": "initialSDKState",
5392
5295
  "declaration": {
5393
- "name": "paymentManagerContext",
5394
- "module": "src/contexts/payment-manager-context.ts"
5296
+ "name": "initialSDKState",
5297
+ "module": "src/controllers/sdk-state-controller.ts"
5395
5298
  }
5396
- }
5397
- ]
5398
- },
5399
- {
5400
- "kind": "javascript-module",
5401
- "path": "src/contexts/payment-methods-context.ts",
5402
- "declarations": [
5403
- {
5404
- "kind": "variable",
5405
- "name": "paymentMethodsContext"
5406
- }
5407
- ],
5408
- "exports": [
5299
+ },
5409
5300
  {
5410
5301
  "kind": "js",
5411
- "name": "paymentMethodsContext",
5302
+ "name": "SdkStateController",
5412
5303
  "declaration": {
5413
- "name": "paymentMethodsContext",
5414
- "module": "src/contexts/payment-methods-context.ts"
5304
+ "name": "SdkStateController",
5305
+ "module": "src/controllers/sdk-state-controller.ts"
5415
5306
  }
5416
5307
  }
5417
5308
  ]
5418
5309
  },
5419
5310
  {
5420
5311
  "kind": "javascript-module",
5421
- "path": "src/contexts/payments-objects.ts",
5312
+ "path": "src/controllers/style-processing-controller.ts",
5422
5313
  "declarations": [
5423
5314
  {
5424
5315
  "kind": "class",
5425
- "description": "",
5426
- "name": "InitializedPayments",
5316
+ "description": "Controller that handles processing and application of custom styles to Lit components.\nSafely converts JSON style objects to CSS variables applied to the host element.",
5317
+ "name": "StyleProcessingController",
5427
5318
  "members": [
5428
5319
  {
5429
5320
  "kind": "field",
5430
- "name": "_methods",
5321
+ "name": "host",
5431
5322
  "type": {
5432
- "text": "InitializedPaymentMethodMap"
5433
- },
5323
+ "text": "ReactiveControllerHost & LitElement"
5324
+ }
5325
+ },
5326
+ {
5327
+ "kind": "field",
5328
+ "name": "cssVarCache",
5434
5329
  "privacy": "private",
5435
- "readonly": true,
5436
- "default": "map"
5330
+ "static": true,
5331
+ "default": "new Map<string, string>()"
5437
5332
  },
5438
5333
  {
5439
5334
  "kind": "method",
5440
- "name": "get",
5335
+ "name": "processCustomStyles",
5441
5336
  "return": {
5442
5337
  "type": {
5443
- "text": "RedirectPaymentMethod | undefined"
5338
+ "text": "void"
5444
5339
  }
5445
5340
  },
5446
5341
  "parameters": [
5447
5342
  {
5448
- "name": "type",
5343
+ "name": "jsonString",
5449
5344
  "type": {
5450
- "text": "T"
5451
- }
5345
+ "text": "string"
5346
+ },
5347
+ "description": "The JSON string representing custom styles."
5452
5348
  }
5453
- ]
5349
+ ],
5350
+ "description": "Processes the customStyles JSON string.\nExpected JSON contains only CSS variable properties in camelCase."
5454
5351
  },
5455
5352
  {
5456
5353
  "kind": "method",
5457
- "name": "get",
5354
+ "name": "isValidCssProperty",
5355
+ "privacy": "private",
5458
5356
  "return": {
5459
5357
  "type": {
5460
- "text": "PaymentMethodByType<T> | undefined"
5358
+ "text": ""
5461
5359
  }
5462
5360
  },
5463
5361
  "parameters": [
5464
5362
  {
5465
- "name": "type",
5363
+ "name": "property",
5466
5364
  "type": {
5467
- "text": "T"
5468
- }
5365
+ "text": "string"
5366
+ },
5367
+ "description": "The CSS property name to validate."
5469
5368
  }
5470
- ]
5369
+ ],
5370
+ "description": "Validates a CSS property name to ensure it follows expected patterns."
5471
5371
  },
5472
5372
  {
5473
5373
  "kind": "method",
5474
- "name": "get",
5374
+ "name": "isValidCssValue",
5375
+ "privacy": "private",
5376
+ "return": {
5377
+ "type": {
5378
+ "text": ""
5379
+ }
5380
+ },
5475
5381
  "parameters": [
5476
5382
  {
5477
- "name": "type",
5383
+ "name": "value",
5478
5384
  "type": {
5479
- "text": "T"
5480
- }
5385
+ "text": "string"
5386
+ },
5387
+ "description": "The CSS value to validate."
5481
5388
  }
5482
- ]
5389
+ ],
5390
+ "description": "Validates a CSS value to ensure it only contains safe, expected characters.\nAllowed characters include alphanumerics, whitespace, and common CSS punctuation.\nThis helps prevent CSS injection attacks."
5483
5391
  },
5484
5392
  {
5485
5393
  "kind": "method",
5486
- "name": "toArray",
5394
+ "name": "getCssVarName",
5395
+ "privacy": "private",
5487
5396
  "return": {
5488
5397
  "type": {
5489
- "text": "InitializedPaymentMethod[]"
5398
+ "text": ""
5490
5399
  }
5491
- }
5400
+ },
5401
+ "parameters": [
5402
+ {
5403
+ "name": "key",
5404
+ "type": {
5405
+ "text": "string"
5406
+ },
5407
+ "description": "The camelCase property key"
5408
+ }
5409
+ ],
5410
+ "description": "Gets the CSS variable name for a camelCase property key.\nUses caching for performance."
5492
5411
  },
5493
5412
  {
5494
5413
  "kind": "method",
5495
- "name": "size",
5414
+ "name": "applyStyles",
5415
+ "privacy": "private",
5496
5416
  "return": {
5497
5417
  "type": {
5498
- "text": "number"
5418
+ "text": "void"
5499
5419
  }
5500
- }
5501
- }
5502
- ]
5503
- },
5504
- {
5505
- "kind": "class",
5506
- "description": "Wrapper class for vaulted payment methods that provides type-safe access\nto filtered vaulted payment method data.\n\nThis class mirrors the structure of InitializedPayments but for vault data,\nproviding a consistent API for merchants to access vaulted payment methods\nthrough events and callbacks.",
5507
- "name": "InitializedVaultedPayments",
5508
- "members": [
5509
- {
5510
- "kind": "field",
5511
- "name": "_methods",
5512
- "type": {
5513
- "text": "VaultedPaymentMethodsMap"
5514
5420
  },
5515
- "privacy": "private",
5516
- "readonly": true,
5517
- "default": "map"
5421
+ "parameters": [
5422
+ {
5423
+ "name": "styles",
5424
+ "type": {
5425
+ "text": "StylesObject"
5426
+ },
5427
+ "description": "An object with style keys and corresponding CSS values."
5428
+ }
5429
+ ],
5430
+ "description": "Transforms a styles object into CSS variables and applies them to the host element.\nEach key (in camelCase) is converted into a kebab-case CSS variable prefixed with '--'.\nOnly valid CSS properties and values are applied."
5518
5431
  },
5519
5432
  {
5520
5433
  "kind": "method",
5521
- "name": "get",
5434
+ "name": "removeStyle",
5522
5435
  "return": {
5523
5436
  "type": {
5524
- "text": ""
5437
+ "text": "void"
5525
5438
  }
5526
5439
  },
5527
5440
  "parameters": [
5528
5441
  {
5529
- "name": "id",
5442
+ "name": "key",
5530
5443
  "type": {
5531
5444
  "text": "string"
5532
5445
  },
5533
- "description": "Payment method ID"
5446
+ "description": "The camelCase property key to remove"
5534
5447
  }
5535
5448
  ],
5536
- "description": "Get a vaulted payment method by its ID"
5449
+ "description": "Removes a specific CSS variable from the host element"
5537
5450
  },
5538
5451
  {
5539
5452
  "kind": "method",
5540
- "name": "toArray",
5453
+ "name": "clearAllStyles",
5541
5454
  "return": {
5542
5455
  "type": {
5543
- "text": ""
5456
+ "text": "void"
5544
5457
  }
5545
5458
  },
5546
- "description": "Get all vaulted payment methods as an array"
5459
+ "description": "Removes all custom styles from the host element"
5547
5460
  },
5548
5461
  {
5549
5462
  "kind": "method",
5550
- "name": "size",
5463
+ "name": "hostDisconnected",
5551
5464
  "return": {
5552
5465
  "type": {
5553
- "text": ""
5466
+ "text": "void"
5554
5467
  }
5555
5468
  },
5556
- "description": "Get the count of vaulted payment methods"
5469
+ "description": "Optional cleanup when the host is disconnected"
5557
5470
  }
5558
5471
  ]
5559
5472
  }
@@ -5561,92 +5474,10 @@
5561
5474
  "exports": [
5562
5475
  {
5563
5476
  "kind": "js",
5564
- "name": "VaultedPaymentMethodSummary",
5565
- "declaration": {
5566
- "name": "VaultedPaymentMethodSummary",
5567
- "module": "src/contexts/payments-objects.ts"
5568
- }
5569
- },
5570
- {
5571
- "kind": "js",
5572
- "name": "InitializedPayments",
5573
- "declaration": {
5574
- "name": "InitializedPayments",
5575
- "module": "src/contexts/payments-objects.ts"
5576
- }
5577
- },
5578
- {
5579
- "kind": "js",
5580
- "name": "InitializedVaultedPayments",
5581
- "declaration": {
5582
- "name": "InitializedVaultedPayments",
5583
- "module": "src/contexts/payments-objects.ts"
5584
- }
5585
- }
5586
- ]
5587
- },
5588
- {
5589
- "kind": "javascript-module",
5590
- "path": "src/contexts/sdk-state-context.ts",
5591
- "declarations": [
5592
- {
5593
- "kind": "variable",
5594
- "name": "sdkStateContext"
5595
- }
5596
- ],
5597
- "exports": [
5598
- {
5599
- "kind": "js",
5600
- "name": "sdkStateContext",
5601
- "declaration": {
5602
- "name": "sdkStateContext",
5603
- "module": "src/contexts/sdk-state-context.ts"
5604
- }
5605
- }
5606
- ]
5607
- },
5608
- {
5609
- "kind": "javascript-module",
5610
- "path": "src/contexts/types.ts",
5611
- "declarations": [],
5612
- "exports": []
5613
- },
5614
- {
5615
- "kind": "javascript-module",
5616
- "path": "src/contexts/vault-item-context.ts",
5617
- "declarations": [
5618
- {
5619
- "kind": "variable",
5620
- "name": "vaultItemContext"
5621
- }
5622
- ],
5623
- "exports": [
5624
- {
5625
- "kind": "js",
5626
- "name": "vaultItemContext",
5627
- "declaration": {
5628
- "name": "vaultItemContext",
5629
- "module": "src/contexts/vault-item-context.ts"
5630
- }
5631
- }
5632
- ]
5633
- },
5634
- {
5635
- "kind": "javascript-module",
5636
- "path": "src/contexts/vault-manager-context.ts",
5637
- "declarations": [
5638
- {
5639
- "kind": "variable",
5640
- "name": "vaultManagerContext"
5641
- }
5642
- ],
5643
- "exports": [
5644
- {
5645
- "kind": "js",
5646
- "name": "vaultManagerContext",
5477
+ "name": "StyleProcessingController",
5647
5478
  "declaration": {
5648
- "name": "vaultManagerContext",
5649
- "module": "src/contexts/vault-manager-context.ts"
5479
+ "name": "StyleProcessingController",
5480
+ "module": "src/controllers/style-processing-controller.ts"
5650
5481
  }
5651
5482
  }
5652
5483
  ]
@@ -7061,78 +6892,36 @@
7061
6892
  },
7062
6893
  {
7063
6894
  "kind": "javascript-module",
7064
- "path": "src/utils/toCamelCase.ts",
7065
- "declarations": [
7066
- {
7067
- "kind": "function",
7068
- "name": "toCamelCase",
7069
- "return": {
7070
- "type": {
7071
- "text": "string"
7072
- }
7073
- },
7074
- "parameters": [
7075
- {
7076
- "name": "str",
7077
- "type": {
7078
- "text": "string"
7079
- }
7080
- }
7081
- ]
7082
- }
7083
- ],
7084
- "exports": [
7085
- {
7086
- "kind": "js",
7087
- "name": "default",
7088
- "declaration": {
7089
- "name": "toCamelCase",
7090
- "module": "src/utils/toCamelCase.ts"
7091
- }
7092
- }
7093
- ]
7094
- },
7095
- {
7096
- "kind": "javascript-module",
7097
- "path": "e2e/tests/sdkcore-false-tests/card-3ds.spec.ts",
7098
- "declarations": [],
7099
- "exports": []
7100
- },
7101
- {
7102
- "kind": "javascript-module",
7103
- "path": "e2e/tests/sdkcore-false-tests/card-basic.spec.ts",
7104
- "declarations": [],
7105
- "exports": []
7106
- },
7107
- {
7108
- "kind": "javascript-module",
7109
- "path": "e2e/tests/sdkcore-false-tests/disabled-payments.spec.ts",
7110
- "declarations": [],
7111
- "exports": []
7112
- },
7113
- {
7114
- "kind": "javascript-module",
7115
- "path": "e2e/tests/sdkcore-false-tests/klarna.spec.ts",
7116
- "declarations": [],
7117
- "exports": []
7118
- },
7119
- {
7120
- "kind": "javascript-module",
7121
- "path": "e2e/tests/sdkcore-false-tests/vaulted-paypal.spec.ts",
7122
- "declarations": [],
7123
- "exports": []
7124
- },
7125
- {
7126
- "kind": "javascript-module",
7127
- "path": "e2e/tests/sdkcore-true-tests/card-form-billing-address.spec.ts",
7128
- "declarations": [],
7129
- "exports": []
7130
- },
7131
- {
7132
- "kind": "javascript-module",
7133
- "path": "e2e/tests/sdkcore-true-tests/paypal.spec.ts",
7134
- "declarations": [],
7135
- "exports": []
6895
+ "path": "src/utils/toCamelCase.ts",
6896
+ "declarations": [
6897
+ {
6898
+ "kind": "function",
6899
+ "name": "toCamelCase",
6900
+ "return": {
6901
+ "type": {
6902
+ "text": "string"
6903
+ }
6904
+ },
6905
+ "parameters": [
6906
+ {
6907
+ "name": "str",
6908
+ "type": {
6909
+ "text": "string"
6910
+ }
6911
+ }
6912
+ ]
6913
+ }
6914
+ ],
6915
+ "exports": [
6916
+ {
6917
+ "kind": "js",
6918
+ "name": "default",
6919
+ "declaration": {
6920
+ "name": "toCamelCase",
6921
+ "module": "src/utils/toCamelCase.ts"
6922
+ }
6923
+ }
6924
+ ]
7136
6925
  },
7137
6926
  {
7138
6927
  "kind": "javascript-module",
@@ -7546,6 +7335,48 @@
7546
7335
  }
7547
7336
  ]
7548
7337
  },
7338
+ {
7339
+ "kind": "javascript-module",
7340
+ "path": "e2e/tests/sdkcore-false-tests/card-3ds.spec.ts",
7341
+ "declarations": [],
7342
+ "exports": []
7343
+ },
7344
+ {
7345
+ "kind": "javascript-module",
7346
+ "path": "e2e/tests/sdkcore-false-tests/card-basic.spec.ts",
7347
+ "declarations": [],
7348
+ "exports": []
7349
+ },
7350
+ {
7351
+ "kind": "javascript-module",
7352
+ "path": "e2e/tests/sdkcore-false-tests/disabled-payments.spec.ts",
7353
+ "declarations": [],
7354
+ "exports": []
7355
+ },
7356
+ {
7357
+ "kind": "javascript-module",
7358
+ "path": "e2e/tests/sdkcore-false-tests/klarna.spec.ts",
7359
+ "declarations": [],
7360
+ "exports": []
7361
+ },
7362
+ {
7363
+ "kind": "javascript-module",
7364
+ "path": "e2e/tests/sdkcore-false-tests/vaulted-paypal.spec.ts",
7365
+ "declarations": [],
7366
+ "exports": []
7367
+ },
7368
+ {
7369
+ "kind": "javascript-module",
7370
+ "path": "e2e/tests/sdkcore-true-tests/card-form-billing-address.spec.ts",
7371
+ "declarations": [],
7372
+ "exports": []
7373
+ },
7374
+ {
7375
+ "kind": "javascript-module",
7376
+ "path": "e2e/tests/sdkcore-true-tests/paypal.spec.ts",
7377
+ "declarations": [],
7378
+ "exports": []
7379
+ },
7549
7380
  {
7550
7381
  "kind": "javascript-module",
7551
7382
  "path": "src/__tests__/mocks/sdk-core.ts",
@@ -7784,273 +7615,105 @@
7784
7615
  }
7785
7616
  }
7786
7617
  ]
7787
- },
7788
- {
7789
- "kind": "javascript-module",
7790
- "path": "src/atoms/checkout-state/checkout-state.component.ts",
7791
- "declarations": [
7792
- {
7793
- "kind": "class",
7794
- "description": "",
7795
- "name": "PrimerCheckoutStateComponent",
7796
- "members": [
7797
- {
7798
- "kind": "field",
7799
- "name": "type",
7800
- "type": {
7801
- "text": "'complete' | 'failure'"
7802
- },
7803
- "default": "'complete'",
7804
- "attribute": "type",
7805
- "reflects": true
7806
- },
7807
- {
7808
- "kind": "field",
7809
- "name": "description",
7810
- "type": {
7811
- "text": "string | undefined"
7812
- },
7813
- "attribute": "description",
7814
- "reflects": true
7815
- }
7816
- ],
7817
- "attributes": [
7818
- {
7819
- "name": "type",
7820
- "type": {
7821
- "text": "'complete' | 'failure'"
7822
- },
7823
- "default": "'complete'",
7824
- "fieldName": "type"
7825
- },
7826
- {
7827
- "name": "description",
7828
- "type": {
7829
- "text": "string | undefined"
7830
- },
7831
- "fieldName": "description"
7832
- }
7833
- ],
7834
- "superclass": {
7835
- "name": "LitElement",
7836
- "package": "lit"
7837
- },
7838
- "tagName": "primer-checkout-state",
7839
- "customElement": true
7840
- }
7841
- ],
7842
- "exports": [
7843
- {
7844
- "kind": "js",
7845
- "name": "PrimerCheckoutStateComponent",
7846
- "declaration": {
7847
- "name": "PrimerCheckoutStateComponent",
7848
- "module": "src/atoms/checkout-state/checkout-state.component.ts"
7849
- }
7850
- },
7851
- {
7852
- "kind": "custom-element-definition",
7853
- "name": "primer-checkout-state",
7854
- "declaration": {
7855
- "name": "PrimerCheckoutStateComponent",
7856
- "module": "src/atoms/checkout-state/checkout-state.component.ts"
7857
- }
7858
- }
7859
- ]
7860
- },
7861
- {
7862
- "kind": "javascript-module",
7863
- "path": "src/atoms/checkout-state/checkout-state.styles.ts",
7864
- "declarations": [],
7865
- "exports": [
7866
- {
7867
- "kind": "js",
7868
- "name": "default",
7869
- "declaration": {
7870
- "module": "src/atoms/checkout-state/checkout-state.styles.ts"
7871
- }
7872
- }
7873
- ]
7874
- },
7875
- {
7876
- "kind": "javascript-module",
7877
- "path": "src/atoms/checkout-state/checkout-state.ts",
7878
- "declarations": [],
7879
- "exports": [
7880
- {
7881
- "kind": "js",
7882
- "name": "PrimerCheckoutState",
7883
- "declaration": {
7884
- "name": "PrimerCheckoutStateComponent",
7885
- "module": "src/atoms/checkout-state/checkout-state.ts"
7886
- }
7887
- }
7888
- ]
7889
- },
7890
- {
7891
- "kind": "javascript-module",
7892
- "path": "src/atoms/dialog/dialog.component.ts",
7893
- "declarations": [
7894
- {
7895
- "kind": "class",
7896
- "description": "",
7897
- "name": "DialogComponent",
7898
- "members": [
7899
- {
7900
- "kind": "field",
7901
- "name": "size",
7902
- "type": {
7903
- "text": "'flex' | 'large'"
7904
- },
7905
- "default": "'flex'",
7906
- "attribute": "size"
7907
- },
7908
- {
7909
- "kind": "field",
7910
- "name": "showCloseButton",
7911
- "type": {
7912
- "text": "boolean"
7913
- },
7914
- "default": "true",
7915
- "attribute": "showCloseButton"
7916
- },
7917
- {
7918
- "kind": "field",
7919
- "name": "_animationState",
7920
- "type": {
7921
- "text": "'entering' | 'entered' | 'exiting' | 'exited'"
7922
- },
7923
- "privacy": "private",
7924
- "default": "'entering'"
7925
- },
7926
- {
7927
- "kind": "field",
7928
- "name": "_isVisible",
7929
- "type": {
7930
- "text": "boolean"
7931
- },
7932
- "privacy": "private",
7933
- "default": "false"
7934
- },
7935
- {
7936
- "kind": "field",
7937
- "name": "_animationTimeout",
7938
- "type": {
7939
- "text": "number | undefined"
7940
- },
7941
- "privacy": "private"
7942
- },
7943
- {
7944
- "kind": "field",
7945
- "name": "_handleCloseClick",
7946
- "privacy": "private"
7947
- },
7948
- {
7949
- "kind": "method",
7950
- "name": "startExitAnimation",
7951
- "privacy": "public",
7952
- "return": {
7953
- "type": {
7954
- "text": "void"
7955
- }
7956
- },
7957
- "description": "Public method to trigger exit animation programmatically"
7958
- },
7959
- {
7960
- "kind": "method",
7961
- "name": "_startEnterAnimation",
7962
- "privacy": "private"
7963
- },
7964
- {
7965
- "kind": "method",
7966
- "name": "_startExitAnimation",
7967
- "privacy": "private"
7968
- }
7969
- ],
7970
- "events": [
7618
+ },
7619
+ {
7620
+ "kind": "javascript-module",
7621
+ "path": "src/atoms/checkout-state/checkout-state.component.ts",
7622
+ "declarations": [
7623
+ {
7624
+ "kind": "class",
7625
+ "description": "",
7626
+ "name": "PrimerCheckoutStateComponent",
7627
+ "members": [
7971
7628
  {
7972
- "name": "primer:dialog-open",
7629
+ "kind": "field",
7630
+ "name": "type",
7973
7631
  "type": {
7974
- "text": "CustomEvent"
7975
- }
7632
+ "text": "'complete' | 'failure'"
7633
+ },
7634
+ "default": "'complete'",
7635
+ "attribute": "type",
7636
+ "reflects": true
7976
7637
  },
7977
7638
  {
7978
- "name": "primer:dialog-close",
7639
+ "kind": "field",
7640
+ "name": "description",
7979
7641
  "type": {
7980
- "text": "CustomEvent"
7981
- }
7642
+ "text": "string | undefined"
7643
+ },
7644
+ "attribute": "description",
7645
+ "reflects": true
7982
7646
  }
7983
7647
  ],
7984
7648
  "attributes": [
7985
7649
  {
7986
- "name": "size",
7650
+ "name": "type",
7987
7651
  "type": {
7988
- "text": "'flex' | 'large'"
7652
+ "text": "'complete' | 'failure'"
7989
7653
  },
7990
- "default": "'flex'",
7991
- "fieldName": "size"
7654
+ "default": "'complete'",
7655
+ "fieldName": "type"
7992
7656
  },
7993
7657
  {
7994
- "name": "showCloseButton",
7658
+ "name": "description",
7995
7659
  "type": {
7996
- "text": "boolean"
7660
+ "text": "string | undefined"
7997
7661
  },
7998
- "default": "true",
7999
- "fieldName": "showCloseButton"
7662
+ "fieldName": "description"
8000
7663
  }
8001
7664
  ],
8002
7665
  "superclass": {
8003
7666
  "name": "LitElement",
8004
7667
  "package": "lit"
8005
7668
  },
8006
- "tagName": "primer-dialog",
7669
+ "tagName": "primer-checkout-state",
8007
7670
  "customElement": true
8008
7671
  }
8009
7672
  ],
8010
7673
  "exports": [
8011
7674
  {
8012
7675
  "kind": "js",
8013
- "name": "DialogComponent",
7676
+ "name": "PrimerCheckoutStateComponent",
8014
7677
  "declaration": {
8015
- "name": "DialogComponent",
8016
- "module": "src/atoms/dialog/dialog.component.ts"
7678
+ "name": "PrimerCheckoutStateComponent",
7679
+ "module": "src/atoms/checkout-state/checkout-state.component.ts"
8017
7680
  }
8018
7681
  },
8019
7682
  {
8020
7683
  "kind": "custom-element-definition",
8021
- "name": "primer-dialog",
7684
+ "name": "primer-checkout-state",
8022
7685
  "declaration": {
8023
- "name": "DialogComponent",
8024
- "module": "src/atoms/dialog/dialog.component.ts"
7686
+ "name": "PrimerCheckoutStateComponent",
7687
+ "module": "src/atoms/checkout-state/checkout-state.component.ts"
8025
7688
  }
8026
7689
  }
8027
7690
  ]
8028
7691
  },
8029
7692
  {
8030
7693
  "kind": "javascript-module",
8031
- "path": "src/atoms/dialog/dialog.styles.ts",
7694
+ "path": "src/atoms/checkout-state/checkout-state.styles.ts",
8032
7695
  "declarations": [],
8033
7696
  "exports": [
8034
7697
  {
8035
7698
  "kind": "js",
8036
7699
  "name": "default",
8037
7700
  "declaration": {
8038
- "module": "src/atoms/dialog/dialog.styles.ts"
7701
+ "module": "src/atoms/checkout-state/checkout-state.styles.ts"
8039
7702
  }
8040
7703
  }
8041
7704
  ]
8042
7705
  },
8043
7706
  {
8044
7707
  "kind": "javascript-module",
8045
- "path": "src/atoms/dialog/dialog.ts",
7708
+ "path": "src/atoms/checkout-state/checkout-state.ts",
8046
7709
  "declarations": [],
8047
7710
  "exports": [
8048
7711
  {
8049
7712
  "kind": "js",
8050
- "name": "Dialog",
7713
+ "name": "PrimerCheckoutState",
8051
7714
  "declaration": {
8052
- "name": "DialogComponent",
8053
- "module": "src/atoms/dialog/dialog.ts"
7715
+ "name": "PrimerCheckoutStateComponent",
7716
+ "module": "src/atoms/checkout-state/checkout-state.ts"
8054
7717
  }
8055
7718
  }
8056
7719
  ]
@@ -8318,6 +7981,174 @@
8318
7981
  }
8319
7982
  ]
8320
7983
  },
7984
+ {
7985
+ "kind": "javascript-module",
7986
+ "path": "src/atoms/dialog/dialog.component.ts",
7987
+ "declarations": [
7988
+ {
7989
+ "kind": "class",
7990
+ "description": "",
7991
+ "name": "DialogComponent",
7992
+ "members": [
7993
+ {
7994
+ "kind": "field",
7995
+ "name": "size",
7996
+ "type": {
7997
+ "text": "'flex' | 'large'"
7998
+ },
7999
+ "default": "'flex'",
8000
+ "attribute": "size"
8001
+ },
8002
+ {
8003
+ "kind": "field",
8004
+ "name": "showCloseButton",
8005
+ "type": {
8006
+ "text": "boolean"
8007
+ },
8008
+ "default": "true",
8009
+ "attribute": "showCloseButton"
8010
+ },
8011
+ {
8012
+ "kind": "field",
8013
+ "name": "_animationState",
8014
+ "type": {
8015
+ "text": "'entering' | 'entered' | 'exiting' | 'exited'"
8016
+ },
8017
+ "privacy": "private",
8018
+ "default": "'entering'"
8019
+ },
8020
+ {
8021
+ "kind": "field",
8022
+ "name": "_isVisible",
8023
+ "type": {
8024
+ "text": "boolean"
8025
+ },
8026
+ "privacy": "private",
8027
+ "default": "false"
8028
+ },
8029
+ {
8030
+ "kind": "field",
8031
+ "name": "_animationTimeout",
8032
+ "type": {
8033
+ "text": "number | undefined"
8034
+ },
8035
+ "privacy": "private"
8036
+ },
8037
+ {
8038
+ "kind": "field",
8039
+ "name": "_handleCloseClick",
8040
+ "privacy": "private"
8041
+ },
8042
+ {
8043
+ "kind": "method",
8044
+ "name": "startExitAnimation",
8045
+ "privacy": "public",
8046
+ "return": {
8047
+ "type": {
8048
+ "text": "void"
8049
+ }
8050
+ },
8051
+ "description": "Public method to trigger exit animation programmatically"
8052
+ },
8053
+ {
8054
+ "kind": "method",
8055
+ "name": "_startEnterAnimation",
8056
+ "privacy": "private"
8057
+ },
8058
+ {
8059
+ "kind": "method",
8060
+ "name": "_startExitAnimation",
8061
+ "privacy": "private"
8062
+ }
8063
+ ],
8064
+ "events": [
8065
+ {
8066
+ "name": "primer:dialog-open",
8067
+ "type": {
8068
+ "text": "CustomEvent"
8069
+ }
8070
+ },
8071
+ {
8072
+ "name": "primer:dialog-close",
8073
+ "type": {
8074
+ "text": "CustomEvent"
8075
+ }
8076
+ }
8077
+ ],
8078
+ "attributes": [
8079
+ {
8080
+ "name": "size",
8081
+ "type": {
8082
+ "text": "'flex' | 'large'"
8083
+ },
8084
+ "default": "'flex'",
8085
+ "fieldName": "size"
8086
+ },
8087
+ {
8088
+ "name": "showCloseButton",
8089
+ "type": {
8090
+ "text": "boolean"
8091
+ },
8092
+ "default": "true",
8093
+ "fieldName": "showCloseButton"
8094
+ }
8095
+ ],
8096
+ "superclass": {
8097
+ "name": "LitElement",
8098
+ "package": "lit"
8099
+ },
8100
+ "tagName": "primer-dialog",
8101
+ "customElement": true
8102
+ }
8103
+ ],
8104
+ "exports": [
8105
+ {
8106
+ "kind": "js",
8107
+ "name": "DialogComponent",
8108
+ "declaration": {
8109
+ "name": "DialogComponent",
8110
+ "module": "src/atoms/dialog/dialog.component.ts"
8111
+ }
8112
+ },
8113
+ {
8114
+ "kind": "custom-element-definition",
8115
+ "name": "primer-dialog",
8116
+ "declaration": {
8117
+ "name": "DialogComponent",
8118
+ "module": "src/atoms/dialog/dialog.component.ts"
8119
+ }
8120
+ }
8121
+ ]
8122
+ },
8123
+ {
8124
+ "kind": "javascript-module",
8125
+ "path": "src/atoms/dialog/dialog.styles.ts",
8126
+ "declarations": [],
8127
+ "exports": [
8128
+ {
8129
+ "kind": "js",
8130
+ "name": "default",
8131
+ "declaration": {
8132
+ "module": "src/atoms/dialog/dialog.styles.ts"
8133
+ }
8134
+ }
8135
+ ]
8136
+ },
8137
+ {
8138
+ "kind": "javascript-module",
8139
+ "path": "src/atoms/dialog/dialog.ts",
8140
+ "declarations": [],
8141
+ "exports": [
8142
+ {
8143
+ "kind": "js",
8144
+ "name": "Dialog",
8145
+ "declaration": {
8146
+ "name": "DialogComponent",
8147
+ "module": "src/atoms/dialog/dialog.ts"
8148
+ }
8149
+ }
8150
+ ]
8151
+ },
8321
8152
  {
8322
8153
  "kind": "javascript-module",
8323
8154
  "path": "src/atoms/error-message/error-message.component.ts",
@@ -14379,7 +14210,7 @@
14379
14210
  },
14380
14211
  {
14381
14212
  "kind": "method",
14382
- "name": "createVaultedPaymentsWrapper",
14213
+ "name": "createVaultedPaymentsArray",
14383
14214
  "privacy": "private",
14384
14215
  "return": {
14385
14216
  "type": {
@@ -17296,12 +17127,12 @@
17296
17127
  },
17297
17128
  {
17298
17129
  "kind": "javascript-module",
17299
- "path": "src/containers/card-form/components/input-cvv/input-cvv.component.ts",
17130
+ "path": "src/containers/card-form/components/input-card-number/input-card-number.component.ts",
17300
17131
  "declarations": [
17301
17132
  {
17302
17133
  "kind": "class",
17303
- "description": "",
17304
- "name": "InputCvvComponent",
17134
+ "description": "Card number input component with dynamic card network detection and selection",
17135
+ "name": "InputCardNumberComponent",
17305
17136
  "members": [
17306
17137
  {
17307
17138
  "kind": "field",
@@ -17310,9 +17141,25 @@
17310
17141
  "text": "InputComponentConfig"
17311
17142
  },
17312
17143
  "privacy": "protected",
17313
- "readonly": true,
17314
- "description": "Configuration for this input component",
17315
- "default": "{ inputType: HostedInputType.CVV, containerSelector: '#cvv', errorName: 'cvv-card', translations: { label: 'CVV', placeholder: '123', }, }",
17144
+ "readonly": true,
17145
+ "description": "Configuration for this input component",
17146
+ "default": "{ inputType: HostedInputType.CARD_NUMBER, containerSelector: '#cardNumber', errorName: 'cardNumber-card', translations: { label: { id: 'cardNumber', defaultMessage: 'Card Number' }, placeholder: '4111 1111 1111 1111', ariaLabel: { id: 'cardNumber', defaultMessage: 'Card Number' }, }, }",
17147
+ "inheritedFrom": {
17148
+ "name": "AbstractCardInputComponent",
17149
+ "module": "src/containers/card-form/components/abstract-card-input-component.ts"
17150
+ }
17151
+ },
17152
+ {
17153
+ "kind": "field",
17154
+ "name": "handleNetworkSelected",
17155
+ "privacy": "private",
17156
+ "description": "Handle network selection from the network selector component"
17157
+ },
17158
+ {
17159
+ "kind": "method",
17160
+ "name": "renderInput",
17161
+ "privacy": "protected",
17162
+ "description": "Override the renderInput method to include the network selector",
17316
17163
  "inheritedFrom": {
17317
17164
  "name": "AbstractCardInputComponent",
17318
17165
  "module": "src/containers/card-form/components/abstract-card-input-component.ts"
@@ -17522,23 +17369,13 @@
17522
17369
  "name": "AbstractCardInputComponent",
17523
17370
  "module": "src/containers/card-form/components/abstract-card-input-component.ts"
17524
17371
  }
17525
- },
17526
- {
17527
- "kind": "method",
17528
- "name": "renderInput",
17529
- "privacy": "protected",
17530
- "description": "Common rendering logic for all card input components",
17531
- "inheritedFrom": {
17532
- "name": "AbstractCardInputComponent",
17533
- "module": "src/containers/card-form/components/abstract-card-input-component.ts"
17534
- }
17535
17372
  }
17536
17373
  ],
17537
17374
  "superclass": {
17538
17375
  "name": "AbstractCardInputComponent",
17539
17376
  "package": "@components/containers/card-form/components/abstract-card-input-component"
17540
17377
  },
17541
- "tagName": "primer-input-cvv",
17378
+ "tagName": "primer-input-card-number",
17542
17379
  "customElement": true,
17543
17380
  "attributes": [
17544
17381
  {
@@ -17595,59 +17432,59 @@
17595
17432
  "exports": [
17596
17433
  {
17597
17434
  "kind": "js",
17598
- "name": "InputCvvComponent",
17435
+ "name": "InputCardNumberComponent",
17599
17436
  "declaration": {
17600
- "name": "InputCvvComponent",
17601
- "module": "src/containers/card-form/components/input-cvv/input-cvv.component.ts"
17437
+ "name": "InputCardNumberComponent",
17438
+ "module": "src/containers/card-form/components/input-card-number/input-card-number.component.ts"
17602
17439
  }
17603
17440
  },
17604
17441
  {
17605
17442
  "kind": "custom-element-definition",
17606
- "name": "primer-input-cvv",
17443
+ "name": "primer-input-card-number",
17607
17444
  "declaration": {
17608
- "name": "InputCvvComponent",
17609
- "module": "src/containers/card-form/components/input-cvv/input-cvv.component.ts"
17445
+ "name": "InputCardNumberComponent",
17446
+ "module": "src/containers/card-form/components/input-card-number/input-card-number.component.ts"
17610
17447
  }
17611
17448
  }
17612
17449
  ]
17613
17450
  },
17614
17451
  {
17615
17452
  "kind": "javascript-module",
17616
- "path": "src/containers/card-form/components/input-cvv/input-cvv.styles.ts",
17453
+ "path": "src/containers/card-form/components/input-card-number/input-card-number.styles.ts",
17617
17454
  "declarations": [],
17618
17455
  "exports": [
17619
17456
  {
17620
17457
  "kind": "js",
17621
17458
  "name": "default",
17622
17459
  "declaration": {
17623
- "module": "src/containers/card-form/components/input-cvv/input-cvv.styles.ts"
17460
+ "module": "src/containers/card-form/components/input-card-number/input-card-number.styles.ts"
17624
17461
  }
17625
17462
  }
17626
17463
  ]
17627
17464
  },
17628
17465
  {
17629
17466
  "kind": "javascript-module",
17630
- "path": "src/containers/card-form/components/input-cvv/input-cvv.ts",
17467
+ "path": "src/containers/card-form/components/input-card-number/input-card-number.ts",
17631
17468
  "declarations": [],
17632
17469
  "exports": [
17633
17470
  {
17634
17471
  "kind": "js",
17635
- "name": "CardFormCVV",
17472
+ "name": "CardFormCardNumber",
17636
17473
  "declaration": {
17637
- "name": "InputCvvComponent",
17638
- "module": "src/containers/card-form/components/input-cvv/input-cvv.ts"
17474
+ "name": "InputCardNumberComponent",
17475
+ "module": "src/containers/card-form/components/input-card-number/input-card-number.ts"
17639
17476
  }
17640
17477
  }
17641
17478
  ]
17642
17479
  },
17643
17480
  {
17644
17481
  "kind": "javascript-module",
17645
- "path": "src/containers/card-form/components/input-card-number/input-card-number.component.ts",
17482
+ "path": "src/containers/card-form/components/input-cvv/input-cvv.component.ts",
17646
17483
  "declarations": [
17647
17484
  {
17648
17485
  "kind": "class",
17649
- "description": "Card number input component with dynamic card network detection and selection",
17650
- "name": "InputCardNumberComponent",
17486
+ "description": "",
17487
+ "name": "InputCvvComponent",
17651
17488
  "members": [
17652
17489
  {
17653
17490
  "kind": "field",
@@ -17658,23 +17495,7 @@
17658
17495
  "privacy": "protected",
17659
17496
  "readonly": true,
17660
17497
  "description": "Configuration for this input component",
17661
- "default": "{ inputType: HostedInputType.CARD_NUMBER, containerSelector: '#cardNumber', errorName: 'cardNumber-card', translations: { label: { id: 'cardNumber', defaultMessage: 'Card Number' }, placeholder: '4111 1111 1111 1111', ariaLabel: { id: 'cardNumber', defaultMessage: 'Card Number' }, }, }",
17662
- "inheritedFrom": {
17663
- "name": "AbstractCardInputComponent",
17664
- "module": "src/containers/card-form/components/abstract-card-input-component.ts"
17665
- }
17666
- },
17667
- {
17668
- "kind": "field",
17669
- "name": "handleNetworkSelected",
17670
- "privacy": "private",
17671
- "description": "Handle network selection from the network selector component"
17672
- },
17673
- {
17674
- "kind": "method",
17675
- "name": "renderInput",
17676
- "privacy": "protected",
17677
- "description": "Override the renderInput method to include the network selector",
17498
+ "default": "{ inputType: HostedInputType.CVV, containerSelector: '#cvv', errorName: 'cvv-card', translations: { label: 'CVV', placeholder: '123', }, }",
17678
17499
  "inheritedFrom": {
17679
17500
  "name": "AbstractCardInputComponent",
17680
17501
  "module": "src/containers/card-form/components/abstract-card-input-component.ts"
@@ -17884,13 +17705,23 @@
17884
17705
  "name": "AbstractCardInputComponent",
17885
17706
  "module": "src/containers/card-form/components/abstract-card-input-component.ts"
17886
17707
  }
17708
+ },
17709
+ {
17710
+ "kind": "method",
17711
+ "name": "renderInput",
17712
+ "privacy": "protected",
17713
+ "description": "Common rendering logic for all card input components",
17714
+ "inheritedFrom": {
17715
+ "name": "AbstractCardInputComponent",
17716
+ "module": "src/containers/card-form/components/abstract-card-input-component.ts"
17717
+ }
17887
17718
  }
17888
17719
  ],
17889
17720
  "superclass": {
17890
17721
  "name": "AbstractCardInputComponent",
17891
17722
  "package": "@components/containers/card-form/components/abstract-card-input-component"
17892
17723
  },
17893
- "tagName": "primer-input-card-number",
17724
+ "tagName": "primer-input-cvv",
17894
17725
  "customElement": true,
17895
17726
  "attributes": [
17896
17727
  {
@@ -17947,47 +17778,47 @@
17947
17778
  "exports": [
17948
17779
  {
17949
17780
  "kind": "js",
17950
- "name": "InputCardNumberComponent",
17781
+ "name": "InputCvvComponent",
17951
17782
  "declaration": {
17952
- "name": "InputCardNumberComponent",
17953
- "module": "src/containers/card-form/components/input-card-number/input-card-number.component.ts"
17783
+ "name": "InputCvvComponent",
17784
+ "module": "src/containers/card-form/components/input-cvv/input-cvv.component.ts"
17954
17785
  }
17955
17786
  },
17956
17787
  {
17957
17788
  "kind": "custom-element-definition",
17958
- "name": "primer-input-card-number",
17789
+ "name": "primer-input-cvv",
17959
17790
  "declaration": {
17960
- "name": "InputCardNumberComponent",
17961
- "module": "src/containers/card-form/components/input-card-number/input-card-number.component.ts"
17791
+ "name": "InputCvvComponent",
17792
+ "module": "src/containers/card-form/components/input-cvv/input-cvv.component.ts"
17962
17793
  }
17963
17794
  }
17964
17795
  ]
17965
17796
  },
17966
17797
  {
17967
17798
  "kind": "javascript-module",
17968
- "path": "src/containers/card-form/components/input-card-number/input-card-number.styles.ts",
17799
+ "path": "src/containers/card-form/components/input-cvv/input-cvv.styles.ts",
17969
17800
  "declarations": [],
17970
17801
  "exports": [
17971
17802
  {
17972
17803
  "kind": "js",
17973
17804
  "name": "default",
17974
17805
  "declaration": {
17975
- "module": "src/containers/card-form/components/input-card-number/input-card-number.styles.ts"
17806
+ "module": "src/containers/card-form/components/input-cvv/input-cvv.styles.ts"
17976
17807
  }
17977
17808
  }
17978
17809
  ]
17979
17810
  },
17980
17811
  {
17981
17812
  "kind": "javascript-module",
17982
- "path": "src/containers/card-form/components/input-card-number/input-card-number.ts",
17813
+ "path": "src/containers/card-form/components/input-cvv/input-cvv.ts",
17983
17814
  "declarations": [],
17984
17815
  "exports": [
17985
17816
  {
17986
17817
  "kind": "js",
17987
- "name": "CardFormCardNumber",
17818
+ "name": "CardFormCVV",
17988
17819
  "declaration": {
17989
- "name": "InputCardNumberComponent",
17990
- "module": "src/containers/card-form/components/input-card-number/input-card-number.ts"
17820
+ "name": "InputCvvComponent",
17821
+ "module": "src/containers/card-form/components/input-cvv/input-cvv.ts"
17991
17822
  }
17992
17823
  }
17993
17824
  ]
@@ -18419,6 +18250,81 @@
18419
18250
  }
18420
18251
  ]
18421
18252
  },
18253
+ {
18254
+ "kind": "javascript-module",
18255
+ "path": "src/containers/vault-manager/components/payment-method-content/payment-method-content.component.ts",
18256
+ "declarations": [
18257
+ {
18258
+ "kind": "class",
18259
+ "description": "PaymentMethodContentComponent - renders payment method information with icon and details\nThis component encapsulates the display logic and styles for payment method content\nso it can be reused across different containers without style conflicts",
18260
+ "name": "PaymentMethodContentComponent",
18261
+ "members": [
18262
+ {
18263
+ "kind": "field",
18264
+ "name": "assetConfig",
18265
+ "type": {
18266
+ "text": "AssetConfig | null"
18267
+ },
18268
+ "default": "null",
18269
+ "description": "The asset configuration containing icon and display data"
18270
+ }
18271
+ ],
18272
+ "superclass": {
18273
+ "name": "LitElement",
18274
+ "package": "lit"
18275
+ },
18276
+ "tagName": "primer-payment-method-content",
18277
+ "customElement": true
18278
+ }
18279
+ ],
18280
+ "exports": [
18281
+ {
18282
+ "kind": "js",
18283
+ "name": "PaymentMethodContentComponent",
18284
+ "declaration": {
18285
+ "name": "PaymentMethodContentComponent",
18286
+ "module": "src/containers/vault-manager/components/payment-method-content/payment-method-content.component.ts"
18287
+ }
18288
+ },
18289
+ {
18290
+ "kind": "custom-element-definition",
18291
+ "name": "primer-payment-method-content",
18292
+ "declaration": {
18293
+ "name": "PaymentMethodContentComponent",
18294
+ "module": "src/containers/vault-manager/components/payment-method-content/payment-method-content.component.ts"
18295
+ }
18296
+ }
18297
+ ]
18298
+ },
18299
+ {
18300
+ "kind": "javascript-module",
18301
+ "path": "src/containers/vault-manager/components/payment-method-content/payment-method-content.styles.ts",
18302
+ "declarations": [],
18303
+ "exports": [
18304
+ {
18305
+ "kind": "js",
18306
+ "name": "default",
18307
+ "declaration": {
18308
+ "module": "src/containers/vault-manager/components/payment-method-content/payment-method-content.styles.ts"
18309
+ }
18310
+ }
18311
+ ]
18312
+ },
18313
+ {
18314
+ "kind": "javascript-module",
18315
+ "path": "src/containers/vault-manager/components/payment-method-content/payment-method-content.ts",
18316
+ "declarations": [],
18317
+ "exports": [
18318
+ {
18319
+ "kind": "js",
18320
+ "name": "PaymentMethodContentComponent",
18321
+ "declaration": {
18322
+ "name": "PaymentMethodContentComponent",
18323
+ "module": "src/containers/vault-manager/components/payment-method-content/payment-method-content.ts"
18324
+ }
18325
+ }
18326
+ ]
18327
+ },
18422
18328
  {
18423
18329
  "kind": "javascript-module",
18424
18330
  "path": "src/containers/vault-manager/components/vault-cvv-input/vault-cvv-input.component.ts",
@@ -18618,81 +18524,6 @@
18618
18524
  }
18619
18525
  ]
18620
18526
  },
18621
- {
18622
- "kind": "javascript-module",
18623
- "path": "src/containers/vault-manager/components/payment-method-content/payment-method-content.component.ts",
18624
- "declarations": [
18625
- {
18626
- "kind": "class",
18627
- "description": "PaymentMethodContentComponent - renders payment method information with icon and details\nThis component encapsulates the display logic and styles for payment method content\nso it can be reused across different containers without style conflicts",
18628
- "name": "PaymentMethodContentComponent",
18629
- "members": [
18630
- {
18631
- "kind": "field",
18632
- "name": "assetConfig",
18633
- "type": {
18634
- "text": "AssetConfig | null"
18635
- },
18636
- "default": "null",
18637
- "description": "The asset configuration containing icon and display data"
18638
- }
18639
- ],
18640
- "superclass": {
18641
- "name": "LitElement",
18642
- "package": "lit"
18643
- },
18644
- "tagName": "primer-payment-method-content",
18645
- "customElement": true
18646
- }
18647
- ],
18648
- "exports": [
18649
- {
18650
- "kind": "js",
18651
- "name": "PaymentMethodContentComponent",
18652
- "declaration": {
18653
- "name": "PaymentMethodContentComponent",
18654
- "module": "src/containers/vault-manager/components/payment-method-content/payment-method-content.component.ts"
18655
- }
18656
- },
18657
- {
18658
- "kind": "custom-element-definition",
18659
- "name": "primer-payment-method-content",
18660
- "declaration": {
18661
- "name": "PaymentMethodContentComponent",
18662
- "module": "src/containers/vault-manager/components/payment-method-content/payment-method-content.component.ts"
18663
- }
18664
- }
18665
- ]
18666
- },
18667
- {
18668
- "kind": "javascript-module",
18669
- "path": "src/containers/vault-manager/components/payment-method-content/payment-method-content.styles.ts",
18670
- "declarations": [],
18671
- "exports": [
18672
- {
18673
- "kind": "js",
18674
- "name": "default",
18675
- "declaration": {
18676
- "module": "src/containers/vault-manager/components/payment-method-content/payment-method-content.styles.ts"
18677
- }
18678
- }
18679
- ]
18680
- },
18681
- {
18682
- "kind": "javascript-module",
18683
- "path": "src/containers/vault-manager/components/payment-method-content/payment-method-content.ts",
18684
- "declarations": [],
18685
- "exports": [
18686
- {
18687
- "kind": "js",
18688
- "name": "PaymentMethodContentComponent",
18689
- "declaration": {
18690
- "name": "PaymentMethodContentComponent",
18691
- "module": "src/containers/vault-manager/components/payment-method-content/payment-method-content.ts"
18692
- }
18693
- }
18694
- ]
18695
- },
18696
18527
  {
18697
18528
  "kind": "javascript-module",
18698
18529
  "path": "src/containers/vault-manager/components/vault-delete-confirmation/vault-delete-confirmation.component.ts",