@foxy.io/elements 1.45.0-beta.4 → 1.45.0-beta.5

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.
@@ -1 +1 @@
1
- import"./shared-597193f7.js";import"./shared-4cc42648.js";import"./shared-d3414cf0.js";import"./shared-e502a7be.js";import"./shared-f8519b17.js";import"./shared-fc784ca0.js";import{I as e}from"./shared-77829fbb.js";import"./foxy-nucleon-element.js";import"./shared-10da9bf0.js";import{I as t,a as o}from"./shared-1e14a3fe.js";import{l as n}from"./shared-cf613436.js";import{c as i}from"./shared-4e709717.js";import{h as s,s as r}from"./shared-ba5c42c7.js";import{_ as a,B as l}from"./shared-7fec42f2.js";import{i as c}from"./shared-53e42a77.js";import{R as u,a as _}from"./shared-7a87cd33.js";import"./shared-005168e0.js";import"./shared-433eea12.js";import"./shared-64e243c4.js";import"./shared-b5a0d106.js";import"./shared-9e8344bf.js";import"./shared-5bcf861e.js";import"./shared-937e58bf.js";import"./shared-5fd5805c.js";import"./shared-d0aed1c1.js";import"./shared-53e476fd.js";import"./shared-df7d368c.js";import"./shared-809d503c.js";import"./shared-a268320e.js";import"./shared-e54135f0.js";import"./shared-85ed835a.js";import"./shared-529a82a3.js";import"./shared-278b8790.js";import"./shared-5963a49e.js";import"./shared-c929504f.js";import"./shared-a704aaa4.js";import"./shared-65b2760f.js";import"./shared-c782b9fa.js";import"./shared-0ea750af.js";import"./foxy-copy-to-clipboard.js";import"./shared-5b0c206b.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";import"./shared-69074dae.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-5212ef4f.js";let d,p,f=e=>e;customElements.define("foxy-internal-template-config-form-supported-cards-control",class extends t{renderControl(){const e={amex:"American Express",diners:"Diners Club",discover:"Discover",jcb:"JCB",maestro:"Maestro",mastercard:"Mastercard",unionpay:"UnionPay",visa:"Visa"};return s(d||(d=f` <div class="flex flex-wrap -m-xs"> ${0} </div> `),Object.entries(n).map((([t,o])=>{if(!e[t])return;const n=this._value.includes(t);return s(p||(p=f` <div data-testid="${0}" class="${0}"> <label class="${0}"> <div class="h-s">${0}</div> <div class="text-s font-medium mx-s my-auto leading-none">${0}</div> <input type="checkbox" class="sr-only" ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> </label> </div> `),t,i({"m-xs rounded":!0,"opacity-50 cursor-default":this.disabled,"cursor-pointer ring-primary-50 focus-within-ring-2":!this.disabled}),i({"overflow-hidden transition-colors flex rounded-s border":!0,"border-primary bg-primary-10 text-primary":n&&!this.readonly,"border-contrast bg-contrast-5 text-secondary":n&&this.readonly,"hover-text-body":n&&!this.disabled&&!this.readonly,"border-contrast-10":!n,"hover-border-primary":!n&&!this.disabled&&!this.readonly,"hover-text-primary":!n&&!this.disabled&&!this.readonly}),o,e[t],this.disabled,this.readonly,n,(e=>{if(this.readonly)return e.preventDefault();e.stopPropagation();const o=[...this._value];e.currentTarget.checked?o.push(t):o.splice(o.indexOf(t),1),this._value=o}))})))}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:[]}set _value(e){super._value=e}});let g,h,y,m,b,x=e=>e;let v,w,j,$,k=e=>e;customElements.define("foxy-internal-template-config-form-filter-values-control-item",class extends o{constructor(){super(...arguments),this.options={},this.regions=[],this.name="",this.code="",this.__newRegion=""}static get properties(){return a(a({},super.properties),{},{__newRegion:{attribute:!1},options:{type:Object},regions:{type:Array},name:{type:String},code:{type:String}})}render(){const e=Object.values(this.options),t=e.filter((e=>!this.regions.includes(e.c)));return s(g||(g=x` <div class="${0}"> <div data-testid="country" class="h-m flex justify-between items-center bg-contrast-5"> <div style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <span>${0}</span> </div> <button aria-label="${0}" class="${0}" style="width:calc(var(--lumo-size-s) - 2px);height:calc(var(--lumo-size-s) - 2px)" ?disabled="${0}" @click="${0}"> <iron-icon icon="icons:close" class="icon-inline text-m"></iron-icon> </button> </div> ${0} </div> `),i({"border border-contrast-5 rounded-s font-medium overflow-hidden":!0,"text-disabled":this.disabled}),this.name||this.code,this.t("delete"),i({"mr-xs items-center justify-center rounded-full transition-colors":!0,"hover-bg-error-10 hover-text-error":!this.disabled,"focus-outline-none focus-ring-2 ring-inset ring-error-50":!this.disabled,"cursor-default":this.disabled,flex:!this.readonly,hidden:this.readonly}),this.disabled,(()=>this.dispatchEvent(new CustomEvent("delete"))),0===e.length?"":s(h||(h=x` <div data-testid="regions" class="flex flex-wrap p-xs text-s"> ${0} ${0} </div> `),this.regions.map((e=>{var t;return s(y||(y=x` <div class="flex items-center rounded-s border border-contrast-10 h-s m-xs"> <span class="mx-s">${0}</span> <button aria-label="${0}" class="${0}" style="width:calc(var(--lumo-size-s) - 2px);height:calc(var(--lumo-size-s) - 2px)" ?disabled="${0}" @click="${0}"> <iron-icon icon="icons:close" class="icon-inline text-m"></iron-icon> </button> </div> `),(null===(t=this.options[e])||void 0===t?void 0:t.n)||e,this.t("delete"),i({"items-center justify-center rounded-s transition-colors":!0,"hover-bg-error-10 hover-text-error":!this.disabled,"focus-outline-none focus-ring-2 ring-inset ring-primary-50":!this.disabled,"cursor-default":this.disabled,flex:!this.readonly,hidden:this.readonly}),this.disabled,(()=>{this.regions=this.regions.filter((t=>t!==e)),this.dispatchEvent(new CustomEvent("update:regions"))}))})),0===t.length?"":s(m||(m=x` <div data-testid="new-region" class="${0}"> <select class="${0}" ?disabled="${0}" @change="${0}"> <option value="" disabled="disabled" selected="selected">${0}</option> ${0} </select> </div> `),i({"h-s m-xs items-center transition-colors border border-contrast-10 rounded-s":!0,"focus-within-ring-1 ring-primary-50 focus-within-border-primary-50":!this.disabled,flex:!this.readonly,hidden:this.readonly}),i({"appearance-none bg-transparent h-s text-s px-s font-medium":!0,"transition-colors rounded-s focus-outline-none":!0,"cursor-pointer hover-bg-contrast-5":!this.disabled}),this.disabled,(e=>{const t=e.currentTarget;this.__newRegion=t.value,this.__addRegion(),t.value=""}),this.t("add_region"),t.map((e=>s(b||(b=x`<option value="${0}">${0}</option>`),e.c,e.n))))))}__addRegion(){this.regions=[...new Set([...this.regions,this.__newRegion])],this.__newRegion="",this.dispatchEvent(new CustomEvent("update:regions"))}}),customElements.define("foxy-internal-template-config-form-filter-values-control",class extends t{constructor(){super(...arguments),this.countries=null,this.__newCountry=""}static get properties(){return a(a({},super.properties),{},{__newCountry:{attribute:!1},countries:{}})}renderControl(){var e,t,o,n;const r=Object.values(null!==(o=null===(t=null===(e=this.__countriesLoader)||void 0===e?void 0:e.data)||void 0===t?void 0:t.values)&&void 0!==o?o:{}),l=r.filter((e=>!(e.cc2 in this._value)));return s(v||(v=k` <div class="space-y-s" data-testid="countries"> ${0} ${0} </div> <foxy-nucleon infer="" href="${0}" id="countriesLoader" @update="${0}"> </foxy-nucleon> `),Object.entries(this._value).map((([e,t])=>{var o;const n=r.find((t=>t.cc2===e));return s(w||(w=k` <foxy-internal-template-config-form-filter-values-control-item regions="${0}" options="${0}" infer="" code="${0}" name="${0}" ?disabled="${0}" ?readonly="${0}" @update:regions="${0}" @delete="${0}"> </foxy-internal-template-config-form-filter-values-control-item> `),JSON.stringify("*"===t?[]:t),JSON.stringify(Array.isArray(null==n?void 0:n.regions)?{}:null!==(o=null==n?void 0:n.regions)&&void 0!==o?o:{}),e,c(null==n?void 0:n.default),this.disabled,this.readonly,(t=>{const o=a({},this._value),n=t.currentTarget.regions;o[e]=n.length?n:"*",this._value=o}),(()=>{const t=a({},this._value);delete t[e],this._value=t}))})),0===l.length&&0!==r.length?"":s(j||(j=k` <div data-testid="new-country" class="${0}"> <select class="${0}" ?disabled="${0}" @change="${0}"> <option value="" disabled="disabled" selected="selected">${0}</option> ${0} </select> </div> `),i({"h-m flex items-center rounded-s transition-colors":!0,"border border-contrast-10 ring-primary-50":!0,"focus-within-ring-1 focus-within-border-primary-50":!this.disabled,flex:!this.readonly,hidden:this.readonly}),i({"appearance-none bg-transparent h-m text-m px-s flex-1 font-medium":!0,"transition-colors rounded-s focus-outline-none":!0,"cursor-pointer hover-bg-contrast-5":!this.disabled,"text-disabled":this.disabled}),this.disabled,(e=>{const t=e.currentTarget;this.__newCountry=t.value,this.__addCountry(),t.value=""}),this.t("add_country"),l.map((e=>s($||($=k`<option value="${0}">${0}</option>`),e.cc2,e.default)))),c(null!==(n=this.countries)&&void 0!==n?n:void 0),(()=>this.requestUpdate()))}__addCountry(){this._value=a(a({},this._value),{},{[this.__newCountry]:"*"}),this.__newCountry=""}get __countriesLoader(){return this.renderRoot.querySelector("#countriesLoader")}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:{}}set _value(e){super._value=e}});let S,O,q,F,J,N,C,V,D,R,T,U,A,z,E=e=>e;const G=u(_(e,"template-config-form"));class B extends G{constructor(){super(...arguments),this.countries=null,this.regions=null,this.store=null,this.__customCheckoutFieldCouponEntryRequirementsOptions=JSON.stringify([{label:"option_enabled",value:"enabled"},{label:"option_disabled",value:"disabled"}]),this.__customCheckoutFieldRequirementsOptions=JSON.stringify([{label:"option_default",value:"default"},{label:"option_optional",value:"optional"},{label:"option_required",value:"required"},{label:"option_hidden",value:"hidden"}]),this.__tosCheckboxSettingsInitialStateOptions=JSON.stringify([{label:"option_checked",value:"checked"},{label:"option_unchecked",value:"unchecked"}]),this.__locationFilteringFilterTypeOptions=JSON.stringify([{label:"option_blocklist",value:"blacklist"},{label:"option_allowlist",value:"whitelist"}]),this.__foxycompleteShowComboboxOptions=JSON.stringify([{label:"option_combobox",value:"combobox"},{label:"option_search",value:"search"}]),this.__tosCheckboxSettingsUsageOptions=JSON.stringify([{label:"option_none",value:"none"},{label:"option_optional",value:"optional"},{label:"option_required",value:"required"}]),this.__locationFilteringUsageOptions=JSON.stringify([{label:"option_none",value:"none"},{label:"option_shipping",value:"shipping"},{label:"option_billing",value:"billing"},{label:"option_both",value:"both"},{label:"option_independent",value:"independent"}]),this.__cscRequirementsValueOptions=JSON.stringify([{label:"option_all_cards",value:"all_cards"},{label:"option_sso_only",value:"sso_only"},{label:"option_new_cards_only",value:"new_cards_only"}]),this.__checkoutTypeDefaultOptions=JSON.stringify([{label:"option_default_account",value:"default_account"},{label:"option_default_guest",value:"default_guest"}]),this.__checkoutTypeAccountOptions=JSON.stringify([{label:"option_account",value:"account_only"},{label:"option_guest",value:"guest_only"},{label:"option_both",value:"default_guest"}]),this.__cartTypeOptions=JSON.stringify([{label:"option_default",value:"default"},{label:"option_fullpage",value:"fullpage"},{label:"option_custom",value:"custom"}]),this.__locationFilteringFilterValuesSetValue=e=>{const t=this.__formJson,o=a(a({},t.location_filtering),{},{shipping_filter_values:e,billing_filter_values:e});this.edit({json:JSON.stringify(a(a({},t),{},{location_filtering:o}))})},this.__locationFilteringFilterTypeSetValue=e=>{const t=this.__formJson,o=a(a({},t.location_filtering),{},{shipping_filter_type:e,billing_filter_type:e});this.edit({json:JSON.stringify(a(a({},t),{},{location_filtering:o}))})},this.__foxycompleteShowComboboxGetValue=()=>this.__formJson.foxycomplete.show_combobox?"combobox":"search",this.__foxycompleteShowComboboxSetValue=e=>{const t="combobox"===e,o=a(a({},this.__formJson.foxycomplete),{},{show_combobox:t});this.edit({json:JSON.stringify(a(a({},this.__formJson),{},{foxycomplete:o}))})},this.__checkoutTypeAccountGetValue=()=>{const e=this.__formJson;return e.checkout_type.includes("default")?"default_guest":e.checkout_type},this.__customConfigGetValue=()=>{const e=this.__formJson;return"string"==typeof e.custom_config?e.custom_config:JSON.stringify(e.custom_config,null,2)},this.__customConfigSetValue=e=>{const t=this.__formJson;try{t.custom_config=JSON.parse(e)}catch(o){t.custom_config=e}this.edit({json:JSON.stringify(t)})},this.__cspUsageGetValue=()=>{const e=this.__formJson.csp.usage;return"enforce"===e||"both"===e},this.__cspUsageSetValue=e=>{const t=this.__formJson,o=t.csp.usage,n={false:{both:"report",enforce:"none"},true:{report:"both",none:"enforce"}}[String(e)][o];if(n){const e=a(a({},t),{},{csp:a(a({},t.csp),{},{usage:n})});this.edit({json:JSON.stringify(e)})}},this.__cspRoUsageGetValue=()=>{const e=this.__formJson.csp.usage;return"report"===e||"both"===e},this.__cspRoUsageSetValue=e=>{const t=this.__formJson,o=t.csp.usage,n={false:{both:"enforce",report:"none"},true:{enforce:"both",none:"report"}}[String(e)][o];if(n){const e=a(a({},t),{},{csp:a(a({},t.csp),{},{usage:n})});this.edit({json:JSON.stringify(e)})}},this.__defaultJSON=JSON.stringify({cart_type:"default",checkout_type:"default_account",csc_requirements:"all_cards",tos_checkbox_settings:{usage:"none",initial_state:"unchecked",is_hidden:!1,url:""},eu_secure_data_transfer_consent:{usage:"required"},newsletter_subscribe:{usage:"none"},analytics_config:{usage:"none",google_analytics:{usage:"none",account_id:"",include_on_site:!1},google_tag:{usage:"none",send_to:"",account_id:""}},colors:{usage:"none",primary:"4D4D4D",secondary:"FFFFFF",tertiary:"FFFFFF"},use_checkout_confirmation_window:{usage:"none"},supported_payment_cards:["visa","mastercard","discover","amex"],custom_checkout_field_requirements:{cart_controls:"enabled",coupon_entry:"enabled",billing_first_name:"required",billing_last_name:"required",billing_company:"optional",billing_tax_id:"hidden",billing_phone:"optional",billing_address1:"required",billing_address2:"optional",billing_city:"required",billing_region:"default",billing_postal_code:"required",billing_country:"required"},cart_display_config:{usage:"none",show_product_weight:!0,show_product_category:!0,show_product_code:!0,show_product_options:!0,show_sub_frequency:!0,show_sub_startdate:!0,show_sub_nextdate:!0,show_sub_enddate:!0,hidden_product_options:[]},foxycomplete:{usage:"required",show_combobox:!0,combobox_open:"\\u25bc",combobox_close:"\\u25b2",show_flags:!0},custom_script_values:{header:"",footer:"",checkout_fields:"",multiship_checkout_fields:""},http_receipt:!1,custom_config:"",debug:{usage:"none"},location_filtering:{usage:"none",shipping_filter_type:"blacklist",billing_filter_type:"blacklist",shipping_filter_values:{},billing_filter_values:{}},postal_code_lookup:{usage:"enabled"},csp:{usage:"none"}})}static get properties(){return a(a({},super.properties),{},{countries:{},regions:{},store:{}})}static get v8n(){return[({json:e})=>{var t,o;return(null!==(o=null===(t=(e?JSON.parse(e):{cart_type:"default",checkout_type:"default_account",csc_requirements:"all_cards",tos_checkbox_settings:{usage:"none",initial_state:"unchecked",is_hidden:!1,url:""},eu_secure_data_transfer_consent:{usage:"required"},newsletter_subscribe:{usage:"none"},analytics_config:{usage:"none",google_analytics:{usage:"none",account_id:"",include_on_site:!1},google_tag:{usage:"none",send_to:"",account_id:""}},colors:{usage:"none",primary:"4D4D4D",secondary:"FFFFFF",tertiary:"FFFFFF"},use_checkout_confirmation_window:{usage:"none"},supported_payment_cards:["visa","mastercard","discover","amex"],custom_checkout_field_requirements:{cart_controls:"enabled",coupon_entry:"enabled",billing_first_name:"required",billing_last_name:"required",billing_company:"optional",billing_tax_id:"hidden",billing_phone:"optional",billing_address1:"required",billing_address2:"optional",billing_city:"required",billing_region:"default",billing_postal_code:"required",billing_country:"required"},cart_display_config:{usage:"none",show_product_weight:!0,show_product_category:!0,show_product_code:!0,show_product_options:!0,show_sub_frequency:!0,show_sub_startdate:!0,show_sub_nextdate:!0,show_sub_enddate:!0,hidden_product_options:[]},foxycomplete:{usage:"required",show_combobox:!0,combobox_open:"\\u25bc",combobox_close:"\\u25b2",show_flags:!0},custom_script_values:{header:"",footer:"",checkout_fields:"",multiship_checkout_fields:""},http_receipt:!1,custom_config:"",debug:{usage:"none"},location_filtering:{usage:"none",shipping_filter_type:"blacklist",billing_filter_type:"blacklist",shipping_filter_values:{},billing_filter_values:{}},postal_code_lookup:{usage:"enabled"},csp:{usage:"none"}}).csp.policy_enforce)||void 0===t?void 0:t.reporting_endpoint)&&void 0!==o?o:"").length<=1e3||"csp-policy-enforce-reporting-endpoint:v8n_too_long"},({json:e})=>{var t,o;return(null!==(o=null===(t=(e?JSON.parse(e):{cart_type:"default",checkout_type:"default_account",csc_requirements:"all_cards",tos_checkbox_settings:{usage:"none",initial_state:"unchecked",is_hidden:!1,url:""},eu_secure_data_transfer_consent:{usage:"required"},newsletter_subscribe:{usage:"none"},analytics_config:{usage:"none",google_analytics:{usage:"none",account_id:"",include_on_site:!1},google_tag:{usage:"none",send_to:"",account_id:""}},colors:{usage:"none",primary:"4D4D4D",secondary:"FFFFFF",tertiary:"FFFFFF"},use_checkout_confirmation_window:{usage:"none"},supported_payment_cards:["visa","mastercard","discover","amex"],custom_checkout_field_requirements:{cart_controls:"enabled",coupon_entry:"enabled",billing_first_name:"required",billing_last_name:"required",billing_company:"optional",billing_tax_id:"hidden",billing_phone:"optional",billing_address1:"required",billing_address2:"optional",billing_city:"required",billing_region:"default",billing_postal_code:"required",billing_country:"required"},cart_display_config:{usage:"none",show_product_weight:!0,show_product_category:!0,show_product_code:!0,show_product_options:!0,show_sub_frequency:!0,show_sub_startdate:!0,show_sub_nextdate:!0,show_sub_enddate:!0,hidden_product_options:[]},foxycomplete:{usage:"required",show_combobox:!0,combobox_open:"\\u25bc",combobox_close:"\\u25b2",show_flags:!0},custom_script_values:{header:"",footer:"",checkout_fields:"",multiship_checkout_fields:""},http_receipt:!1,custom_config:"",debug:{usage:"none"},location_filtering:{usage:"none",shipping_filter_type:"blacklist",billing_filter_type:"blacklist",shipping_filter_values:{},billing_filter_values:{}},postal_code_lookup:{usage:"enabled"},csp:{usage:"none"}}).csp.policy_report)||void 0===t?void 0:t.reporting_endpoint)&&void 0!==o?o:"").length<=1e3||"csp-policy-report-reporting-endpoint:v8n_too_long"},({json:e})=>{var t,o;return(null!==(o=null===(t=(e?JSON.parse(e):{cart_type:"default",checkout_type:"default_account",csc_requirements:"all_cards",tos_checkbox_settings:{usage:"none",initial_state:"unchecked",is_hidden:!1,url:""},eu_secure_data_transfer_consent:{usage:"required"},newsletter_subscribe:{usage:"none"},analytics_config:{usage:"none",google_analytics:{usage:"none",account_id:"",include_on_site:!1},google_tag:{usage:"none",send_to:"",account_id:""}},colors:{usage:"none",primary:"4D4D4D",secondary:"FFFFFF",tertiary:"FFFFFF"},use_checkout_confirmation_window:{usage:"none"},supported_payment_cards:["visa","mastercard","discover","amex"],custom_checkout_field_requirements:{cart_controls:"enabled",coupon_entry:"enabled",billing_first_name:"required",billing_last_name:"required",billing_company:"optional",billing_tax_id:"hidden",billing_phone:"optional",billing_address1:"required",billing_address2:"optional",billing_city:"required",billing_region:"default",billing_postal_code:"required",billing_country:"required"},cart_display_config:{usage:"none",show_product_weight:!0,show_product_category:!0,show_product_code:!0,show_product_options:!0,show_sub_frequency:!0,show_sub_startdate:!0,show_sub_nextdate:!0,show_sub_enddate:!0,hidden_product_options:[]},foxycomplete:{usage:"required",show_combobox:!0,combobox_open:"\\u25bc",combobox_close:"\\u25b2",show_flags:!0},custom_script_values:{header:"",footer:"",checkout_fields:"",multiship_checkout_fields:""},http_receipt:!1,custom_config:"",debug:{usage:"none"},location_filtering:{usage:"none",shipping_filter_type:"blacklist",billing_filter_type:"blacklist",shipping_filter_values:{},billing_filter_values:{}},postal_code_lookup:{usage:"enabled"},csp:{usage:"none"}}).csp.policy_enforce)||void 0===t?void 0:t.script_src)&&void 0!==o?o:[]).every((e=>e.length<=1e3))||"csp-policy-enforce-script-src:v8n_too_long"},({json:e})=>{var t,o;return(null!==(o=null===(t=(e?JSON.parse(e):{cart_type:"default",checkout_type:"default_account",csc_requirements:"all_cards",tos_checkbox_settings:{usage:"none",initial_state:"unchecked",is_hidden:!1,url:""},eu_secure_data_transfer_consent:{usage:"required"},newsletter_subscribe:{usage:"none"},analytics_config:{usage:"none",google_analytics:{usage:"none",account_id:"",include_on_site:!1},google_tag:{usage:"none",send_to:"",account_id:""}},colors:{usage:"none",primary:"4D4D4D",secondary:"FFFFFF",tertiary:"FFFFFF"},use_checkout_confirmation_window:{usage:"none"},supported_payment_cards:["visa","mastercard","discover","amex"],custom_checkout_field_requirements:{cart_controls:"enabled",coupon_entry:"enabled",billing_first_name:"required",billing_last_name:"required",billing_company:"optional",billing_tax_id:"hidden",billing_phone:"optional",billing_address1:"required",billing_address2:"optional",billing_city:"required",billing_region:"default",billing_postal_code:"required",billing_country:"required"},cart_display_config:{usage:"none",show_product_weight:!0,show_product_category:!0,show_product_code:!0,show_product_options:!0,show_sub_frequency:!0,show_sub_startdate:!0,show_sub_nextdate:!0,show_sub_enddate:!0,hidden_product_options:[]},foxycomplete:{usage:"required",show_combobox:!0,combobox_open:"\\u25bc",combobox_close:"\\u25b2",show_flags:!0},custom_script_values:{header:"",footer:"",checkout_fields:"",multiship_checkout_fields:""},http_receipt:!1,custom_config:"",debug:{usage:"none"},location_filtering:{usage:"none",shipping_filter_type:"blacklist",billing_filter_type:"blacklist",shipping_filter_values:{},billing_filter_values:{}},postal_code_lookup:{usage:"enabled"},csp:{usage:"none"}}).csp.policy_report)||void 0===t?void 0:t.script_src)&&void 0!==o?o:[]).every((e=>e.length<=1e3))||"csp-policy-report-script-src:v8n_too_long"}]}get hiddenSelector(){var e,t;const o=[super.hiddenSelector.toString()],n=this.__dataJson,i=this.__formJson,s=i.location_filtering.usage,r=i.checkout_type;return"required"!==i.cart_display_config.usage&&o.unshift("cart-group-two","cart-group-three","cart-group-four"),"required"!==i.foxycomplete.usage&&o.unshift("country-and-region-group-one:foxycomplete-show-combobox","country-and-region-group-one:foxycomplete-combobox-open","country-and-region-group-one:foxycomplete-combobox-close","country-and-region-group-one:foxycomplete-show-flags"),!1===i.foxycomplete.show_combobox&&o.unshift("country-and-region-group-one:foxycomplete-combobox-open","country-and-region-group-one:foxycomplete-combobox-close"),"both"!==s&&o.unshift("country-and-region-group-two"),"shipping"!==s&&"independent"!==s&&o.unshift("country-and-region-group-three"),"billing"!==s&&"independent"!==s&&o.unshift("country-and-region-group-four"),"default_account"!==r&&"default_guest"!==r&&o.unshift("customer-accounts:checkout-type-default"),"none"===i.tos_checkbox_settings.usage&&o.unshift("consent-group-one:tos-checkbox-settings-url","consent-group-one:tos-checkbox-settings-initial-state","consent-group-one:tos-checkbox-settings-is-hidden"),"required"!==i.analytics_config.usage&&o.unshift("analytics-config-google-analytics","analytics-config-google-tag"),"required"!==(null==n?void 0:n.analytics_config.google_analytics.usage)&&o.unshift("analytics-config-google-analytics"),"required"!==i.analytics_config.google_analytics.usage&&o.unshift("analytics-config-google-analytics:analytics-config-google-analytics-account-id","analytics-config-google-analytics:analytics-config-google-analytics-include-on-site"),"required"!==i.analytics_config.google_tag.usage&&(o.unshift("analytics-config-google-tag:analytics-config-google-tag-account-id"),o.unshift("analytics-config-google-tag:analytics-config-google-tag-send-to")),!0!==(null===(t=null===(e=this.__storeLoader)||void 0===e?void 0:e.data)||void 0===t?void 0:t.features_multiship)&&o.unshift("custom-script-values-multiship-checkout-fields"),new l(o.join(" ").trim())}renderBody(){var e,t,o,n,i,a,l;const u=[["billing_address1","billing_address2","billing_city","billing_region","billing_postal_code","billing_country"],["billing_first_name","billing_last_name","billing_company","billing_tax_id","billing_phone","coupon_entry"]],_=[["show_product_weight","show_product_category","show_product_code","show_product_options"],["show_sub_frequency","show_sub_startdate","show_sub_nextdate","show_sub_enddate"]],d=this.__formJson.csp.usage,p=null===(t=null===(e=this.__dataJson)||void 0===e?void 0:e.csp)||void 0===t?void 0:t.usage;return s(S||(S=E` ${0} <foxy-internal-summary-control infer="cart-group-one"> <foxy-internal-select-control json-template="${0}" json-path="cart_type" property="json" options="${0}" layout="summary-item" infer="cart-type"> </foxy-internal-select-control> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="cart_display_config.usage" property="json" infer="cart-display-config-usage" invert> </foxy-internal-switch-control> </foxy-internal-summary-control> <div class="grid sm-grid-cols-2 gap-m" ?hidden="${0}"> ${0} </div> <foxy-internal-summary-control infer="cart-group-four"> <foxy-internal-editable-list-control json-template="${0}" json-path="cart_display_config.hidden_product_options" property="json" layout="summary-item" infer="cart-display-config-hidden-product-options" simple-value> </foxy-internal-editable-list-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="country-and-region-group-one"> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="foxycomplete.usage" property="json" infer="foxycomplete-usage"> </foxy-internal-switch-control> <foxy-internal-select-control options="${0}" layout="summary-item" infer="foxycomplete-show-combobox" .getValue="${0}" .setValue="${0}"> </foxy-internal-select-control> <foxy-internal-text-control json-template="${0}" json-path="foxycomplete.combobox_open" property="json" layout="summary-item" infer="foxycomplete-combobox-open"> </foxy-internal-text-control> <foxy-internal-text-control json-template="${0}" json-path="foxycomplete.combobox_close" property="json" layout="summary-item" infer="foxycomplete-combobox-close"> </foxy-internal-text-control> <foxy-internal-switch-control json-template="${0}" json-path="foxycomplete.show_flags" property="json" infer="foxycomplete-show-flags"> </foxy-internal-switch-control> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="enabled" json-path="postal_code_lookup.usage" property="json" infer="postal-code-lookup"> </foxy-internal-switch-control> <foxy-internal-select-control json-template="${0}" json-path="location_filtering.usage" property="json" options="${0}" layout="summary-item" infer="location-filtering-usage"> </foxy-internal-select-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="country-and-region-group-two"> <foxy-internal-select-control json-template="${0}" json-path="location_filtering.shipping_filter_type" property="json" options="${0}" layout="summary-item" infer="location-filtering-filter-type" .setValue="${0}"> </foxy-internal-select-control> <foxy-internal-template-config-form-filter-values-control json-template="${0}" json-path="location_filtering.shipping_filter_values" countries="${0}" property="json" infer="location-filtering-filter-values" .setValue="${0}"> </foxy-internal-template-config-form-filter-values-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="country-and-region-group-three"> <foxy-internal-select-control json-template="${0}" json-path="location_filtering.shipping_filter_type" property="json" options="${0}" layout="summary-item" infer="location-filtering-shipping-filter-type"> </foxy-internal-select-control> <foxy-internal-template-config-form-filter-values-control json-template="${0}" json-path="location_filtering.shipping_filter_values" countries="${0}" property="json" infer="location-filtering-shipping-filter-values"> </foxy-internal-template-config-form-filter-values-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="country-and-region-group-four"> <foxy-internal-select-control json-template="${0}" json-path="location_filtering.billing_filter_type" property="json" options="${0}" layout="summary-item" infer="location-filtering-billing-filter-type"> </foxy-internal-select-control> <foxy-internal-template-config-form-filter-values-control json-template="${0}" json-path="location_filtering.billing_filter_values" countries="${0}" property="json" infer="location-filtering-billing-filter-values"> </foxy-internal-template-config-form-filter-values-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="customer-accounts"> <foxy-internal-select-control json-template="${0}" json-path="checkout_type" property="json" options="${0}" layout="summary-item" infer="checkout-type-account" .getValue="${0}"> </foxy-internal-select-control> <foxy-internal-select-control json-template="${0}" json-path="checkout_type" property="json" options="${0}" layout="summary-item" infer="checkout-type-default"> </foxy-internal-select-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="consent-group-one"> <foxy-internal-select-control json-template="${0}" json-path="tos_checkbox_settings.usage" property="json" options="${0}" layout="summary-item" infer="tos-checkbox-settings-usage"> </foxy-internal-select-control> <foxy-internal-text-control json-template="${0}" json-path="tos_checkbox_settings.url" property="json" layout="summary-item" infer="tos-checkbox-settings-url"> </foxy-internal-text-control> <foxy-internal-select-control json-template="${0}" json-path="tos_checkbox_settings.initial_state" property="json" options="${0}" layout="summary-item" infer="tos-checkbox-settings-initial-state"> </foxy-internal-select-control> <foxy-internal-switch-control json-template="${0}" json-path="tos_checkbox_settings.is_hidden" property="json" infer="tos-checkbox-settings-is-hidden"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="consent-group-two"> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="eu_secure_data_transfer_consent.usage" property="json" infer="eu-secure-data-transfer-consent-usage"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="consent-group-three"> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="newsletter_subscribe.usage" property="json" infer="newsletter-subscribe-usage"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="supported-cards-group"> <foxy-internal-template-config-form-supported-cards-control json-template="${0}" json-path="supported_payment_cards" property="json" infer="supported-payment-cards"> </foxy-internal-template-config-form-supported-cards-control> <p class="flex items-start gap-s"> ${0} <foxy-i18n infer="" key="disclaimer"></foxy-i18n> </p> </foxy-internal-summary-control> <foxy-internal-summary-control infer="csc-requirements-group"> <foxy-internal-select-control json-template="${0}" json-path="csc_requirements" property="json" options="${0}" layout="summary-item" infer="csc-requirements"> </foxy-internal-select-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="checkout-fields-group-one"> <foxy-internal-switch-control json-template="${0}" false-alias="disabled" true-alias="enabled" json-path="custom_checkout_field_requirements.cart_controls" property="json" infer="custom-checkout-field-requirements-cart-controls"> </foxy-internal-switch-control> </foxy-internal-summary-control> <div class="grid sm-grid-cols-2 gap-m" ?hidden="${0}"> ${0} </div> <foxy-internal-summary-control infer="csp" class="space-y-m" layout="section"> <foxy-internal-summary-control infer="csp-group-one"> <foxy-internal-switch-control json-template="${0}" json-path="csp.usage" property="json" infer="csp-enable-csp" .getValue="${0}" .setValue="${0}"> </foxy-internal-switch-control> ${0} </foxy-internal-summary-control> <foxy-internal-summary-control infer="csp-group-two"> <foxy-internal-switch-control json-template="${0}" json-path="csp.usage" property="json" infer="csp-enable-ro-csp" .getValue="${0}" .setValue="${0}"> </foxy-internal-switch-control> ${0} </foxy-internal-summary-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="analytics-config"> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="analytics_config.usage" property="json" infer="analytics-config-usage"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="analytics-config-google-analytics"> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="analytics_config.google_analytics.usage" property="json" infer="analytics-config-google-analytics-usage"> </foxy-internal-switch-control> <foxy-internal-text-control json-template="${0}" json-path="analytics_config.google_analytics.account_id" property="json" layout="summary-item" infer="analytics-config-google-analytics-account-id"> </foxy-internal-text-control> <foxy-internal-switch-control json-template="${0}" json-path="analytics_config.google_analytics.include_on_site" property="json" infer="analytics-config-google-analytics-include-on-site"> </foxy-internal-switch-control> <p class="flex items-start gap-s bg-error-10 text-error"> ${0} <foxy-i18n infer="" key="deprecation_notice"></foxy-i18n> </p> </foxy-internal-summary-control> <foxy-internal-summary-control infer="analytics-config-google-tag"> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="analytics_config.google_tag.usage" property="json" infer="analytics-config-google-tag-usage"> </foxy-internal-switch-control> <foxy-internal-text-control json-template="${0}" json-path="analytics_config.google_tag.account_id" property="json" layout="summary-item" infer="analytics-config-google-tag-account-id"> </foxy-internal-text-control> <foxy-internal-text-control json-template="${0}" json-path="analytics_config.google_tag.send_to" property="json" layout="summary-item" infer="analytics-config-google-tag-send-to"> </foxy-internal-text-control> <p class="flex items-start gap-s"> ${0} <span> <foxy-i18n infer="" key="usage_notice"></foxy-i18n> <br> <a target="_blank" class="cursor-pointer group text-primary rounded-s font-medium focus-outline-none focus-ring-2 focus-ring-primary-50" href="https://wiki.foxycart.com/v/2.0/analytics#google_tag_ga4_google_ads" rel="nofollow noreferrer noopener"> <foxy-i18n class="transition-opacity group-hover-opacity-80" infer="" key="docs_link"> </foxy-i18n> </a> </span> </p> </foxy-internal-summary-control> <foxy-internal-summary-control infer="debug"> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="debug.usage" property="json" infer="debug-usage"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-source-control infer="custom-config" .getValue="${0}" .setValue="${0}"> </foxy-internal-source-control> <foxy-internal-source-control json-template="${0}" json-path="custom_script_values.header" property="json" infer="custom-script-values-header"> </foxy-internal-source-control> <foxy-internal-source-control json-template="${0}" json-path="custom_script_values.checkout_fields" property="json" infer="custom-script-values-checkout-fields"> </foxy-internal-source-control> <foxy-internal-source-control json-template="${0}" json-path="custom_script_values.multiship_checkout_fields" property="json" infer="custom-script-values-multiship-checkout-fields"> </foxy-internal-source-control> <foxy-internal-source-control json-template="${0}" json-path="custom_script_values.footer" property="json" infer="custom-script-values-footer"> </foxy-internal-source-control> ${0} <foxy-nucleon class="hidden" infer="" href="${0}" id="storeLoader" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),this.__defaultJSON,this.__cartTypeOptions,this.__defaultJSON,_.every(((e,t)=>e.every((e=>{const o=`cart-group-${0===t?"two":"three"}:cart-display-config-${e.replace(/_/g,"-")}`;return this.hiddenSelector.matches(o,!0)})))),_.map(((e,t)=>s(O||(O=E` <foxy-internal-summary-control infer="cart-group-${0}"> ${0} </foxy-internal-summary-control> `),0===t?"two":"three",e.map((e=>s(q||(q=E` <foxy-internal-switch-control json-template="${0}" json-path="cart_display_config.${0}" property="json" infer="cart-display-config-${0}"> </foxy-internal-switch-control> `),this.__defaultJSON,e,e.replace(/_/g,"-"))))))),this.__defaultJSON,this.__defaultJSON,this.__foxycompleteShowComboboxOptions,this.__foxycompleteShowComboboxGetValue,this.__foxycompleteShowComboboxSetValue,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,this.__locationFilteringUsageOptions,this.__defaultJSON,this.__locationFilteringFilterTypeOptions,this.__locationFilteringFilterTypeSetValue,this.__defaultJSON,c(null!==(o=this.countries)&&void 0!==o?o:void 0),this.__locationFilteringFilterValuesSetValue,this.__defaultJSON,this.__locationFilteringFilterTypeOptions,this.__defaultJSON,c(null!==(n=this.countries)&&void 0!==n?n:void 0),this.__defaultJSON,this.__locationFilteringFilterTypeOptions,this.__defaultJSON,c(null!==(i=this.countries)&&void 0!==i?i:void 0),this.__defaultJSON,this.__checkoutTypeAccountOptions,this.__checkoutTypeAccountGetValue,this.__defaultJSON,this.__checkoutTypeDefaultOptions,this.__defaultJSON,this.__tosCheckboxSettingsUsageOptions,this.__defaultJSON,this.__defaultJSON,this.__tosCheckboxSettingsInitialStateOptions,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,r(F||(F=E`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-primary" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>`)),this.__defaultJSON,this.__cscRequirementsValueOptions,this.__defaultJSON,u.every(((e,t)=>e.every((e=>{const o=`checkout-fields-group-${0===t?"two":"three"}:custom-checkout-field-requirements-${e.replace(/_/g,"-").replace("1","-one").replace("2","-two")}`;return this.hiddenSelector.matches(o,!0)})))),u.map(((e,t)=>s(J||(J=E` <foxy-internal-summary-control infer="checkout-fields-group-${0}"> ${0} </foxy-internal-summary-control> `),0===t?"two":"three",e.map((e=>{const t=e.replace(/_/g,"-").replace("1","-one").replace("2","-two"),o=`custom_checkout_field_requirements.${e}`;return s(N||(N=E` <foxy-internal-select-control json-template="${0}" json-path="${0}" property="json" options="${0}" layout="summary-item" infer="custom-checkout-field-requirements-${0}"> </foxy-internal-select-control> `),this.__defaultJSON,o,"coupon_entry"===e?this.__customCheckoutFieldCouponEntryRequirementsOptions:this.__customCheckoutFieldRequirementsOptions,t)}))))),this.__defaultJSON,this.__cspUsageGetValue,this.__cspUsageSetValue,"enforce"===d||"both"===d?s(C||(C=E` <foxy-internal-text-control json-template="${0}" json-path="csp.policy_enforce.reporting_endpoint" property="json" layout="summary-item" infer="csp-policy-enforce-reporting-endpoint"> </foxy-internal-text-control> <foxy-internal-editable-list-control json-template="${0}" json-path="csp.policy_enforce.script_src" property="json" layout="summary-item" infer="csp-policy-enforce-script-src" simple-value> </foxy-internal-editable-list-control> ${0} `),this.__defaultJSON,this.__defaultJSON,"none"===p||"report"===p?s(V||(V=E` <div class="flex items-start bg-error-10" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <p> <foxy-i18n infer="" key="warning"></foxy-i18n> <a target="_blank" class="inline-block rounded font-medium text-error transition-colors cursor-pointer hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-error-50" href="https://wiki.foxycart.com/v/2.0/content_security_policy"> wiki.foxycart.com </a> </p> </div> `),r(D||(D=E`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-error" style="width: 1.25em"><path fill-rule="evenodd" d="M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" clip-rule="evenodd" /></svg>`))):""):"",this.__defaultJSON,this.__cspRoUsageGetValue,this.__cspRoUsageSetValue,"report"===d||"both"===d?s(R||(R=E` <foxy-internal-text-control json-template="${0}" json-path="csp.policy_report.reporting_endpoint" property="json" layout="summary-item" infer="csp-policy-report-reporting-endpoint"> </foxy-internal-text-control> <foxy-internal-editable-list-control json-template="${0}" json-path="csp.policy_report.script_src" property="json" layout="summary-item" infer="csp-policy-report-script-src" simple-value> </foxy-internal-editable-list-control> ${0} `),this.__defaultJSON,this.__defaultJSON,"none"===p||"enforce"===p?s(T||(T=E` <div class="flex items-start bg-primary-10" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <p> <foxy-i18n infer="" key="warning"></foxy-i18n> <a target="_blank" class="inline-block rounded font-medium text-primary transition-colors cursor-pointer hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50" href="https://wiki.foxycart.com/v/2.0/content_security_policy"> wiki.foxycart.com </a> </p> </div> `),r(U||(U=E`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="flex-shrink-0 text-primary" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z" clip-rule="evenodd" /></svg>`))):""):"",this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,r(A||(A=E`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-error" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>`)),this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,r(z||(z=E`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-primary" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>`)),this.__defaultJSON,this.__customConfigGetValue,this.__customConfigSetValue,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,super.renderBody(),c(null!==(a=this.store)&&void 0!==a?a:null===(l=this.data)||void 0===l?void 0:l._links["fx:store"].href),(()=>this.requestUpdate()))}get __storeLoader(){return this.renderRoot.querySelector("#storeLoader")}get __formJson(){return this.form.json?JSON.parse(this.form.json):{cart_type:"default",checkout_type:"default_account",csc_requirements:"all_cards",tos_checkbox_settings:{usage:"none",initial_state:"unchecked",is_hidden:!1,url:""},eu_secure_data_transfer_consent:{usage:"required"},newsletter_subscribe:{usage:"none"},analytics_config:{usage:"none",google_analytics:{usage:"none",account_id:"",include_on_site:!1},google_tag:{usage:"none",send_to:"",account_id:""}},colors:{usage:"none",primary:"4D4D4D",secondary:"FFFFFF",tertiary:"FFFFFF"},use_checkout_confirmation_window:{usage:"none"},supported_payment_cards:["visa","mastercard","discover","amex"],custom_checkout_field_requirements:{cart_controls:"enabled",coupon_entry:"enabled",billing_first_name:"required",billing_last_name:"required",billing_company:"optional",billing_tax_id:"hidden",billing_phone:"optional",billing_address1:"required",billing_address2:"optional",billing_city:"required",billing_region:"default",billing_postal_code:"required",billing_country:"required"},cart_display_config:{usage:"none",show_product_weight:!0,show_product_category:!0,show_product_code:!0,show_product_options:!0,show_sub_frequency:!0,show_sub_startdate:!0,show_sub_nextdate:!0,show_sub_enddate:!0,hidden_product_options:[]},foxycomplete:{usage:"required",show_combobox:!0,combobox_open:"\\u25bc",combobox_close:"\\u25b2",show_flags:!0},custom_script_values:{header:"",footer:"",checkout_fields:"",multiship_checkout_fields:""},http_receipt:!1,custom_config:"",debug:{usage:"none"},location_filtering:{usage:"none",shipping_filter_type:"blacklist",billing_filter_type:"blacklist",shipping_filter_values:{},billing_filter_values:{}},postal_code_lookup:{usage:"enabled"},csp:{usage:"none"}}}get __dataJson(){var e;return(null===(e=this.data)||void 0===e?void 0:e.json)?JSON.parse(this.data.json):null}}customElements.define("foxy-template-config-form",B);export{B as TemplateConfigForm};
1
+ import"./shared-597193f7.js";import"./shared-4cc42648.js";import"./shared-d3414cf0.js";import"./shared-e502a7be.js";import"./shared-f8519b17.js";import"./shared-fc784ca0.js";import{I as e}from"./shared-77829fbb.js";import"./foxy-nucleon-element.js";import"./shared-10da9bf0.js";import{I as t,a as o}from"./shared-1e14a3fe.js";import{l as n}from"./shared-cf613436.js";import{c as i}from"./shared-4e709717.js";import{h as s,s as r}from"./shared-ba5c42c7.js";import{_ as a,B as l}from"./shared-7fec42f2.js";import{i as c}from"./shared-53e42a77.js";import{R as u,a as _}from"./shared-7a87cd33.js";import"./shared-005168e0.js";import"./shared-433eea12.js";import"./shared-64e243c4.js";import"./shared-b5a0d106.js";import"./shared-9e8344bf.js";import"./shared-5bcf861e.js";import"./shared-937e58bf.js";import"./shared-5fd5805c.js";import"./shared-d0aed1c1.js";import"./shared-53e476fd.js";import"./shared-df7d368c.js";import"./shared-809d503c.js";import"./shared-a268320e.js";import"./shared-e54135f0.js";import"./shared-85ed835a.js";import"./shared-529a82a3.js";import"./shared-278b8790.js";import"./shared-5963a49e.js";import"./shared-c929504f.js";import"./shared-a704aaa4.js";import"./shared-65b2760f.js";import"./shared-c782b9fa.js";import"./shared-0ea750af.js";import"./foxy-copy-to-clipboard.js";import"./shared-5b0c206b.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";import"./shared-69074dae.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-5212ef4f.js";let d,p,f=e=>e;customElements.define("foxy-internal-template-config-form-supported-cards-control",class extends t{renderControl(){const e={amex:"American Express",diners:"Diners Club",discover:"Discover",jcb:"JCB",maestro:"Maestro",mastercard:"Mastercard",unionpay:"UnionPay",visa:"Visa"};return s(d||(d=f` <div class="flex flex-wrap -m-xs"> ${0} </div> `),Object.entries(n).map((([t,o])=>{if(!e[t])return;const n=this._value.includes(t);return s(p||(p=f` <div data-testid="${0}" class="${0}"> <label class="${0}"> <div class="h-s">${0}</div> <div class="text-s font-medium mx-s my-auto leading-none">${0}</div> <input type="checkbox" class="sr-only" ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> </label> </div> `),t,i({"m-xs rounded":!0,"opacity-50 cursor-default":this.disabled,"cursor-pointer ring-primary-50 focus-within-ring-2":!this.disabled}),i({"overflow-hidden transition-colors flex rounded-s border":!0,"border-primary bg-primary-10 text-primary":n&&!this.readonly,"border-contrast bg-contrast-5 text-secondary":n&&this.readonly,"hover-text-body":n&&!this.disabled&&!this.readonly,"border-contrast-10":!n,"hover-border-primary":!n&&!this.disabled&&!this.readonly,"hover-text-primary":!n&&!this.disabled&&!this.readonly}),o,e[t],this.disabled,this.readonly,n,(e=>{if(this.readonly)return e.preventDefault();e.stopPropagation();const o=[...this._value];e.currentTarget.checked?o.push(t):o.splice(o.indexOf(t),1),this._value=o}))})))}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:[]}set _value(e){super._value=e}});let g,h,y,m,b,x=e=>e;let v,w,j,$,k=e=>e;customElements.define("foxy-internal-template-config-form-filter-values-control-item",class extends o{constructor(){super(...arguments),this.options={},this.regions=[],this.name="",this.code="",this.__newRegion=""}static get properties(){return a(a({},super.properties),{},{__newRegion:{attribute:!1},options:{type:Object},regions:{type:Array},name:{type:String},code:{type:String}})}render(){const e=Object.values(this.options),t=e.filter((e=>!this.regions.includes(e.c)));return s(g||(g=x` <div class="${0}"> <div data-testid="country" class="h-m flex justify-between items-center bg-contrast-5"> <div style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <span>${0}</span> </div> <button aria-label="${0}" class="${0}" style="width:calc(var(--lumo-size-s) - 2px);height:calc(var(--lumo-size-s) - 2px)" ?disabled="${0}" @click="${0}"> <iron-icon icon="icons:close" class="icon-inline text-m"></iron-icon> </button> </div> ${0} </div> `),i({"border border-contrast-5 rounded-s font-medium overflow-hidden":!0,"text-disabled":this.disabled}),this.name||this.code,this.t("delete"),i({"mr-xs items-center justify-center rounded-full transition-colors":!0,"hover-bg-error-10 hover-text-error":!this.disabled,"focus-outline-none focus-ring-2 ring-inset ring-error-50":!this.disabled,"cursor-default":this.disabled,flex:!this.readonly,hidden:this.readonly}),this.disabled,(()=>this.dispatchEvent(new CustomEvent("delete"))),0===e.length?"":s(h||(h=x` <div data-testid="regions" class="flex flex-wrap p-xs text-s"> ${0} ${0} </div> `),this.regions.map((e=>{var t;return s(y||(y=x` <div class="flex items-center rounded-s border border-contrast-10 h-s m-xs"> <span class="mx-s">${0}</span> <button aria-label="${0}" class="${0}" style="width:calc(var(--lumo-size-s) - 2px);height:calc(var(--lumo-size-s) - 2px)" ?disabled="${0}" @click="${0}"> <iron-icon icon="icons:close" class="icon-inline text-m"></iron-icon> </button> </div> `),(null===(t=this.options[e])||void 0===t?void 0:t.n)||e,this.t("delete"),i({"items-center justify-center rounded-s transition-colors":!0,"hover-bg-error-10 hover-text-error":!this.disabled,"focus-outline-none focus-ring-2 ring-inset ring-primary-50":!this.disabled,"cursor-default":this.disabled,flex:!this.readonly,hidden:this.readonly}),this.disabled,(()=>{this.regions=this.regions.filter((t=>t!==e)),this.dispatchEvent(new CustomEvent("update:regions"))}))})),0===t.length?"":s(m||(m=x` <div data-testid="new-region" class="${0}"> <select class="${0}" ?disabled="${0}" @change="${0}"> <option value="" disabled="disabled" selected="selected">${0}</option> ${0} </select> </div> `),i({"h-s m-xs items-center transition-colors border border-contrast-10 rounded-s":!0,"focus-within-ring-1 ring-primary-50 focus-within-border-primary-50":!this.disabled,flex:!this.readonly,hidden:this.readonly}),i({"appearance-none bg-transparent h-s text-s px-s font-medium":!0,"transition-colors rounded-s focus-outline-none":!0,"cursor-pointer hover-bg-contrast-5":!this.disabled}),this.disabled,(e=>{const t=e.currentTarget;this.__newRegion=t.value,this.__addRegion(),t.value=""}),this.t("add_region"),t.map((e=>s(b||(b=x`<option value="${0}">${0}</option>`),e.c,e.n))))))}__addRegion(){this.regions=[...new Set([...this.regions,this.__newRegion])],this.__newRegion="",this.dispatchEvent(new CustomEvent("update:regions"))}}),customElements.define("foxy-internal-template-config-form-filter-values-control",class extends t{constructor(){super(...arguments),this.countries=null,this.__newCountry=""}static get properties(){return a(a({},super.properties),{},{__newCountry:{attribute:!1},countries:{}})}renderControl(){var e,t,o,n;const r=Object.values(null!==(o=null===(t=null===(e=this.__countriesLoader)||void 0===e?void 0:e.data)||void 0===t?void 0:t.values)&&void 0!==o?o:{}),l=r.filter((e=>!(e.cc2 in this._value)));return s(v||(v=k` <div class="space-y-s" data-testid="countries"> ${0} ${0} </div> <foxy-nucleon infer="" href="${0}" id="countriesLoader" @update="${0}"> </foxy-nucleon> `),Object.entries(this._value).map((([e,t])=>{var o;const n=r.find((t=>t.cc2===e));return s(w||(w=k` <foxy-internal-template-config-form-filter-values-control-item regions="${0}" options="${0}" infer="" code="${0}" name="${0}" ?disabled="${0}" ?readonly="${0}" @update:regions="${0}" @delete="${0}"> </foxy-internal-template-config-form-filter-values-control-item> `),JSON.stringify("*"===t?[]:t),JSON.stringify(Array.isArray(null==n?void 0:n.regions)?{}:null!==(o=null==n?void 0:n.regions)&&void 0!==o?o:{}),e,c(null==n?void 0:n.default),this.disabled,this.readonly,(t=>{const o=a({},this._value),n=t.currentTarget.regions;o[e]=n.length?n:"*",this._value=o}),(()=>{const t=a({},this._value);delete t[e],this._value=t}))})),0===l.length&&0!==r.length?"":s(j||(j=k` <div data-testid="new-country" class="${0}"> <select class="${0}" ?disabled="${0}" @change="${0}"> <option value="" disabled="disabled" selected="selected">${0}</option> ${0} </select> </div> `),i({"h-m flex items-center rounded-s transition-colors":!0,"border border-contrast-10 ring-primary-50":!0,"focus-within-ring-1 focus-within-border-primary-50":!this.disabled,flex:!this.readonly,hidden:this.readonly}),i({"appearance-none bg-transparent h-m text-m px-s flex-1 font-medium":!0,"transition-colors rounded-s focus-outline-none":!0,"cursor-pointer hover-bg-contrast-5":!this.disabled,"text-disabled":this.disabled}),this.disabled,(e=>{const t=e.currentTarget;this.__newCountry=t.value,this.__addCountry(),t.value=""}),this.t("add_country"),l.map((e=>s($||($=k`<option value="${0}">${0}</option>`),e.cc2,e.default)))),c(null!==(n=this.countries)&&void 0!==n?n:void 0),(()=>this.requestUpdate()))}__addCountry(){this._value=a(a({},this._value),{},{[this.__newCountry]:"*"}),this.__newCountry=""}get __countriesLoader(){return this.renderRoot.querySelector("#countriesLoader")}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:{}}set _value(e){super._value=e}});let S,O,q,F,J,N,C,V,D,R,T,U,A,z,E=e=>e;const G=u(_(e,"template-config-form"));class B extends G{constructor(){super(...arguments),this.countries=null,this.regions=null,this.store=null,this.__customCheckoutFieldCouponEntryRequirementsOptions=JSON.stringify([{label:"option_enabled",value:"enabled"},{label:"option_disabled",value:"disabled"}]),this.__customCheckoutFieldRequirementsOptions=JSON.stringify([{label:"option_default",value:"default"},{label:"option_optional",value:"optional"},{label:"option_required",value:"required"},{label:"option_hidden",value:"hidden"}]),this.__tosCheckboxSettingsInitialStateOptions=JSON.stringify([{label:"option_checked",value:"checked"},{label:"option_unchecked",value:"unchecked"}]),this.__locationFilteringFilterTypeOptions=JSON.stringify([{label:"option_blocklist",value:"blacklist"},{label:"option_allowlist",value:"whitelist"}]),this.__foxycompleteShowComboboxOptions=JSON.stringify([{label:"option_combobox",value:"combobox"},{label:"option_search",value:"search"}]),this.__tosCheckboxSettingsUsageOptions=JSON.stringify([{label:"option_none",value:"none"},{label:"option_optional",value:"optional"},{label:"option_required",value:"required"}]),this.__locationFilteringUsageOptions=JSON.stringify([{label:"option_none",value:"none"},{label:"option_shipping",value:"shipping"},{label:"option_billing",value:"billing"},{label:"option_both",value:"both"},{label:"option_independent",value:"independent"}]),this.__cscRequirementsValueOptions=JSON.stringify([{label:"option_all_cards",value:"all_cards"},{label:"option_sso_only",value:"sso_only"},{label:"option_new_cards_only",value:"new_cards_only"}]),this.__checkoutTypeDefaultOptions=JSON.stringify([{label:"option_default_account",value:"default_account"},{label:"option_default_guest",value:"default_guest"}]),this.__checkoutTypeAccountOptions=JSON.stringify([{label:"option_account",value:"account_only"},{label:"option_guest",value:"guest_only"},{label:"option_both",value:"default_guest"}]),this.__cartTypeOptions=JSON.stringify([{label:"option_default",value:"default"},{label:"option_fullpage",value:"fullpage"},{label:"option_custom",value:"custom"}]),this.__locationFilteringFilterValuesSetValue=e=>{const t=this.__formJson,o=a(a({},t.location_filtering),{},{shipping_filter_values:e,billing_filter_values:e});this.edit({json:JSON.stringify(a(a({},t),{},{location_filtering:o}))})},this.__locationFilteringFilterTypeSetValue=e=>{const t=this.__formJson,o=a(a({},t.location_filtering),{},{shipping_filter_type:e,billing_filter_type:e});this.edit({json:JSON.stringify(a(a({},t),{},{location_filtering:o}))})},this.__foxycompleteShowComboboxGetValue=()=>this.__formJson.foxycomplete.show_combobox?"combobox":"search",this.__foxycompleteShowComboboxSetValue=e=>{const t="combobox"===e,o=a(a({},this.__formJson.foxycomplete),{},{show_combobox:t});this.edit({json:JSON.stringify(a(a({},this.__formJson),{},{foxycomplete:o}))})},this.__checkoutTypeAccountGetValue=()=>{const e=this.__formJson;return e.checkout_type.includes("default")?"default_guest":e.checkout_type},this.__customConfigGetValue=()=>{const e=this.__formJson;return"string"==typeof e.custom_config?e.custom_config:JSON.stringify(e.custom_config,null,2)},this.__customConfigSetValue=e=>{const t=this.__formJson;try{t.custom_config=JSON.parse(e)}catch(o){t.custom_config=e}this.edit({json:JSON.stringify(t)})},this.__cspUsageGetValue=()=>{const e=this.__formJson.csp.usage;return"enforce"===e||"both"===e},this.__cspUsageSetValue=e=>{const t=this.__formJson,o=t.csp.usage,n={false:{both:"report",enforce:"none"},true:{report:"both",none:"enforce"}}[String(e)][o];if(n){const e=a(a({},t),{},{csp:a(a({},t.csp),{},{usage:n})});this.edit({json:JSON.stringify(e)})}},this.__cspRoUsageGetValue=()=>{const e=this.__formJson.csp.usage;return"report"===e||"both"===e},this.__cspRoUsageSetValue=e=>{const t=this.__formJson,o=t.csp.usage,n={false:{both:"enforce",report:"none"},true:{enforce:"both",none:"report"}}[String(e)][o];if(n){const e=a(a({},t),{},{csp:a(a({},t.csp),{},{usage:n})});this.edit({json:JSON.stringify(e)})}},this.__defaultJSON=JSON.stringify({cart_type:"default",checkout_type:"default_account",csc_requirements:"all_cards",tos_checkbox_settings:{usage:"none",initial_state:"unchecked",is_hidden:!1,url:""},eu_secure_data_transfer_consent:{usage:"required"},newsletter_subscribe:{usage:"none"},analytics_config:{usage:"none",google_analytics:{usage:"none",account_id:"",include_on_site:!1},google_tag:{usage:"none",send_to:"",account_id:""}},colors:{usage:"none",primary:"4D4D4D",secondary:"FFFFFF",tertiary:"FFFFFF"},use_checkout_confirmation_window:{usage:"none"},supported_payment_cards:["visa","mastercard","discover","amex"],custom_checkout_field_requirements:{cart_controls:"enabled",coupon_entry:"enabled",billing_first_name:"required",billing_last_name:"required",billing_company:"optional",billing_tax_id:"hidden",billing_phone:"optional",billing_address1:"required",billing_address2:"optional",billing_city:"required",billing_region:"default",billing_postal_code:"required",billing_country:"required"},cart_display_config:{usage:"none",show_product_weight:!0,show_product_category:!0,show_product_code:!0,show_product_options:!0,show_sub_frequency:!0,show_sub_startdate:!0,show_sub_nextdate:!0,show_sub_enddate:!0,hidden_product_options:[]},foxycomplete:{usage:"required",show_combobox:!0,combobox_open:"\\u25bc",combobox_close:"\\u25b2",show_flags:!0},custom_script_values:{header:"",footer:"",checkout_fields:"",multiship_checkout_fields:""},http_receipt:!1,custom_config:"",debug:{usage:"none"},location_filtering:{usage:"none",shipping_filter_type:"blacklist",billing_filter_type:"blacklist",shipping_filter_values:{},billing_filter_values:{}},postal_code_lookup:{usage:"enabled"},csp:{usage:"none"}})}static get properties(){return a(a({},super.properties),{},{countries:{},regions:{},store:{}})}static get v8n(){return[({json:e})=>{var t,o;return(null!==(o=null===(t=(e?JSON.parse(e):{cart_type:"default",checkout_type:"default_account",csc_requirements:"all_cards",tos_checkbox_settings:{usage:"none",initial_state:"unchecked",is_hidden:!1,url:""},eu_secure_data_transfer_consent:{usage:"required"},newsletter_subscribe:{usage:"none"},analytics_config:{usage:"none",google_analytics:{usage:"none",account_id:"",include_on_site:!1},google_tag:{usage:"none",send_to:"",account_id:""}},colors:{usage:"none",primary:"4D4D4D",secondary:"FFFFFF",tertiary:"FFFFFF"},use_checkout_confirmation_window:{usage:"none"},supported_payment_cards:["visa","mastercard","discover","amex"],custom_checkout_field_requirements:{cart_controls:"enabled",coupon_entry:"enabled",billing_first_name:"required",billing_last_name:"required",billing_company:"optional",billing_tax_id:"hidden",billing_phone:"optional",billing_address1:"required",billing_address2:"optional",billing_city:"required",billing_region:"default",billing_postal_code:"required",billing_country:"required"},cart_display_config:{usage:"none",show_product_weight:!0,show_product_category:!0,show_product_code:!0,show_product_options:!0,show_sub_frequency:!0,show_sub_startdate:!0,show_sub_nextdate:!0,show_sub_enddate:!0,hidden_product_options:[]},foxycomplete:{usage:"required",show_combobox:!0,combobox_open:"\\u25bc",combobox_close:"\\u25b2",show_flags:!0},custom_script_values:{header:"",footer:"",checkout_fields:"",multiship_checkout_fields:""},http_receipt:!1,custom_config:"",debug:{usage:"none"},location_filtering:{usage:"none",shipping_filter_type:"blacklist",billing_filter_type:"blacklist",shipping_filter_values:{},billing_filter_values:{}},postal_code_lookup:{usage:"enabled"},csp:{usage:"none"}}).csp.policy_enforce)||void 0===t?void 0:t.reporting_endpoint)&&void 0!==o?o:"").length<=1e3||"csp-policy-enforce-reporting-endpoint:v8n_too_long"},({json:e})=>{var t,o;return(null!==(o=null===(t=(e?JSON.parse(e):{cart_type:"default",checkout_type:"default_account",csc_requirements:"all_cards",tos_checkbox_settings:{usage:"none",initial_state:"unchecked",is_hidden:!1,url:""},eu_secure_data_transfer_consent:{usage:"required"},newsletter_subscribe:{usage:"none"},analytics_config:{usage:"none",google_analytics:{usage:"none",account_id:"",include_on_site:!1},google_tag:{usage:"none",send_to:"",account_id:""}},colors:{usage:"none",primary:"4D4D4D",secondary:"FFFFFF",tertiary:"FFFFFF"},use_checkout_confirmation_window:{usage:"none"},supported_payment_cards:["visa","mastercard","discover","amex"],custom_checkout_field_requirements:{cart_controls:"enabled",coupon_entry:"enabled",billing_first_name:"required",billing_last_name:"required",billing_company:"optional",billing_tax_id:"hidden",billing_phone:"optional",billing_address1:"required",billing_address2:"optional",billing_city:"required",billing_region:"default",billing_postal_code:"required",billing_country:"required"},cart_display_config:{usage:"none",show_product_weight:!0,show_product_category:!0,show_product_code:!0,show_product_options:!0,show_sub_frequency:!0,show_sub_startdate:!0,show_sub_nextdate:!0,show_sub_enddate:!0,hidden_product_options:[]},foxycomplete:{usage:"required",show_combobox:!0,combobox_open:"\\u25bc",combobox_close:"\\u25b2",show_flags:!0},custom_script_values:{header:"",footer:"",checkout_fields:"",multiship_checkout_fields:""},http_receipt:!1,custom_config:"",debug:{usage:"none"},location_filtering:{usage:"none",shipping_filter_type:"blacklist",billing_filter_type:"blacklist",shipping_filter_values:{},billing_filter_values:{}},postal_code_lookup:{usage:"enabled"},csp:{usage:"none"}}).csp.policy_report)||void 0===t?void 0:t.reporting_endpoint)&&void 0!==o?o:"").length<=1e3||"csp-policy-report-reporting-endpoint:v8n_too_long"},({json:e})=>{var t,o;return(null!==(o=null===(t=(e?JSON.parse(e):{cart_type:"default",checkout_type:"default_account",csc_requirements:"all_cards",tos_checkbox_settings:{usage:"none",initial_state:"unchecked",is_hidden:!1,url:""},eu_secure_data_transfer_consent:{usage:"required"},newsletter_subscribe:{usage:"none"},analytics_config:{usage:"none",google_analytics:{usage:"none",account_id:"",include_on_site:!1},google_tag:{usage:"none",send_to:"",account_id:""}},colors:{usage:"none",primary:"4D4D4D",secondary:"FFFFFF",tertiary:"FFFFFF"},use_checkout_confirmation_window:{usage:"none"},supported_payment_cards:["visa","mastercard","discover","amex"],custom_checkout_field_requirements:{cart_controls:"enabled",coupon_entry:"enabled",billing_first_name:"required",billing_last_name:"required",billing_company:"optional",billing_tax_id:"hidden",billing_phone:"optional",billing_address1:"required",billing_address2:"optional",billing_city:"required",billing_region:"default",billing_postal_code:"required",billing_country:"required"},cart_display_config:{usage:"none",show_product_weight:!0,show_product_category:!0,show_product_code:!0,show_product_options:!0,show_sub_frequency:!0,show_sub_startdate:!0,show_sub_nextdate:!0,show_sub_enddate:!0,hidden_product_options:[]},foxycomplete:{usage:"required",show_combobox:!0,combobox_open:"\\u25bc",combobox_close:"\\u25b2",show_flags:!0},custom_script_values:{header:"",footer:"",checkout_fields:"",multiship_checkout_fields:""},http_receipt:!1,custom_config:"",debug:{usage:"none"},location_filtering:{usage:"none",shipping_filter_type:"blacklist",billing_filter_type:"blacklist",shipping_filter_values:{},billing_filter_values:{}},postal_code_lookup:{usage:"enabled"},csp:{usage:"none"}}).csp.policy_enforce)||void 0===t?void 0:t.script_src)&&void 0!==o?o:[]).every((e=>e.length<=1e3))||"csp-policy-enforce-script-src:v8n_too_long"},({json:e})=>{var t,o;return(null!==(o=null===(t=(e?JSON.parse(e):{cart_type:"default",checkout_type:"default_account",csc_requirements:"all_cards",tos_checkbox_settings:{usage:"none",initial_state:"unchecked",is_hidden:!1,url:""},eu_secure_data_transfer_consent:{usage:"required"},newsletter_subscribe:{usage:"none"},analytics_config:{usage:"none",google_analytics:{usage:"none",account_id:"",include_on_site:!1},google_tag:{usage:"none",send_to:"",account_id:""}},colors:{usage:"none",primary:"4D4D4D",secondary:"FFFFFF",tertiary:"FFFFFF"},use_checkout_confirmation_window:{usage:"none"},supported_payment_cards:["visa","mastercard","discover","amex"],custom_checkout_field_requirements:{cart_controls:"enabled",coupon_entry:"enabled",billing_first_name:"required",billing_last_name:"required",billing_company:"optional",billing_tax_id:"hidden",billing_phone:"optional",billing_address1:"required",billing_address2:"optional",billing_city:"required",billing_region:"default",billing_postal_code:"required",billing_country:"required"},cart_display_config:{usage:"none",show_product_weight:!0,show_product_category:!0,show_product_code:!0,show_product_options:!0,show_sub_frequency:!0,show_sub_startdate:!0,show_sub_nextdate:!0,show_sub_enddate:!0,hidden_product_options:[]},foxycomplete:{usage:"required",show_combobox:!0,combobox_open:"\\u25bc",combobox_close:"\\u25b2",show_flags:!0},custom_script_values:{header:"",footer:"",checkout_fields:"",multiship_checkout_fields:""},http_receipt:!1,custom_config:"",debug:{usage:"none"},location_filtering:{usage:"none",shipping_filter_type:"blacklist",billing_filter_type:"blacklist",shipping_filter_values:{},billing_filter_values:{}},postal_code_lookup:{usage:"enabled"},csp:{usage:"none"}}).csp.policy_report)||void 0===t?void 0:t.script_src)&&void 0!==o?o:[]).every((e=>e.length<=1e3))||"csp-policy-report-script-src:v8n_too_long"}]}get hiddenSelector(){var e,t;const o=[super.hiddenSelector.toString()],n=this.__dataJson,i=this.__formJson,s=i.location_filtering.usage,r=i.checkout_type;return"required"!==i.cart_display_config.usage&&o.unshift("cart-group-two","cart-group-three","cart-group-four"),"required"!==i.foxycomplete.usage&&o.unshift("country-and-region-group-one:foxycomplete-show-combobox","country-and-region-group-one:foxycomplete-combobox-open","country-and-region-group-one:foxycomplete-combobox-close","country-and-region-group-one:foxycomplete-show-flags"),!1===i.foxycomplete.show_combobox&&o.unshift("country-and-region-group-one:foxycomplete-combobox-open","country-and-region-group-one:foxycomplete-combobox-close"),"both"!==s&&o.unshift("country-and-region-group-two"),"shipping"!==s&&"independent"!==s&&o.unshift("country-and-region-group-three"),"billing"!==s&&"independent"!==s&&o.unshift("country-and-region-group-four"),"default_account"!==r&&"default_guest"!==r&&o.unshift("customer-accounts:checkout-type-default"),"none"===i.tos_checkbox_settings.usage&&o.unshift("consent-group-one:tos-checkbox-settings-url","consent-group-one:tos-checkbox-settings-initial-state","consent-group-one:tos-checkbox-settings-is-hidden"),"required"!==i.analytics_config.usage&&o.unshift("analytics-config-google-analytics","analytics-config-google-tag"),"required"!==(null==n?void 0:n.analytics_config.google_analytics.usage)&&o.unshift("analytics-config-google-analytics"),"required"!==i.analytics_config.google_analytics.usage&&o.unshift("analytics-config-google-analytics:analytics-config-google-analytics-account-id","analytics-config-google-analytics:analytics-config-google-analytics-include-on-site"),"required"!==i.analytics_config.google_tag.usage&&(o.unshift("analytics-config-google-tag:analytics-config-google-tag-account-id"),o.unshift("analytics-config-google-tag:analytics-config-google-tag-send-to")),!0!==(null===(t=null===(e=this.__storeLoader)||void 0===e?void 0:e.data)||void 0===t?void 0:t.features_multiship)&&o.unshift("custom-script-values-multiship-checkout-fields"),new l(o.join(" ").trim())}renderBody(){var e,t,o,n,i,a,l;const u=[["billing_address1","billing_address2","billing_city","billing_region","billing_postal_code","billing_country"],["billing_first_name","billing_last_name","billing_company","billing_tax_id","billing_phone","coupon_entry"]],_=[["show_product_weight","show_product_category","show_product_code","show_product_options"],["show_sub_frequency","show_sub_startdate","show_sub_nextdate","show_sub_enddate"]],d=this.__formJson.csp.usage,p=null===(t=null===(e=this.__dataJson)||void 0===e?void 0:e.csp)||void 0===t?void 0:t.usage;return s(S||(S=E` ${0} <foxy-internal-summary-control infer="cart-group-one"> <foxy-internal-select-control json-template="${0}" json-path="cart_type" property="json" options="${0}" layout="summary-item" infer="cart-type"> </foxy-internal-select-control> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="cart_display_config.usage" property="json" infer="cart-display-config-usage" invert> </foxy-internal-switch-control> </foxy-internal-summary-control> <div class="grid sm-grid-cols-2 gap-m" ?hidden="${0}"> ${0} </div> <foxy-internal-summary-control infer="cart-group-four"> <foxy-internal-editable-list-control json-template="${0}" json-path="cart_display_config.hidden_product_options" property="json" layout="summary-item" infer="cart-display-config-hidden-product-options" simple-value> </foxy-internal-editable-list-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="country-and-region-group-one"> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="foxycomplete.usage" property="json" infer="foxycomplete-usage"> </foxy-internal-switch-control> <foxy-internal-select-control options="${0}" layout="summary-item" infer="foxycomplete-show-combobox" .getValue="${0}" .setValue="${0}"> </foxy-internal-select-control> <foxy-internal-text-control json-template="${0}" json-path="foxycomplete.combobox_open" property="json" layout="summary-item" infer="foxycomplete-combobox-open"> </foxy-internal-text-control> <foxy-internal-text-control json-template="${0}" json-path="foxycomplete.combobox_close" property="json" layout="summary-item" infer="foxycomplete-combobox-close"> </foxy-internal-text-control> <foxy-internal-switch-control json-template="${0}" json-path="foxycomplete.show_flags" property="json" infer="foxycomplete-show-flags"> </foxy-internal-switch-control> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="enabled" json-path="postal_code_lookup.usage" property="json" infer="postal-code-lookup"> </foxy-internal-switch-control> <foxy-internal-select-control json-template="${0}" json-path="location_filtering.usage" property="json" options="${0}" layout="summary-item" infer="location-filtering-usage"> </foxy-internal-select-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="country-and-region-group-two"> <foxy-internal-select-control json-template="${0}" json-path="location_filtering.shipping_filter_type" property="json" options="${0}" layout="summary-item" infer="location-filtering-filter-type" .setValue="${0}"> </foxy-internal-select-control> <foxy-internal-template-config-form-filter-values-control json-template="${0}" json-path="location_filtering.shipping_filter_values" countries="${0}" property="json" infer="location-filtering-filter-values" .setValue="${0}"> </foxy-internal-template-config-form-filter-values-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="country-and-region-group-three"> <foxy-internal-select-control json-template="${0}" json-path="location_filtering.shipping_filter_type" property="json" options="${0}" layout="summary-item" infer="location-filtering-shipping-filter-type"> </foxy-internal-select-control> <foxy-internal-template-config-form-filter-values-control json-template="${0}" json-path="location_filtering.shipping_filter_values" countries="${0}" property="json" infer="location-filtering-shipping-filter-values"> </foxy-internal-template-config-form-filter-values-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="country-and-region-group-four"> <foxy-internal-select-control json-template="${0}" json-path="location_filtering.billing_filter_type" property="json" options="${0}" layout="summary-item" infer="location-filtering-billing-filter-type"> </foxy-internal-select-control> <foxy-internal-template-config-form-filter-values-control json-template="${0}" json-path="location_filtering.billing_filter_values" countries="${0}" property="json" infer="location-filtering-billing-filter-values"> </foxy-internal-template-config-form-filter-values-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="customer-accounts"> <foxy-internal-select-control json-template="${0}" json-path="checkout_type" property="json" options="${0}" layout="summary-item" infer="checkout-type-account" .getValue="${0}"> </foxy-internal-select-control> <foxy-internal-select-control json-template="${0}" json-path="checkout_type" property="json" options="${0}" layout="summary-item" infer="checkout-type-default"> </foxy-internal-select-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="consent-group-one"> <foxy-internal-select-control json-template="${0}" json-path="tos_checkbox_settings.usage" property="json" options="${0}" layout="summary-item" infer="tos-checkbox-settings-usage"> </foxy-internal-select-control> <foxy-internal-text-control json-template="${0}" json-path="tos_checkbox_settings.url" property="json" layout="summary-item" infer="tos-checkbox-settings-url"> </foxy-internal-text-control> <foxy-internal-select-control json-template="${0}" json-path="tos_checkbox_settings.initial_state" property="json" options="${0}" layout="summary-item" infer="tos-checkbox-settings-initial-state"> </foxy-internal-select-control> <foxy-internal-switch-control json-template="${0}" json-path="tos_checkbox_settings.is_hidden" property="json" infer="tos-checkbox-settings-is-hidden"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="consent-group-two"> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="eu_secure_data_transfer_consent.usage" property="json" infer="eu-secure-data-transfer-consent-usage"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="consent-group-three"> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="newsletter_subscribe.usage" property="json" infer="newsletter-subscribe-usage"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="supported-cards-group"> <foxy-internal-template-config-form-supported-cards-control json-template="${0}" json-path="supported_payment_cards" property="json" infer="supported-payment-cards"> </foxy-internal-template-config-form-supported-cards-control> <p class="flex items-start gap-s"> ${0} <foxy-i18n infer="" key="disclaimer"></foxy-i18n> </p> </foxy-internal-summary-control> <foxy-internal-summary-control infer="csc-requirements-group"> <foxy-internal-select-control json-template="${0}" json-path="csc_requirements" property="json" options="${0}" layout="summary-item" infer="csc-requirements"> </foxy-internal-select-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="checkout-fields-group-one"> <foxy-internal-switch-control json-template="${0}" false-alias="disabled" true-alias="enabled" json-path="custom_checkout_field_requirements.cart_controls" property="json" infer="custom-checkout-field-requirements-cart-controls"> </foxy-internal-switch-control> </foxy-internal-summary-control> <div class="grid sm-grid-cols-2 gap-m" ?hidden="${0}"> ${0} </div> <foxy-internal-summary-control infer="csp" class="space-y-m" layout="section"> <foxy-internal-summary-control infer="csp-group-one"> <foxy-internal-switch-control json-template="${0}" json-path="csp.usage" property="json" infer="csp-enable-ro-csp" .getValue="${0}" .setValue="${0}"> </foxy-internal-switch-control> ${0} </foxy-internal-summary-control> <foxy-internal-summary-control infer="csp-group-two"> <foxy-internal-switch-control json-template="${0}" json-path="csp.usage" property="json" infer="csp-enable-csp" .getValue="${0}" .setValue="${0}"> </foxy-internal-switch-control> ${0} </foxy-internal-summary-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="analytics-config"> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="analytics_config.usage" property="json" infer="analytics-config-usage"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="analytics-config-google-analytics"> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="analytics_config.google_analytics.usage" property="json" infer="analytics-config-google-analytics-usage"> </foxy-internal-switch-control> <foxy-internal-text-control json-template="${0}" json-path="analytics_config.google_analytics.account_id" property="json" layout="summary-item" infer="analytics-config-google-analytics-account-id"> </foxy-internal-text-control> <foxy-internal-switch-control json-template="${0}" json-path="analytics_config.google_analytics.include_on_site" property="json" infer="analytics-config-google-analytics-include-on-site"> </foxy-internal-switch-control> <p class="flex items-start gap-s bg-error-10 text-error"> ${0} <foxy-i18n infer="" key="deprecation_notice"></foxy-i18n> </p> </foxy-internal-summary-control> <foxy-internal-summary-control infer="analytics-config-google-tag"> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="analytics_config.google_tag.usage" property="json" infer="analytics-config-google-tag-usage"> </foxy-internal-switch-control> <foxy-internal-text-control json-template="${0}" json-path="analytics_config.google_tag.account_id" property="json" layout="summary-item" infer="analytics-config-google-tag-account-id"> </foxy-internal-text-control> <foxy-internal-text-control json-template="${0}" json-path="analytics_config.google_tag.send_to" property="json" layout="summary-item" infer="analytics-config-google-tag-send-to"> </foxy-internal-text-control> <p class="flex items-start gap-s"> ${0} <span> <foxy-i18n infer="" key="usage_notice"></foxy-i18n> <br> <a target="_blank" class="cursor-pointer group text-primary rounded-s font-medium focus-outline-none focus-ring-2 focus-ring-primary-50" href="https://wiki.foxycart.com/v/2.0/analytics#google_tag_ga4_google_ads" rel="nofollow noreferrer noopener"> <foxy-i18n class="transition-opacity group-hover-opacity-80" infer="" key="docs_link"> </foxy-i18n> </a> </span> </p> </foxy-internal-summary-control> <foxy-internal-summary-control infer="debug"> <foxy-internal-switch-control json-template="${0}" false-alias="none" true-alias="required" json-path="debug.usage" property="json" infer="debug-usage"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-source-control infer="custom-config" .getValue="${0}" .setValue="${0}"> </foxy-internal-source-control> <foxy-internal-source-control json-template="${0}" json-path="custom_script_values.header" property="json" infer="custom-script-values-header"> </foxy-internal-source-control> <foxy-internal-source-control json-template="${0}" json-path="custom_script_values.checkout_fields" property="json" infer="custom-script-values-checkout-fields"> </foxy-internal-source-control> <foxy-internal-source-control json-template="${0}" json-path="custom_script_values.multiship_checkout_fields" property="json" infer="custom-script-values-multiship-checkout-fields"> </foxy-internal-source-control> <foxy-internal-source-control json-template="${0}" json-path="custom_script_values.footer" property="json" infer="custom-script-values-footer"> </foxy-internal-source-control> ${0} <foxy-nucleon class="hidden" infer="" href="${0}" id="storeLoader" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),this.__defaultJSON,this.__cartTypeOptions,this.__defaultJSON,_.every(((e,t)=>e.every((e=>{const o=`cart-group-${0===t?"two":"three"}:cart-display-config-${e.replace(/_/g,"-")}`;return this.hiddenSelector.matches(o,!0)})))),_.map(((e,t)=>s(O||(O=E` <foxy-internal-summary-control infer="cart-group-${0}"> ${0} </foxy-internal-summary-control> `),0===t?"two":"three",e.map((e=>s(q||(q=E` <foxy-internal-switch-control json-template="${0}" json-path="cart_display_config.${0}" property="json" infer="cart-display-config-${0}"> </foxy-internal-switch-control> `),this.__defaultJSON,e,e.replace(/_/g,"-"))))))),this.__defaultJSON,this.__defaultJSON,this.__foxycompleteShowComboboxOptions,this.__foxycompleteShowComboboxGetValue,this.__foxycompleteShowComboboxSetValue,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,this.__locationFilteringUsageOptions,this.__defaultJSON,this.__locationFilteringFilterTypeOptions,this.__locationFilteringFilterTypeSetValue,this.__defaultJSON,c(null!==(o=this.countries)&&void 0!==o?o:void 0),this.__locationFilteringFilterValuesSetValue,this.__defaultJSON,this.__locationFilteringFilterTypeOptions,this.__defaultJSON,c(null!==(n=this.countries)&&void 0!==n?n:void 0),this.__defaultJSON,this.__locationFilteringFilterTypeOptions,this.__defaultJSON,c(null!==(i=this.countries)&&void 0!==i?i:void 0),this.__defaultJSON,this.__checkoutTypeAccountOptions,this.__checkoutTypeAccountGetValue,this.__defaultJSON,this.__checkoutTypeDefaultOptions,this.__defaultJSON,this.__tosCheckboxSettingsUsageOptions,this.__defaultJSON,this.__defaultJSON,this.__tosCheckboxSettingsInitialStateOptions,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,r(F||(F=E`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-primary" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>`)),this.__defaultJSON,this.__cscRequirementsValueOptions,this.__defaultJSON,u.every(((e,t)=>e.every((e=>{const o=`checkout-fields-group-${0===t?"two":"three"}:custom-checkout-field-requirements-${e.replace(/_/g,"-").replace("1","-one").replace("2","-two")}`;return this.hiddenSelector.matches(o,!0)})))),u.map(((e,t)=>s(J||(J=E` <foxy-internal-summary-control infer="checkout-fields-group-${0}"> ${0} </foxy-internal-summary-control> `),0===t?"two":"three",e.map((e=>{const t=e.replace(/_/g,"-").replace("1","-one").replace("2","-two"),o=`custom_checkout_field_requirements.${e}`;return s(N||(N=E` <foxy-internal-select-control json-template="${0}" json-path="${0}" property="json" options="${0}" layout="summary-item" infer="custom-checkout-field-requirements-${0}"> </foxy-internal-select-control> `),this.__defaultJSON,o,"coupon_entry"===e?this.__customCheckoutFieldCouponEntryRequirementsOptions:this.__customCheckoutFieldRequirementsOptions,t)}))))),this.__defaultJSON,this.__cspRoUsageGetValue,this.__cspRoUsageSetValue,"report"===d||"both"===d?s(C||(C=E` <foxy-internal-text-control json-template="${0}" json-path="csp.policy_report.reporting_endpoint" property="json" layout="summary-item" infer="csp-policy-report-reporting-endpoint"> </foxy-internal-text-control> <foxy-internal-editable-list-control json-template="${0}" json-path="csp.policy_report.script_src" property="json" layout="summary-item" infer="csp-policy-report-script-src" simple-value> </foxy-internal-editable-list-control> ${0} `),this.__defaultJSON,this.__defaultJSON,"none"===p||"enforce"===p?s(V||(V=E` <div class="flex items-start bg-primary-10" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <p> <foxy-i18n infer="" key="warning"></foxy-i18n> <a target="_blank" class="inline-block rounded font-medium text-primary transition-colors cursor-pointer hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50" href="https://wiki.foxycart.com/v/2.0/content_security_policy"> wiki.foxycart.com </a> </p> </div> `),r(D||(D=E`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="flex-shrink-0 text-primary" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z" clip-rule="evenodd" /></svg>`))):""):"",this.__defaultJSON,this.__cspUsageGetValue,this.__cspUsageSetValue,"enforce"===d||"both"===d?s(R||(R=E` <foxy-internal-text-control json-template="${0}" json-path="csp.policy_enforce.reporting_endpoint" property="json" layout="summary-item" infer="csp-policy-enforce-reporting-endpoint"> </foxy-internal-text-control> <foxy-internal-editable-list-control json-template="${0}" json-path="csp.policy_enforce.script_src" property="json" layout="summary-item" infer="csp-policy-enforce-script-src" simple-value> </foxy-internal-editable-list-control> ${0} `),this.__defaultJSON,this.__defaultJSON,"none"===p||"report"===p?s(T||(T=E` <div class="flex items-start bg-error-10" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <p> <foxy-i18n infer="" key="warning"></foxy-i18n> <a target="_blank" class="inline-block rounded font-medium text-error transition-colors cursor-pointer hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-error-50" href="https://wiki.foxycart.com/v/2.0/content_security_policy"> wiki.foxycart.com </a> </p> </div> `),r(U||(U=E`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-error" style="width: 1.25em"><path fill-rule="evenodd" d="M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" clip-rule="evenodd" /></svg>`))):""):"",this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,r(A||(A=E`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-error" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>`)),this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,r(z||(z=E`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-primary" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>`)),this.__defaultJSON,this.__customConfigGetValue,this.__customConfigSetValue,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,this.__defaultJSON,super.renderBody(),c(null!==(a=this.store)&&void 0!==a?a:null===(l=this.data)||void 0===l?void 0:l._links["fx:store"].href),(()=>this.requestUpdate()))}get __storeLoader(){return this.renderRoot.querySelector("#storeLoader")}get __formJson(){return this.form.json?JSON.parse(this.form.json):{cart_type:"default",checkout_type:"default_account",csc_requirements:"all_cards",tos_checkbox_settings:{usage:"none",initial_state:"unchecked",is_hidden:!1,url:""},eu_secure_data_transfer_consent:{usage:"required"},newsletter_subscribe:{usage:"none"},analytics_config:{usage:"none",google_analytics:{usage:"none",account_id:"",include_on_site:!1},google_tag:{usage:"none",send_to:"",account_id:""}},colors:{usage:"none",primary:"4D4D4D",secondary:"FFFFFF",tertiary:"FFFFFF"},use_checkout_confirmation_window:{usage:"none"},supported_payment_cards:["visa","mastercard","discover","amex"],custom_checkout_field_requirements:{cart_controls:"enabled",coupon_entry:"enabled",billing_first_name:"required",billing_last_name:"required",billing_company:"optional",billing_tax_id:"hidden",billing_phone:"optional",billing_address1:"required",billing_address2:"optional",billing_city:"required",billing_region:"default",billing_postal_code:"required",billing_country:"required"},cart_display_config:{usage:"none",show_product_weight:!0,show_product_category:!0,show_product_code:!0,show_product_options:!0,show_sub_frequency:!0,show_sub_startdate:!0,show_sub_nextdate:!0,show_sub_enddate:!0,hidden_product_options:[]},foxycomplete:{usage:"required",show_combobox:!0,combobox_open:"\\u25bc",combobox_close:"\\u25b2",show_flags:!0},custom_script_values:{header:"",footer:"",checkout_fields:"",multiship_checkout_fields:""},http_receipt:!1,custom_config:"",debug:{usage:"none"},location_filtering:{usage:"none",shipping_filter_type:"blacklist",billing_filter_type:"blacklist",shipping_filter_values:{},billing_filter_values:{}},postal_code_lookup:{usage:"enabled"},csp:{usage:"none"}}}get __dataJson(){var e;return(null===(e=this.data)||void 0===e?void 0:e.json)?JSON.parse(this.data.json):null}}customElements.define("foxy-template-config-form",B);export{B as TemplateConfigForm};
@@ -417,20 +417,20 @@
417
417
  "csp-group-one": {
418
418
  "label": "",
419
419
  "helper_text": "",
420
- "warning": "This is security-related functionality that, when enabled, can stop custom scripts from loading on your checkout. Ensure you include any domains as custom script sources above, and review the documentation for this functionality:",
421
- "csp-enable-csp": {
422
- "label": "Enable Content Security Policy",
423
- "helper_text": "Protects your checkout page by blocking remote content that isn’t explicitly allowed. Scripts and assets loaded by Foxy (including payment gateways and analytics) are always allowed, regardless of the settings below.",
420
+ "warning": "Please review the documentation for this functionality to ensure you understand potential impacts:",
421
+ "csp-enable-ro-csp": {
422
+ "label": "Enable Report-Only Content Security Policy",
423
+ "helper_text": "Test your policy without blocking content. This mode logs violations of the rules below, but still allows the content to load. As with enforced mode, Foxy-managed content (e.g., gateways, analytics) is always allowed and excluded from reporting.",
424
424
  "checked": "Yes",
425
425
  "unchecked": "No"
426
426
  },
427
- "csp-policy-enforce-script-src": {
427
+ "csp-policy-report-script-src": {
428
428
  "label": "Custom script sources",
429
429
  "placeholder": "example.com, *.example.com",
430
430
  "helper_text": "",
431
431
  "v8n_too_long": "Domain names must not exceed 1000 characters."
432
432
  },
433
- "csp-policy-enforce-reporting-endpoint": {
433
+ "csp-policy-report-reporting-endpoint": {
434
434
  "label": "Reporting URL",
435
435
  "helper_text": "",
436
436
  "placeholder": "Optional",
@@ -440,20 +440,20 @@
440
440
  "csp-group-two": {
441
441
  "label": "",
442
442
  "helper_text": "",
443
- "warning": "Please review the documentation for this functionality to ensure you understand potential impacts:",
444
- "csp-enable-ro-csp": {
445
- "label": "Enable Report-Only Content Security Policy",
446
- "helper_text": "Test your policy without blocking content. This mode logs violations of the rules below, but still allows the content to load. As with enforced mode, Foxy-managed content (e.g., gateways, analytics) is always allowed and excluded from reporting.",
443
+ "warning": "This is security-related functionality that, when enabled, can stop custom scripts from loading on your checkout. Ensure you include any domains as custom script sources above, and review the documentation for this functionality:",
444
+ "csp-enable-csp": {
445
+ "label": "Enable Content Security Policy",
446
+ "helper_text": "Protects your checkout page by blocking remote content that isn’t explicitly allowed. Scripts and assets loaded by Foxy (including payment gateways and analytics) are always allowed, regardless of the settings below.",
447
447
  "checked": "Yes",
448
448
  "unchecked": "No"
449
449
  },
450
- "csp-policy-report-script-src": {
450
+ "csp-policy-enforce-script-src": {
451
451
  "label": "Custom script sources",
452
452
  "placeholder": "example.com, *.example.com",
453
453
  "helper_text": "",
454
454
  "v8n_too_long": "Domain names must not exceed 1000 characters."
455
455
  },
456
- "csp-policy-report-reporting-endpoint": {
456
+ "csp-policy-enforce-reporting-endpoint": {
457
457
  "label": "Reporting URL",
458
458
  "helper_text": "",
459
459
  "placeholder": "Optional",
@@ -636,45 +636,45 @@ export class TemplateConfigForm extends Base {
636
636
  json-template=${this.__defaultJSON}
637
637
  json-path="csp.usage"
638
638
  property="json"
639
- infer="csp-enable-csp"
640
- .getValue=${this.__cspUsageGetValue}
641
- .setValue=${this.__cspUsageSetValue}
639
+ infer="csp-enable-ro-csp"
640
+ .getValue=${this.__cspRoUsageGetValue}
641
+ .setValue=${this.__cspRoUsageSetValue}
642
642
  >
643
643
  </foxy-internal-switch-control>
644
644
 
645
- ${formCspUsage === 'enforce' || formCspUsage === 'both'
645
+ ${formCspUsage === 'report' || formCspUsage === 'both'
646
646
  ? html `
647
647
  <foxy-internal-text-control
648
648
  json-template=${this.__defaultJSON}
649
- json-path="csp.policy_enforce.reporting_endpoint"
649
+ json-path="csp.policy_report.reporting_endpoint"
650
650
  property="json"
651
651
  layout="summary-item"
652
- infer="csp-policy-enforce-reporting-endpoint"
652
+ infer="csp-policy-report-reporting-endpoint"
653
653
  >
654
654
  </foxy-internal-text-control>
655
655
 
656
656
  <foxy-internal-editable-list-control
657
657
  json-template=${this.__defaultJSON}
658
- json-path="csp.policy_enforce.script_src"
658
+ json-path="csp.policy_report.script_src"
659
659
  property="json"
660
660
  layout="summary-item"
661
- infer="csp-policy-enforce-script-src"
661
+ infer="csp-policy-report-script-src"
662
662
  simple-value
663
663
  >
664
664
  </foxy-internal-editable-list-control>
665
665
 
666
- ${dataCspUsage === 'none' || dataCspUsage === 'report'
666
+ ${dataCspUsage === 'none' || dataCspUsage === 'enforce'
667
667
  ? html `
668
668
  <div
669
- class="flex items-start bg-error-10"
669
+ class="flex items-start bg-primary-10"
670
670
  style="gap: calc(0.625em + (var(--lumo-border-radius) / 4) - 1px)"
671
671
  >
672
- ${svg `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-error" style="width: 1.25em"><path fill-rule="evenodd" d="M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" clip-rule="evenodd" /></svg>`}
672
+ ${svg `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="flex-shrink-0 text-primary" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z" clip-rule="evenodd" /></svg>`}
673
673
  <p>
674
674
  <foxy-i18n infer="" key="warning"></foxy-i18n>
675
675
  <a
676
676
  target="_blank"
677
- class="inline-block rounded font-medium text-error transition-colors cursor-pointer hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-error-50"
677
+ class="inline-block rounded font-medium text-primary transition-colors cursor-pointer hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50"
678
678
  href="https://wiki.foxycart.com/v/2.0/content_security_policy"
679
679
  >
680
680
  wiki.foxycart.com
@@ -692,45 +692,45 @@ export class TemplateConfigForm extends Base {
692
692
  json-template=${this.__defaultJSON}
693
693
  json-path="csp.usage"
694
694
  property="json"
695
- infer="csp-enable-ro-csp"
696
- .getValue=${this.__cspRoUsageGetValue}
697
- .setValue=${this.__cspRoUsageSetValue}
695
+ infer="csp-enable-csp"
696
+ .getValue=${this.__cspUsageGetValue}
697
+ .setValue=${this.__cspUsageSetValue}
698
698
  >
699
699
  </foxy-internal-switch-control>
700
700
 
701
- ${formCspUsage === 'report' || formCspUsage === 'both'
701
+ ${formCspUsage === 'enforce' || formCspUsage === 'both'
702
702
  ? html `
703
703
  <foxy-internal-text-control
704
704
  json-template=${this.__defaultJSON}
705
- json-path="csp.policy_report.reporting_endpoint"
705
+ json-path="csp.policy_enforce.reporting_endpoint"
706
706
  property="json"
707
707
  layout="summary-item"
708
- infer="csp-policy-report-reporting-endpoint"
708
+ infer="csp-policy-enforce-reporting-endpoint"
709
709
  >
710
710
  </foxy-internal-text-control>
711
711
 
712
712
  <foxy-internal-editable-list-control
713
713
  json-template=${this.__defaultJSON}
714
- json-path="csp.policy_report.script_src"
714
+ json-path="csp.policy_enforce.script_src"
715
715
  property="json"
716
716
  layout="summary-item"
717
- infer="csp-policy-report-script-src"
717
+ infer="csp-policy-enforce-script-src"
718
718
  simple-value
719
719
  >
720
720
  </foxy-internal-editable-list-control>
721
721
 
722
- ${dataCspUsage === 'none' || dataCspUsage === 'enforce'
722
+ ${dataCspUsage === 'none' || dataCspUsage === 'report'
723
723
  ? html `
724
724
  <div
725
- class="flex items-start bg-primary-10"
725
+ class="flex items-start bg-error-10"
726
726
  style="gap: calc(0.625em + (var(--lumo-border-radius) / 4) - 1px)"
727
727
  >
728
- ${svg `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="flex-shrink-0 text-primary" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z" clip-rule="evenodd" /></svg>`}
728
+ ${svg `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-error" style="width: 1.25em"><path fill-rule="evenodd" d="M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" clip-rule="evenodd" /></svg>`}
729
729
  <p>
730
730
  <foxy-i18n infer="" key="warning"></foxy-i18n>
731
731
  <a
732
732
  target="_blank"
733
- class="inline-block rounded font-medium text-primary transition-colors cursor-pointer hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50"
733
+ class="inline-block rounded font-medium text-error transition-colors cursor-pointer hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-error-50"
734
734
  href="https://wiki.foxycart.com/v/2.0/content_security_policy"
735
735
  >
736
736
  wiki.foxycart.com
@@ -1 +1 @@
1
- {"version":3,"file":"TemplateConfigForm.js","sourceRoot":"","sources":["../../../../src/elements/public/TemplateConfigForm/TemplateConfigForm.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,sCAAmC;AAC7D,OAAO,EAAE,cAAc,EAAE,sBAAmB;AAC5C,OAAO,EAAE,YAAY,EAAE,oDAAiD;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAErC,MAAM,EAAE,GAAG,sBAAsB,CAAC;AAClC,MAAM,IAAI,GAAG,eAAe,CAAC,iBAAiB,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,CAAC;AAElE;;;;;GAKG;AACH,MAAM,OAAO,kBAAmB,SAAQ,IAAU;IAAlD;;QAmCE,4EAA4E;QAC5E,cAAS,GAAkB,IAAI,CAAC;QAEhC,yDAAyD;QACzD,YAAO,GAAkB,IAAI,CAAC;QAE9B,wJAAwJ;QACxJ,UAAK,GAAkB,IAAI,CAAC;QAEX,wDAAmD,GAAG,IAAI,CAAC,SAAS,CAAC;YACpF,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,SAAS,EAAE;YAC7C,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,UAAU,EAAE;SAChD,CAAC,CAAC;QAEc,6CAAwC,GAAG,IAAI,CAAC,SAAS,CAAC;YACzE,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,SAAS,EAAE;YAC7C,EAAE,KAAK,EAAE,iBAAi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tV,IAAI,CAAC,aAAa;;;;;;;;;;;;oBAYxB,IAAI,CAAC,sBAAsB;oBAC3B,IAAI,CAAC,sBAAsB;;;;;wBAKvB,IAAI,CAAC,aAAa;;;;;;;;wBAQlB,IAAI,CAAC,aAAa;;;;;;;;wBAQlB,IAAI,CAAC,aAAa;;;;;;;;wBAQlB,IAAI,CAAC,aAAa;;;;;;;QAOlC,KAAK,CAAC,UAAU,EAAE;;;;;eAKX,SAAS,OAAC,IAAI,CAAC,KAAK,yCAAI,IAAI,CAAC,IAAI,0CAAE,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC;;kBAExD,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE;;;KAGvC,CAAC;IACJ,CAAC;IAED,IAAY,aAAa;QAEvB,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAS,cAAc,CAAC,CAAC;IAC/D,CAAC;IAED,IAAY,UAAU;QACpB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC;IACxE,CAAC;IAED,IAAY,UAAU;;QACpB,OAAO,OAAA,IAAI,CAAC,IAAI,0CAAE,IAAI,EAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC7D,CAAC;CACF","sourcesContent":["import type { Data, TemplateConfigJSON } from './types';\nimport type { PropertyDeclarations } from 'lit-element';\nimport type { TemplateResult } from 'lit-html';\nimport type { NucleonElement } from '../NucleonElement/NucleonElement';\nimport type { NucleonV8N } from '../NucleonElement/types';\nimport type { Resource } from '@foxy.io/sdk/core';\nimport type { Rels } from '@foxy.io/sdk/backend';\n\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { BooleanSelector } from '@foxy.io/sdk/core';\nimport { ResponsiveMixin } from '../../../mixins/responsive';\nimport { getDefaultJSON } from './defaults';\nimport { InternalForm } from '../../internal/InternalForm/InternalForm';\nimport { ifDefined } from 'lit-html/directives/if-defined';\nimport { html, svg } from 'lit-html';\n\nconst NS = 'template-config-form';\nconst Base = ResponsiveMixin(TranslatableMixin(InternalForm, NS));\n\n/**\n * Form element for creating or editing template configs (`fx:template_config`).\n *\n * @element foxy-template-config-form\n * @since 1.14.0\n */\nexport class TemplateConfigForm extends Base<Data> {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n countries: {},\n regions: {},\n store: {},\n };\n }\n\n static get v8n(): NucleonV8N<Data, TemplateConfigForm> {\n return [\n ({ json }) => {\n const formJson: TemplateConfigJSON = json ? JSON.parse(json) : getDefaultJSON();\n const url = formJson.csp.policy_enforce?.reporting_endpoint ?? '';\n return url.length <= 1000 || 'csp-policy-enforce-reporting-endpoint:v8n_too_long';\n },\n ({ json }) => {\n const formJson: TemplateConfigJSON = json ? JSON.parse(json) : getDefaultJSON();\n const url = formJson.csp.policy_report?.reporting_endpoint ?? '';\n return url.length <= 1000 || 'csp-policy-report-reporting-endpoint:v8n_too_long';\n },\n ({ json }) => {\n const formJson: TemplateConfigJSON = json ? JSON.parse(json) : getDefaultJSON();\n const domains = formJson.csp.policy_enforce?.script_src ?? [];\n return domains.every(d => d.length <= 1000) || 'csp-policy-enforce-script-src:v8n_too_long';\n },\n ({ json }) => {\n const formJson: TemplateConfigJSON = json ? JSON.parse(json) : getDefaultJSON();\n const domains = formJson.csp.policy_report?.script_src ?? [];\n return domains.every(d => d.length <= 1000) || 'csp-policy-report-script-src:v8n_too_long';\n },\n ];\n }\n\n /** URI of the `fx:countries` hAPI resource with `?include_regions=true`. */\n countries: string | null = null;\n\n /** @deprecated URI of the `fx:regions` hAPI resource. */\n regions: string | null = null;\n\n /** URI of the `fx:store` hAPI resource related to this template config. If this property is `null`, a link relationship will be used when available. */\n store: string | null = null;\n\n private readonly __customCheckoutFieldCouponEntryRequirementsOptions = JSON.stringify([\n { label: 'option_enabled', value: 'enabled' },\n { label: 'option_disabled', value: 'disabled' },\n ]);\n\n private readonly __customCheckoutFieldRequirementsOptions = JSON.stringify([\n { label: 'option_default', value: 'default' },\n { label: 'option_optional', value: 'optional' },\n { label: 'option_required', value: 'required' },\n { label: 'option_hidden', value: 'hidden' },\n ]);\n\n private readonly __tosCheckboxSettingsInitialStateOptions = JSON.stringify([\n { label: 'option_checked', value: 'checked' },\n { label: 'option_unchecked', value: 'unchecked' },\n ]);\n\n private readonly __locationFilteringFilterTypeOptions = JSON.stringify([\n { label: 'option_blocklist', value: 'blacklist' },\n { label: 'option_allowlist', value: 'whitelist' },\n ]);\n\n private readonly __foxycompleteShowComboboxOptions = JSON.stringify([\n { label: 'option_combobox', value: 'combobox' },\n { label: 'option_search', value: 'search' },\n ]);\n\n private readonly __tosCheckboxSettingsUsageOptions = JSON.stringify([\n { label: 'option_none', value: 'none' },\n { label: 'option_optional', value: 'optional' },\n { label: 'option_required', value: 'required' },\n ]);\n\n private readonly __locationFilteringUsageOptions = JSON.stringify([\n { label: 'option_none', value: 'none' },\n { label: 'option_shipping', value: 'shipping' },\n { label: 'option_billing', value: 'billing' },\n { label: 'option_both', value: 'both' },\n { label: 'option_independent', value: 'independent' },\n ]);\n\n private readonly __cscRequirementsValueOptions = JSON.stringify([\n { label: 'option_all_cards', value: 'all_cards' },\n { label: 'option_sso_only', value: 'sso_only' },\n { label: 'option_new_cards_only', value: 'new_cards_only' },\n ]);\n\n private readonly __checkoutTypeDefaultOptions = JSON.stringify([\n { label: 'option_default_account', value: 'default_account' },\n { label: 'option_default_guest', value: 'default_guest' },\n ]);\n\n private readonly __checkoutTypeAccountOptions = JSON.stringify([\n { label: 'option_account', value: 'account_only' },\n { label: 'option_guest', value: 'guest_only' },\n { label: 'option_both', value: 'default_guest' },\n ]);\n\n private readonly __cartTypeOptions = JSON.stringify([\n { label: 'option_default', value: 'default' },\n { label: 'option_fullpage', value: 'fullpage' },\n { label: 'option_custom', value: 'custom' },\n ]);\n\n private readonly __locationFilteringFilterValuesSetValue = (\n newValue: Record<string, '*' | string[]>\n ) => {\n const formJson = this.__formJson;\n const newConfig = {\n ...formJson.location_filtering,\n shipping_filter_values: newValue,\n billing_filter_values: newValue,\n };\n\n this.edit({ json: JSON.stringify({ ...formJson, location_filtering: newConfig }) });\n };\n\n private readonly __locationFilteringFilterTypeSetValue = (value: string) => {\n const formJson = this.__formJson;\n const newValue = {\n ...formJson.location_filtering,\n shipping_filter_type: value,\n billing_filter_type: value,\n };\n\n this.edit({ json: JSON.stringify({ ...formJson, location_filtering: newValue }) });\n };\n\n private readonly __foxycompleteShowComboboxGetValue = () => {\n return this.__formJson.foxycomplete.show_combobox ? 'combobox' : 'search';\n };\n\n private readonly __foxycompleteShowComboboxSetValue = (value: string) => {\n const newValue = value === 'combobox';\n const foxycomplete = { ...this.__formJson.foxycomplete, show_combobox: newValue };\n this.edit({ json: JSON.stringify({ ...this.__formJson, foxycomplete }) });\n };\n\n private readonly __checkoutTypeAccountGetValue = () => {\n const formJson = this.__formJson;\n return formJson.checkout_type.includes('default') ? 'default_guest' : formJson.checkout_type;\n };\n\n private readonly __customConfigGetValue = () => {\n const formJson = this.__formJson;\n if (typeof formJson.custom_config === 'string') return formJson.custom_config;\n return JSON.stringify(formJson.custom_config, null, 2);\n };\n\n private readonly __customConfigSetValue = (newValue: string) => {\n const formJson = this.__formJson;\n\n try {\n formJson.custom_config = JSON.parse(newValue);\n } catch {\n formJson.custom_config = newValue;\n }\n\n this.edit({ json: JSON.stringify(formJson) });\n };\n\n private readonly __cspUsageGetValue = () => {\n const usage = this.__formJson.csp.usage;\n return usage === 'enforce' || usage === 'both';\n };\n\n private readonly __cspUsageSetValue = (newValue: boolean) => {\n const formJson = this.__formJson;\n const oldUsage = formJson.csp.usage;\n const map: Record<string, Record<string, string>> = {\n false: { both: 'report', enforce: 'none' },\n true: { report: 'both', none: 'enforce' },\n };\n\n const newUsage = map[String(newValue)][oldUsage];\n if (newUsage) {\n const newJson = { ...formJson, csp: { ...formJson.csp, usage: newUsage } };\n this.edit({ json: JSON.stringify(newJson) });\n }\n };\n\n private readonly __cspRoUsageGetValue = () => {\n const usage = this.__formJson.csp.usage;\n return usage === 'report' || usage === 'both';\n };\n\n private readonly __cspRoUsageSetValue = (newValue: boolean) => {\n const formJson = this.__formJson;\n const oldUsage = formJson.csp.usage;\n const map: Record<string, Record<string, string>> = {\n false: { both: 'enforce', report: 'none' },\n true: { enforce: 'both', none: 'report' },\n };\n\n const newUsage = map[String(newValue)][oldUsage];\n if (newUsage) {\n const newJson = { ...formJson, csp: { ...formJson.csp, usage: newUsage } };\n this.edit({ json: JSON.stringify(newJson) });\n }\n };\n\n private readonly __defaultJSON = JSON.stringify(getDefaultJSON());\n\n get hiddenSelector(): BooleanSelector {\n const alwaysHidden = [super.hiddenSelector.toString()];\n\n const dataJson = this.__dataJson;\n const formJson = this.__formJson;\n\n const locationFilteringUsage = formJson.location_filtering.usage;\n const checkoutType = formJson.checkout_type;\n\n if (formJson.cart_display_config.usage !== 'required') {\n alwaysHidden.unshift('cart-group-two', 'cart-group-three', 'cart-group-four');\n }\n\n if (formJson.foxycomplete.usage !== 'required') {\n alwaysHidden.unshift(\n 'country-and-region-group-one:foxycomplete-show-combobox',\n 'country-and-region-group-one:foxycomplete-combobox-open',\n 'country-and-region-group-one:foxycomplete-combobox-close',\n 'country-and-region-group-one:foxycomplete-show-flags'\n );\n }\n\n if (formJson.foxycomplete.show_combobox === false) {\n alwaysHidden.unshift(\n 'country-and-region-group-one:foxycomplete-combobox-open',\n 'country-and-region-group-one:foxycomplete-combobox-close'\n );\n }\n\n if (locationFilteringUsage !== 'both') {\n alwaysHidden.unshift('country-and-region-group-two');\n }\n\n if (locationFilteringUsage !== 'shipping' && locationFilteringUsage !== 'independent') {\n alwaysHidden.unshift('country-and-region-group-three');\n }\n\n if (locationFilteringUsage !== 'billing' && locationFilteringUsage !== 'independent') {\n alwaysHidden.unshift('country-and-region-group-four');\n }\n\n if (checkoutType !== 'default_account' && checkoutType !== 'default_guest') {\n alwaysHidden.unshift('customer-accounts:checkout-type-default');\n }\n\n if (formJson.tos_checkbox_settings.usage === 'none') {\n alwaysHidden.unshift(\n 'consent-group-one:tos-checkbox-settings-url',\n 'consent-group-one:tos-checkbox-settings-initial-state',\n 'consent-group-one:tos-checkbox-settings-is-hidden'\n );\n }\n\n if (formJson.analytics_config.usage !== 'required') {\n alwaysHidden.unshift('analytics-config-google-analytics', 'analytics-config-google-tag');\n }\n\n if (dataJson?.analytics_config.google_analytics.usage !== 'required') {\n alwaysHidden.unshift('analytics-config-google-analytics');\n }\n\n if (formJson.analytics_config.google_analytics.usage !== 'required') {\n alwaysHidden.unshift(\n 'analytics-config-google-analytics:analytics-config-google-analytics-account-id',\n 'analytics-config-google-analytics:analytics-config-google-analytics-include-on-site'\n );\n }\n\n if (formJson.analytics_config.google_tag.usage !== 'required') {\n alwaysHidden.unshift('analytics-config-google-tag:analytics-config-google-tag-account-id');\n alwaysHidden.unshift('analytics-config-google-tag:analytics-config-google-tag-send-to');\n }\n\n if (this.__storeLoader?.data?.features_multiship !== true) {\n alwaysHidden.unshift('custom-script-values-multiship-checkout-fields');\n }\n\n return new BooleanSelector(alwaysHidden.join(' ').trim());\n }\n\n renderBody(): TemplateResult {\n const customCheckoutFieldRequirementsControls = [\n [\n 'billing_address1',\n 'billing_address2',\n 'billing_city',\n 'billing_region',\n 'billing_postal_code',\n 'billing_country',\n ],\n [\n 'billing_first_name',\n 'billing_last_name',\n 'billing_company',\n 'billing_tax_id',\n 'billing_phone',\n 'coupon_entry',\n ],\n ];\n\n const cartDisplayConfigFields = [\n ['show_product_weight', 'show_product_category', 'show_product_code', 'show_product_options'],\n ['show_sub_frequency', 'show_sub_startdate', 'show_sub_nextdate', 'show_sub_enddate'],\n ];\n\n const formCspUsage = this.__formJson.csp.usage;\n const dataCspUsage = this.__dataJson?.csp?.usage;\n\n return html`\n ${this.renderHeader()}\n\n <foxy-internal-summary-control infer=\"cart-group-one\">\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"cart_type\"\n property=\"json\"\n options=${this.__cartTypeOptions}\n layout=\"summary-item\"\n infer=\"cart-type\"\n >\n </foxy-internal-select-control>\n\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"cart_display_config.usage\"\n property=\"json\"\n infer=\"cart-display-config-usage\"\n invert\n >\n </foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <div\n class=\"grid sm-grid-cols-2 gap-m\"\n ?hidden=${cartDisplayConfigFields.every((group, index) => {\n return group.every(prop => {\n const suffix = index === 0 ? 'two' : 'three';\n const sel = `cart-group-${suffix}:cart-display-config-${prop.replace(/_/g, '-')}`;\n return this.hiddenSelector.matches(sel, true);\n });\n })}\n >\n ${cartDisplayConfigFields.map((group, index) => {\n const suffix = index === 0 ? 'two' : 'three';\n return html`\n <foxy-internal-summary-control infer=\"cart-group-${suffix}\">\n ${group.map(prop => {\n return html`\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n json-path=\"cart_display_config.${prop}\"\n property=\"json\"\n infer=\"cart-display-config-${prop.replace(/_/g, '-')}\"\n >\n </foxy-internal-switch-control>\n `;\n })}\n </foxy-internal-summary-control>\n `;\n })}\n </div>\n\n <foxy-internal-summary-control infer=\"cart-group-four\">\n <foxy-internal-editable-list-control\n json-template=${this.__defaultJSON}\n json-path=\"cart_display_config.hidden_product_options\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"cart-display-config-hidden-product-options\"\n simple-value\n >\n </foxy-internal-editable-list-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"country-and-region-group-one\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"foxycomplete.usage\"\n property=\"json\"\n infer=\"foxycomplete-usage\"\n >\n </foxy-internal-switch-control>\n\n <foxy-internal-select-control\n options=${this.__foxycompleteShowComboboxOptions}\n layout=\"summary-item\"\n infer=\"foxycomplete-show-combobox\"\n .getValue=${this.__foxycompleteShowComboboxGetValue}\n .setValue=${this.__foxycompleteShowComboboxSetValue}\n >\n </foxy-internal-select-control>\n\n <foxy-internal-text-control\n json-template=${this.__defaultJSON}\n json-path=\"foxycomplete.combobox_open\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"foxycomplete-combobox-open\"\n >\n </foxy-internal-text-control>\n\n <foxy-internal-text-control\n json-template=${this.__defaultJSON}\n json-path=\"foxycomplete.combobox_close\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"foxycomplete-combobox-close\"\n >\n </foxy-internal-text-control>\n\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n json-path=\"foxycomplete.show_flags\"\n property=\"json\"\n infer=\"foxycomplete-show-flags\"\n >\n </foxy-internal-switch-control>\n\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"enabled\"\n json-path=\"postal_code_lookup.usage\"\n property=\"json\"\n infer=\"postal-code-lookup\"\n >\n </foxy-internal-switch-control>\n\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"location_filtering.usage\"\n property=\"json\"\n options=${this.__locationFilteringUsageOptions}\n layout=\"summary-item\"\n infer=\"location-filtering-usage\"\n >\n </foxy-internal-select-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"country-and-region-group-two\">\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"location_filtering.shipping_filter_type\"\n property=\"json\"\n options=${this.__locationFilteringFilterTypeOptions}\n layout=\"summary-item\"\n infer=\"location-filtering-filter-type\"\n .setValue=${this.__locationFilteringFilterTypeSetValue}\n >\n </foxy-internal-select-control>\n\n <foxy-internal-template-config-form-filter-values-control\n json-template=${this.__defaultJSON}\n json-path=\"location_filtering.shipping_filter_values\"\n countries=${ifDefined(this.countries ?? void 0)}\n property=\"json\"\n infer=\"location-filtering-filter-values\"\n .setValue=${this.__locationFilteringFilterValuesSetValue}\n >\n </foxy-internal-template-config-form-filter-values-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"country-and-region-group-three\">\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"location_filtering.shipping_filter_type\"\n property=\"json\"\n options=${this.__locationFilteringFilterTypeOptions}\n layout=\"summary-item\"\n infer=\"location-filtering-shipping-filter-type\"\n >\n </foxy-internal-select-control>\n\n <foxy-internal-template-config-form-filter-values-control\n json-template=${this.__defaultJSON}\n json-path=\"location_filtering.shipping_filter_values\"\n countries=${ifDefined(this.countries ?? void 0)}\n property=\"json\"\n infer=\"location-filtering-shipping-filter-values\"\n >\n </foxy-internal-template-config-form-filter-values-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"country-and-region-group-four\">\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"location_filtering.billing_filter_type\"\n property=\"json\"\n options=${this.__locationFilteringFilterTypeOptions}\n layout=\"summary-item\"\n infer=\"location-filtering-billing-filter-type\"\n >\n </foxy-internal-select-control>\n\n <foxy-internal-template-config-form-filter-values-control\n json-template=${this.__defaultJSON}\n json-path=\"location_filtering.billing_filter_values\"\n countries=${ifDefined(this.countries ?? void 0)}\n property=\"json\"\n infer=\"location-filtering-billing-filter-values\"\n >\n </foxy-internal-template-config-form-filter-values-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"customer-accounts\">\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"checkout_type\"\n property=\"json\"\n options=${this.__checkoutTypeAccountOptions}\n layout=\"summary-item\"\n infer=\"checkout-type-account\"\n .getValue=${this.__checkoutTypeAccountGetValue}\n >\n </foxy-internal-select-control>\n\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"checkout_type\"\n property=\"json\"\n options=${this.__checkoutTypeDefaultOptions}\n layout=\"summary-item\"\n infer=\"checkout-type-default\"\n >\n </foxy-internal-select-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"consent-group-one\">\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"tos_checkbox_settings.usage\"\n property=\"json\"\n options=${this.__tosCheckboxSettingsUsageOptions}\n layout=\"summary-item\"\n infer=\"tos-checkbox-settings-usage\"\n >\n </foxy-internal-select-control>\n\n <foxy-internal-text-control\n json-template=${this.__defaultJSON}\n json-path=\"tos_checkbox_settings.url\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"tos-checkbox-settings-url\"\n >\n </foxy-internal-text-control>\n\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"tos_checkbox_settings.initial_state\"\n property=\"json\"\n options=${this.__tosCheckboxSettingsInitialStateOptions}\n layout=\"summary-item\"\n infer=\"tos-checkbox-settings-initial-state\"\n >\n </foxy-internal-select-control>\n\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n json-path=\"tos_checkbox_settings.is_hidden\"\n property=\"json\"\n infer=\"tos-checkbox-settings-is-hidden\"\n >\n </foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"consent-group-two\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"eu_secure_data_transfer_consent.usage\"\n property=\"json\"\n infer=\"eu-secure-data-transfer-consent-usage\"\n >\n </foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"consent-group-three\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"newsletter_subscribe.usage\"\n property=\"json\"\n infer=\"newsletter-subscribe-usage\"\n >\n </foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"supported-cards-group\">\n <foxy-internal-template-config-form-supported-cards-control\n json-template=${this.__defaultJSON}\n json-path=\"supported_payment_cards\"\n property=\"json\"\n infer=\"supported-payment-cards\"\n >\n </foxy-internal-template-config-form-supported-cards-control>\n\n <p class=\"flex items-start gap-s\">\n ${svg`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\" class=\"flex-shrink-0 text-primary\" style=\"width: 1.25em\"><path fill-rule=\"evenodd\" d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z\" clip-rule=\"evenodd\"></path></svg>`}\n <foxy-i18n infer=\"\" key=\"disclaimer\"></foxy-i18n>\n </p>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"csc-requirements-group\">\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"csc_requirements\"\n property=\"json\"\n options=${this.__cscRequirementsValueOptions}\n layout=\"summary-item\"\n infer=\"csc-requirements\"\n >\n </foxy-internal-select-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"checkout-fields-group-one\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"disabled\"\n true-alias=\"enabled\"\n json-path=\"custom_checkout_field_requirements.cart_controls\"\n property=\"json\"\n infer=\"custom-checkout-field-requirements-cart-controls\"\n >\n </foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <div\n class=\"grid sm-grid-cols-2 gap-m\"\n ?hidden=${customCheckoutFieldRequirementsControls.every((group, index) => {\n return group.every(prop => {\n const suffix = index === 0 ? 'two' : 'three';\n const infer = prop.replace(/_/g, '-').replace('1', '-one').replace('2', '-two');\n const sel = `checkout-fields-group-${suffix}:custom-checkout-field-requirements-${infer}`;\n return this.hiddenSelector.matches(sel, true);\n });\n })}\n >\n ${customCheckoutFieldRequirementsControls.map((group, index) => {\n const suffix = index === 0 ? 'two' : 'three';\n return html`\n <foxy-internal-summary-control infer=\"checkout-fields-group-${suffix}\">\n ${group.map(prop => {\n const infer = prop.replace(/_/g, '-').replace('1', '-one').replace('2', '-two');\n const path = `custom_checkout_field_requirements.${prop}`;\n return html`\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=${path}\n property=\"json\"\n options=${prop === 'coupon_entry'\n ? this.__customCheckoutFieldCouponEntryRequirementsOptions\n : this.__customCheckoutFieldRequirementsOptions}\n layout=\"summary-item\"\n infer=\"custom-checkout-field-requirements-${infer}\"\n >\n </foxy-internal-select-control>\n `;\n })}\n </foxy-internal-summary-control>\n `;\n })}\n </div>\n\n <foxy-internal-summary-control infer=\"csp\" class=\"space-y-m\" layout=\"section\">\n <foxy-internal-summary-control infer=\"csp-group-one\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n json-path=\"csp.usage\"\n property=\"json\"\n infer=\"csp-enable-csp\"\n .getValue=${this.__cspUsageGetValue}\n .setValue=${this.__cspUsageSetValue}\n >\n </foxy-internal-switch-control>\n\n ${formCspUsage === 'enforce' || formCspUsage === 'both'\n ? html`\n <foxy-internal-text-control\n json-template=${this.__defaultJSON}\n json-path=\"csp.policy_enforce.reporting_endpoint\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"csp-policy-enforce-reporting-endpoint\"\n >\n </foxy-internal-text-control>\n\n <foxy-internal-editable-list-control\n json-template=${this.__defaultJSON}\n json-path=\"csp.policy_enforce.script_src\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"csp-policy-enforce-script-src\"\n simple-value\n >\n </foxy-internal-editable-list-control>\n\n ${dataCspUsage === 'none' || dataCspUsage === 'report'\n ? html`\n <div\n class=\"flex items-start bg-error-10\"\n style=\"gap: calc(0.625em + (var(--lumo-border-radius) / 4) - 1px)\"\n >\n ${svg`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\" class=\"flex-shrink-0 text-error\" style=\"width: 1.25em\"><path fill-rule=\"evenodd\" d=\"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z\" clip-rule=\"evenodd\" /></svg>`}\n <p>\n <foxy-i18n infer=\"\" key=\"warning\"></foxy-i18n>\n <a\n target=\"_blank\"\n class=\"inline-block rounded font-medium text-error transition-colors cursor-pointer hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-error-50\"\n href=\"https://wiki.foxycart.com/v/2.0/content_security_policy\"\n >\n wiki.foxycart.com\n </a>\n </p>\n </div>\n `\n : ''}\n `\n : ''}\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"csp-group-two\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n json-path=\"csp.usage\"\n property=\"json\"\n infer=\"csp-enable-ro-csp\"\n .getValue=${this.__cspRoUsageGetValue}\n .setValue=${this.__cspRoUsageSetValue}\n >\n </foxy-internal-switch-control>\n\n ${formCspUsage === 'report' || formCspUsage === 'both'\n ? html`\n <foxy-internal-text-control\n json-template=${this.__defaultJSON}\n json-path=\"csp.policy_report.reporting_endpoint\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"csp-policy-report-reporting-endpoint\"\n >\n </foxy-internal-text-control>\n\n <foxy-internal-editable-list-control\n json-template=${this.__defaultJSON}\n json-path=\"csp.policy_report.script_src\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"csp-policy-report-script-src\"\n simple-value\n >\n </foxy-internal-editable-list-control>\n\n ${dataCspUsage === 'none' || dataCspUsage === 'enforce'\n ? html`\n <div\n class=\"flex items-start bg-primary-10\"\n style=\"gap: calc(0.625em + (var(--lumo-border-radius) / 4) - 1px)\"\n >\n ${svg`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" class=\"flex-shrink-0 text-primary\" style=\"width: 1.25em\"><path fill-rule=\"evenodd\" d=\"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z\" clip-rule=\"evenodd\" /></svg>`}\n <p>\n <foxy-i18n infer=\"\" key=\"warning\"></foxy-i18n>\n <a\n target=\"_blank\"\n class=\"inline-block rounded font-medium text-primary transition-colors cursor-pointer hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50\"\n href=\"https://wiki.foxycart.com/v/2.0/content_security_policy\"\n >\n wiki.foxycart.com\n </a>\n </p>\n </div>\n `\n : ''}\n `\n : ''}\n </foxy-internal-summary-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"analytics-config\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"analytics_config.usage\"\n property=\"json\"\n infer=\"analytics-config-usage\"\n >\n </foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"analytics-config-google-analytics\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"analytics_config.google_analytics.usage\"\n property=\"json\"\n infer=\"analytics-config-google-analytics-usage\"\n >\n </foxy-internal-switch-control>\n\n <foxy-internal-text-control\n json-template=${this.__defaultJSON}\n json-path=\"analytics_config.google_analytics.account_id\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"analytics-config-google-analytics-account-id\"\n >\n </foxy-internal-text-control>\n\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n json-path=\"analytics_config.google_analytics.include_on_site\"\n property=\"json\"\n infer=\"analytics-config-google-analytics-include-on-site\"\n >\n </foxy-internal-switch-control>\n\n <p class=\"flex items-start gap-s bg-error-10 text-error\">\n ${svg`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\" class=\"flex-shrink-0 text-error\" style=\"width: 1.25em\"><path fill-rule=\"evenodd\" d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z\" clip-rule=\"evenodd\"></path></svg>`}\n <foxy-i18n infer=\"\" key=\"deprecation_notice\"></foxy-i18n>\n </p>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"analytics-config-google-tag\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"analytics_config.google_tag.usage\"\n property=\"json\"\n infer=\"analytics-config-google-tag-usage\"\n >\n </foxy-internal-switch-control>\n\n <foxy-internal-text-control\n json-template=${this.__defaultJSON}\n json-path=\"analytics_config.google_tag.account_id\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"analytics-config-google-tag-account-id\"\n >\n </foxy-internal-text-control>\n\n <foxy-internal-text-control\n json-template=${this.__defaultJSON}\n json-path=\"analytics_config.google_tag.send_to\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"analytics-config-google-tag-send-to\"\n >\n </foxy-internal-text-control>\n\n <p class=\"flex items-start gap-s\">\n ${svg`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\" class=\"flex-shrink-0 text-primary\" style=\"width: 1.25em\"><path fill-rule=\"evenodd\" d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z\" clip-rule=\"evenodd\"></path></svg>`}\n <span>\n <foxy-i18n infer=\"\" key=\"usage_notice\"></foxy-i18n>\n <br />\n <a\n target=\"_blank\"\n class=\"cursor-pointer group text-primary rounded-s font-medium focus-outline-none focus-ring-2 focus-ring-primary-50\"\n href=\"https://wiki.foxycart.com/v/2.0/analytics#google_tag_ga4_google_ads\"\n rel=\"nofollow noreferrer noopener\"\n >\n <foxy-i18n class=\"transition-opacity group-hover-opacity-80\" infer=\"\" key=\"docs_link\">\n </foxy-i18n>\n </a>\n </span>\n </p>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"debug\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"debug.usage\"\n property=\"json\"\n infer=\"debug-usage\"\n >\n </foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-source-control\n infer=\"custom-config\"\n .getValue=${this.__customConfigGetValue}\n .setValue=${this.__customConfigSetValue}\n >\n </foxy-internal-source-control>\n\n <foxy-internal-source-control\n json-template=${this.__defaultJSON}\n json-path=\"custom_script_values.header\"\n property=\"json\"\n infer=\"custom-script-values-header\"\n >\n </foxy-internal-source-control>\n\n <foxy-internal-source-control\n json-template=${this.__defaultJSON}\n json-path=\"custom_script_values.checkout_fields\"\n property=\"json\"\n infer=\"custom-script-values-checkout-fields\"\n >\n </foxy-internal-source-control>\n\n <foxy-internal-source-control\n json-template=${this.__defaultJSON}\n json-path=\"custom_script_values.multiship_checkout_fields\"\n property=\"json\"\n infer=\"custom-script-values-multiship-checkout-fields\"\n >\n </foxy-internal-source-control>\n\n <foxy-internal-source-control\n json-template=${this.__defaultJSON}\n json-path=\"custom_script_values.footer\"\n property=\"json\"\n infer=\"custom-script-values-footer\"\n >\n </foxy-internal-source-control>\n\n ${super.renderBody()}\n\n <foxy-nucleon\n class=\"hidden\"\n infer=\"\"\n href=${ifDefined(this.store ?? this.data?._links['fx:store'].href)}\n id=\"storeLoader\"\n @update=${() => this.requestUpdate()}\n >\n </foxy-nucleon>\n `;\n }\n\n private get __storeLoader() {\n type Loader = NucleonElement<Resource<Rels.Store>>;\n return this.renderRoot.querySelector<Loader>('#storeLoader');\n }\n\n private get __formJson(): TemplateConfigJSON {\n return this.form.json ? JSON.parse(this.form.json) : getDefaultJSON();\n }\n\n private get __dataJson(): TemplateConfigJSON | null {\n return this.data?.json ? JSON.parse(this.data.json) : null;\n }\n}\n"]}
1
+ {"version":3,"file":"TemplateConfigForm.js","sourceRoot":"","sources":["../../../../src/elements/public/TemplateConfigForm/TemplateConfigForm.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,sCAAmC;AAC7D,OAAO,EAAE,cAAc,EAAE,sBAAmB;AAC5C,OAAO,EAAE,YAAY,EAAE,oDAAiD;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAErC,MAAM,EAAE,GAAG,sBAAsB,CAAC;AAClC,MAAM,IAAI,GAAG,eAAe,CAAC,iBAAiB,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,CAAC;AAElE;;;;;GAKG;AACH,MAAM,OAAO,kBAAmB,SAAQ,IAAU;IAAlD;;QAmCE,4EAA4E;QAC5E,cAAS,GAAkB,IAAI,CAAC;QAEhC,yDAAyD;QACzD,YAAO,GAAkB,IAAI,CAAC;QAE9B,wJAAwJ;QACxJ,UAAK,GAAkB,IAAI,CAAC;QAEX,wDAAmD,GAAG,IAAI,CAAC,SAAS,CAAC;YACpF,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,SAAS,EAAE;YAC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AAC,aAAa;;;;;;;;YAQhC,GAAG,CAAA,+VAA+V;;;;;;;0BAOpV,IAAI,CAAC,aAAa;;;;;;;;;;0BAUlB,IAAI,CAAC,aAAa;;;;;;;;;0BASlB,IAAI,CAAC,aAAa;;;;;;;;;YAShC,GAAG,CAAA,iWAAiW;;;;;;;;;;;;;;;;;;;0BAmBtV,IAAI,CAAC,aAAa;;;;;;;;;;;;oBAYxB,IAAI,CAAC,sBAAsB;oBAC3B,IAAI,CAAC,sBAAsB;;;;;wBAKvB,IAAI,CAAC,aAAa;;;;;;;;wBAQlB,IAAI,CAAC,aAAa;;;;;;;;wBAQlB,IAAI,CAAC,aAAa;;;;;;;;wBAQlB,IAAI,CAAC,aAAa;;;;;;;QAOlC,KAAK,CAAC,UAAU,EAAE;;;;;eAKX,SAAS,OAAC,IAAI,CAAC,KAAK,yCAAI,IAAI,CAAC,IAAI,0CAAE,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC;;kBAExD,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE;;;KAGvC,CAAC;IACJ,CAAC;IAED,IAAY,aAAa;QAEvB,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAS,cAAc,CAAC,CAAC;IAC/D,CAAC;IAED,IAAY,UAAU;QACpB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC;IACxE,CAAC;IAED,IAAY,UAAU;;QACpB,OAAO,OAAA,IAAI,CAAC,IAAI,0CAAE,IAAI,EAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC7D,CAAC;CACF","sourcesContent":["import type { Data, TemplateConfigJSON } from './types';\nimport type { PropertyDeclarations } from 'lit-element';\nimport type { TemplateResult } from 'lit-html';\nimport type { NucleonElement } from '../NucleonElement/NucleonElement';\nimport type { NucleonV8N } from '../NucleonElement/types';\nimport type { Resource } from '@foxy.io/sdk/core';\nimport type { Rels } from '@foxy.io/sdk/backend';\n\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { BooleanSelector } from '@foxy.io/sdk/core';\nimport { ResponsiveMixin } from '../../../mixins/responsive';\nimport { getDefaultJSON } from './defaults';\nimport { InternalForm } from '../../internal/InternalForm/InternalForm';\nimport { ifDefined } from 'lit-html/directives/if-defined';\nimport { html, svg } from 'lit-html';\n\nconst NS = 'template-config-form';\nconst Base = ResponsiveMixin(TranslatableMixin(InternalForm, NS));\n\n/**\n * Form element for creating or editing template configs (`fx:template_config`).\n *\n * @element foxy-template-config-form\n * @since 1.14.0\n */\nexport class TemplateConfigForm extends Base<Data> {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n countries: {},\n regions: {},\n store: {},\n };\n }\n\n static get v8n(): NucleonV8N<Data, TemplateConfigForm> {\n return [\n ({ json }) => {\n const formJson: TemplateConfigJSON = json ? JSON.parse(json) : getDefaultJSON();\n const url = formJson.csp.policy_enforce?.reporting_endpoint ?? '';\n return url.length <= 1000 || 'csp-policy-enforce-reporting-endpoint:v8n_too_long';\n },\n ({ json }) => {\n const formJson: TemplateConfigJSON = json ? JSON.parse(json) : getDefaultJSON();\n const url = formJson.csp.policy_report?.reporting_endpoint ?? '';\n return url.length <= 1000 || 'csp-policy-report-reporting-endpoint:v8n_too_long';\n },\n ({ json }) => {\n const formJson: TemplateConfigJSON = json ? JSON.parse(json) : getDefaultJSON();\n const domains = formJson.csp.policy_enforce?.script_src ?? [];\n return domains.every(d => d.length <= 1000) || 'csp-policy-enforce-script-src:v8n_too_long';\n },\n ({ json }) => {\n const formJson: TemplateConfigJSON = json ? JSON.parse(json) : getDefaultJSON();\n const domains = formJson.csp.policy_report?.script_src ?? [];\n return domains.every(d => d.length <= 1000) || 'csp-policy-report-script-src:v8n_too_long';\n },\n ];\n }\n\n /** URI of the `fx:countries` hAPI resource with `?include_regions=true`. */\n countries: string | null = null;\n\n /** @deprecated URI of the `fx:regions` hAPI resource. */\n regions: string | null = null;\n\n /** URI of the `fx:store` hAPI resource related to this template config. If this property is `null`, a link relationship will be used when available. */\n store: string | null = null;\n\n private readonly __customCheckoutFieldCouponEntryRequirementsOptions = JSON.stringify([\n { label: 'option_enabled', value: 'enabled' },\n { label: 'option_disabled', value: 'disabled' },\n ]);\n\n private readonly __customCheckoutFieldRequirementsOptions = JSON.stringify([\n { label: 'option_default', value: 'default' },\n { label: 'option_optional', value: 'optional' },\n { label: 'option_required', value: 'required' },\n { label: 'option_hidden', value: 'hidden' },\n ]);\n\n private readonly __tosCheckboxSettingsInitialStateOptions = JSON.stringify([\n { label: 'option_checked', value: 'checked' },\n { label: 'option_unchecked', value: 'unchecked' },\n ]);\n\n private readonly __locationFilteringFilterTypeOptions = JSON.stringify([\n { label: 'option_blocklist', value: 'blacklist' },\n { label: 'option_allowlist', value: 'whitelist' },\n ]);\n\n private readonly __foxycompleteShowComboboxOptions = JSON.stringify([\n { label: 'option_combobox', value: 'combobox' },\n { label: 'option_search', value: 'search' },\n ]);\n\n private readonly __tosCheckboxSettingsUsageOptions = JSON.stringify([\n { label: 'option_none', value: 'none' },\n { label: 'option_optional', value: 'optional' },\n { label: 'option_required', value: 'required' },\n ]);\n\n private readonly __locationFilteringUsageOptions = JSON.stringify([\n { label: 'option_none', value: 'none' },\n { label: 'option_shipping', value: 'shipping' },\n { label: 'option_billing', value: 'billing' },\n { label: 'option_both', value: 'both' },\n { label: 'option_independent', value: 'independent' },\n ]);\n\n private readonly __cscRequirementsValueOptions = JSON.stringify([\n { label: 'option_all_cards', value: 'all_cards' },\n { label: 'option_sso_only', value: 'sso_only' },\n { label: 'option_new_cards_only', value: 'new_cards_only' },\n ]);\n\n private readonly __checkoutTypeDefaultOptions = JSON.stringify([\n { label: 'option_default_account', value: 'default_account' },\n { label: 'option_default_guest', value: 'default_guest' },\n ]);\n\n private readonly __checkoutTypeAccountOptions = JSON.stringify([\n { label: 'option_account', value: 'account_only' },\n { label: 'option_guest', value: 'guest_only' },\n { label: 'option_both', value: 'default_guest' },\n ]);\n\n private readonly __cartTypeOptions = JSON.stringify([\n { label: 'option_default', value: 'default' },\n { label: 'option_fullpage', value: 'fullpage' },\n { label: 'option_custom', value: 'custom' },\n ]);\n\n private readonly __locationFilteringFilterValuesSetValue = (\n newValue: Record<string, '*' | string[]>\n ) => {\n const formJson = this.__formJson;\n const newConfig = {\n ...formJson.location_filtering,\n shipping_filter_values: newValue,\n billing_filter_values: newValue,\n };\n\n this.edit({ json: JSON.stringify({ ...formJson, location_filtering: newConfig }) });\n };\n\n private readonly __locationFilteringFilterTypeSetValue = (value: string) => {\n const formJson = this.__formJson;\n const newValue = {\n ...formJson.location_filtering,\n shipping_filter_type: value,\n billing_filter_type: value,\n };\n\n this.edit({ json: JSON.stringify({ ...formJson, location_filtering: newValue }) });\n };\n\n private readonly __foxycompleteShowComboboxGetValue = () => {\n return this.__formJson.foxycomplete.show_combobox ? 'combobox' : 'search';\n };\n\n private readonly __foxycompleteShowComboboxSetValue = (value: string) => {\n const newValue = value === 'combobox';\n const foxycomplete = { ...this.__formJson.foxycomplete, show_combobox: newValue };\n this.edit({ json: JSON.stringify({ ...this.__formJson, foxycomplete }) });\n };\n\n private readonly __checkoutTypeAccountGetValue = () => {\n const formJson = this.__formJson;\n return formJson.checkout_type.includes('default') ? 'default_guest' : formJson.checkout_type;\n };\n\n private readonly __customConfigGetValue = () => {\n const formJson = this.__formJson;\n if (typeof formJson.custom_config === 'string') return formJson.custom_config;\n return JSON.stringify(formJson.custom_config, null, 2);\n };\n\n private readonly __customConfigSetValue = (newValue: string) => {\n const formJson = this.__formJson;\n\n try {\n formJson.custom_config = JSON.parse(newValue);\n } catch {\n formJson.custom_config = newValue;\n }\n\n this.edit({ json: JSON.stringify(formJson) });\n };\n\n private readonly __cspUsageGetValue = () => {\n const usage = this.__formJson.csp.usage;\n return usage === 'enforce' || usage === 'both';\n };\n\n private readonly __cspUsageSetValue = (newValue: boolean) => {\n const formJson = this.__formJson;\n const oldUsage = formJson.csp.usage;\n const map: Record<string, Record<string, string>> = {\n false: { both: 'report', enforce: 'none' },\n true: { report: 'both', none: 'enforce' },\n };\n\n const newUsage = map[String(newValue)][oldUsage];\n if (newUsage) {\n const newJson = { ...formJson, csp: { ...formJson.csp, usage: newUsage } };\n this.edit({ json: JSON.stringify(newJson) });\n }\n };\n\n private readonly __cspRoUsageGetValue = () => {\n const usage = this.__formJson.csp.usage;\n return usage === 'report' || usage === 'both';\n };\n\n private readonly __cspRoUsageSetValue = (newValue: boolean) => {\n const formJson = this.__formJson;\n const oldUsage = formJson.csp.usage;\n const map: Record<string, Record<string, string>> = {\n false: { both: 'enforce', report: 'none' },\n true: { enforce: 'both', none: 'report' },\n };\n\n const newUsage = map[String(newValue)][oldUsage];\n if (newUsage) {\n const newJson = { ...formJson, csp: { ...formJson.csp, usage: newUsage } };\n this.edit({ json: JSON.stringify(newJson) });\n }\n };\n\n private readonly __defaultJSON = JSON.stringify(getDefaultJSON());\n\n get hiddenSelector(): BooleanSelector {\n const alwaysHidden = [super.hiddenSelector.toString()];\n\n const dataJson = this.__dataJson;\n const formJson = this.__formJson;\n\n const locationFilteringUsage = formJson.location_filtering.usage;\n const checkoutType = formJson.checkout_type;\n\n if (formJson.cart_display_config.usage !== 'required') {\n alwaysHidden.unshift('cart-group-two', 'cart-group-three', 'cart-group-four');\n }\n\n if (formJson.foxycomplete.usage !== 'required') {\n alwaysHidden.unshift(\n 'country-and-region-group-one:foxycomplete-show-combobox',\n 'country-and-region-group-one:foxycomplete-combobox-open',\n 'country-and-region-group-one:foxycomplete-combobox-close',\n 'country-and-region-group-one:foxycomplete-show-flags'\n );\n }\n\n if (formJson.foxycomplete.show_combobox === false) {\n alwaysHidden.unshift(\n 'country-and-region-group-one:foxycomplete-combobox-open',\n 'country-and-region-group-one:foxycomplete-combobox-close'\n );\n }\n\n if (locationFilteringUsage !== 'both') {\n alwaysHidden.unshift('country-and-region-group-two');\n }\n\n if (locationFilteringUsage !== 'shipping' && locationFilteringUsage !== 'independent') {\n alwaysHidden.unshift('country-and-region-group-three');\n }\n\n if (locationFilteringUsage !== 'billing' && locationFilteringUsage !== 'independent') {\n alwaysHidden.unshift('country-and-region-group-four');\n }\n\n if (checkoutType !== 'default_account' && checkoutType !== 'default_guest') {\n alwaysHidden.unshift('customer-accounts:checkout-type-default');\n }\n\n if (formJson.tos_checkbox_settings.usage === 'none') {\n alwaysHidden.unshift(\n 'consent-group-one:tos-checkbox-settings-url',\n 'consent-group-one:tos-checkbox-settings-initial-state',\n 'consent-group-one:tos-checkbox-settings-is-hidden'\n );\n }\n\n if (formJson.analytics_config.usage !== 'required') {\n alwaysHidden.unshift('analytics-config-google-analytics', 'analytics-config-google-tag');\n }\n\n if (dataJson?.analytics_config.google_analytics.usage !== 'required') {\n alwaysHidden.unshift('analytics-config-google-analytics');\n }\n\n if (formJson.analytics_config.google_analytics.usage !== 'required') {\n alwaysHidden.unshift(\n 'analytics-config-google-analytics:analytics-config-google-analytics-account-id',\n 'analytics-config-google-analytics:analytics-config-google-analytics-include-on-site'\n );\n }\n\n if (formJson.analytics_config.google_tag.usage !== 'required') {\n alwaysHidden.unshift('analytics-config-google-tag:analytics-config-google-tag-account-id');\n alwaysHidden.unshift('analytics-config-google-tag:analytics-config-google-tag-send-to');\n }\n\n if (this.__storeLoader?.data?.features_multiship !== true) {\n alwaysHidden.unshift('custom-script-values-multiship-checkout-fields');\n }\n\n return new BooleanSelector(alwaysHidden.join(' ').trim());\n }\n\n renderBody(): TemplateResult {\n const customCheckoutFieldRequirementsControls = [\n [\n 'billing_address1',\n 'billing_address2',\n 'billing_city',\n 'billing_region',\n 'billing_postal_code',\n 'billing_country',\n ],\n [\n 'billing_first_name',\n 'billing_last_name',\n 'billing_company',\n 'billing_tax_id',\n 'billing_phone',\n 'coupon_entry',\n ],\n ];\n\n const cartDisplayConfigFields = [\n ['show_product_weight', 'show_product_category', 'show_product_code', 'show_product_options'],\n ['show_sub_frequency', 'show_sub_startdate', 'show_sub_nextdate', 'show_sub_enddate'],\n ];\n\n const formCspUsage = this.__formJson.csp.usage;\n const dataCspUsage = this.__dataJson?.csp?.usage;\n\n return html`\n ${this.renderHeader()}\n\n <foxy-internal-summary-control infer=\"cart-group-one\">\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"cart_type\"\n property=\"json\"\n options=${this.__cartTypeOptions}\n layout=\"summary-item\"\n infer=\"cart-type\"\n >\n </foxy-internal-select-control>\n\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"cart_display_config.usage\"\n property=\"json\"\n infer=\"cart-display-config-usage\"\n invert\n >\n </foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <div\n class=\"grid sm-grid-cols-2 gap-m\"\n ?hidden=${cartDisplayConfigFields.every((group, index) => {\n return group.every(prop => {\n const suffix = index === 0 ? 'two' : 'three';\n const sel = `cart-group-${suffix}:cart-display-config-${prop.replace(/_/g, '-')}`;\n return this.hiddenSelector.matches(sel, true);\n });\n })}\n >\n ${cartDisplayConfigFields.map((group, index) => {\n const suffix = index === 0 ? 'two' : 'three';\n return html`\n <foxy-internal-summary-control infer=\"cart-group-${suffix}\">\n ${group.map(prop => {\n return html`\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n json-path=\"cart_display_config.${prop}\"\n property=\"json\"\n infer=\"cart-display-config-${prop.replace(/_/g, '-')}\"\n >\n </foxy-internal-switch-control>\n `;\n })}\n </foxy-internal-summary-control>\n `;\n })}\n </div>\n\n <foxy-internal-summary-control infer=\"cart-group-four\">\n <foxy-internal-editable-list-control\n json-template=${this.__defaultJSON}\n json-path=\"cart_display_config.hidden_product_options\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"cart-display-config-hidden-product-options\"\n simple-value\n >\n </foxy-internal-editable-list-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"country-and-region-group-one\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"foxycomplete.usage\"\n property=\"json\"\n infer=\"foxycomplete-usage\"\n >\n </foxy-internal-switch-control>\n\n <foxy-internal-select-control\n options=${this.__foxycompleteShowComboboxOptions}\n layout=\"summary-item\"\n infer=\"foxycomplete-show-combobox\"\n .getValue=${this.__foxycompleteShowComboboxGetValue}\n .setValue=${this.__foxycompleteShowComboboxSetValue}\n >\n </foxy-internal-select-control>\n\n <foxy-internal-text-control\n json-template=${this.__defaultJSON}\n json-path=\"foxycomplete.combobox_open\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"foxycomplete-combobox-open\"\n >\n </foxy-internal-text-control>\n\n <foxy-internal-text-control\n json-template=${this.__defaultJSON}\n json-path=\"foxycomplete.combobox_close\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"foxycomplete-combobox-close\"\n >\n </foxy-internal-text-control>\n\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n json-path=\"foxycomplete.show_flags\"\n property=\"json\"\n infer=\"foxycomplete-show-flags\"\n >\n </foxy-internal-switch-control>\n\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"enabled\"\n json-path=\"postal_code_lookup.usage\"\n property=\"json\"\n infer=\"postal-code-lookup\"\n >\n </foxy-internal-switch-control>\n\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"location_filtering.usage\"\n property=\"json\"\n options=${this.__locationFilteringUsageOptions}\n layout=\"summary-item\"\n infer=\"location-filtering-usage\"\n >\n </foxy-internal-select-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"country-and-region-group-two\">\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"location_filtering.shipping_filter_type\"\n property=\"json\"\n options=${this.__locationFilteringFilterTypeOptions}\n layout=\"summary-item\"\n infer=\"location-filtering-filter-type\"\n .setValue=${this.__locationFilteringFilterTypeSetValue}\n >\n </foxy-internal-select-control>\n\n <foxy-internal-template-config-form-filter-values-control\n json-template=${this.__defaultJSON}\n json-path=\"location_filtering.shipping_filter_values\"\n countries=${ifDefined(this.countries ?? void 0)}\n property=\"json\"\n infer=\"location-filtering-filter-values\"\n .setValue=${this.__locationFilteringFilterValuesSetValue}\n >\n </foxy-internal-template-config-form-filter-values-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"country-and-region-group-three\">\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"location_filtering.shipping_filter_type\"\n property=\"json\"\n options=${this.__locationFilteringFilterTypeOptions}\n layout=\"summary-item\"\n infer=\"location-filtering-shipping-filter-type\"\n >\n </foxy-internal-select-control>\n\n <foxy-internal-template-config-form-filter-values-control\n json-template=${this.__defaultJSON}\n json-path=\"location_filtering.shipping_filter_values\"\n countries=${ifDefined(this.countries ?? void 0)}\n property=\"json\"\n infer=\"location-filtering-shipping-filter-values\"\n >\n </foxy-internal-template-config-form-filter-values-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"country-and-region-group-four\">\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"location_filtering.billing_filter_type\"\n property=\"json\"\n options=${this.__locationFilteringFilterTypeOptions}\n layout=\"summary-item\"\n infer=\"location-filtering-billing-filter-type\"\n >\n </foxy-internal-select-control>\n\n <foxy-internal-template-config-form-filter-values-control\n json-template=${this.__defaultJSON}\n json-path=\"location_filtering.billing_filter_values\"\n countries=${ifDefined(this.countries ?? void 0)}\n property=\"json\"\n infer=\"location-filtering-billing-filter-values\"\n >\n </foxy-internal-template-config-form-filter-values-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"customer-accounts\">\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"checkout_type\"\n property=\"json\"\n options=${this.__checkoutTypeAccountOptions}\n layout=\"summary-item\"\n infer=\"checkout-type-account\"\n .getValue=${this.__checkoutTypeAccountGetValue}\n >\n </foxy-internal-select-control>\n\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"checkout_type\"\n property=\"json\"\n options=${this.__checkoutTypeDefaultOptions}\n layout=\"summary-item\"\n infer=\"checkout-type-default\"\n >\n </foxy-internal-select-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"consent-group-one\">\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"tos_checkbox_settings.usage\"\n property=\"json\"\n options=${this.__tosCheckboxSettingsUsageOptions}\n layout=\"summary-item\"\n infer=\"tos-checkbox-settings-usage\"\n >\n </foxy-internal-select-control>\n\n <foxy-internal-text-control\n json-template=${this.__defaultJSON}\n json-path=\"tos_checkbox_settings.url\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"tos-checkbox-settings-url\"\n >\n </foxy-internal-text-control>\n\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"tos_checkbox_settings.initial_state\"\n property=\"json\"\n options=${this.__tosCheckboxSettingsInitialStateOptions}\n layout=\"summary-item\"\n infer=\"tos-checkbox-settings-initial-state\"\n >\n </foxy-internal-select-control>\n\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n json-path=\"tos_checkbox_settings.is_hidden\"\n property=\"json\"\n infer=\"tos-checkbox-settings-is-hidden\"\n >\n </foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"consent-group-two\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"eu_secure_data_transfer_consent.usage\"\n property=\"json\"\n infer=\"eu-secure-data-transfer-consent-usage\"\n >\n </foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"consent-group-three\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"newsletter_subscribe.usage\"\n property=\"json\"\n infer=\"newsletter-subscribe-usage\"\n >\n </foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"supported-cards-group\">\n <foxy-internal-template-config-form-supported-cards-control\n json-template=${this.__defaultJSON}\n json-path=\"supported_payment_cards\"\n property=\"json\"\n infer=\"supported-payment-cards\"\n >\n </foxy-internal-template-config-form-supported-cards-control>\n\n <p class=\"flex items-start gap-s\">\n ${svg`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\" class=\"flex-shrink-0 text-primary\" style=\"width: 1.25em\"><path fill-rule=\"evenodd\" d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z\" clip-rule=\"evenodd\"></path></svg>`}\n <foxy-i18n infer=\"\" key=\"disclaimer\"></foxy-i18n>\n </p>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"csc-requirements-group\">\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=\"csc_requirements\"\n property=\"json\"\n options=${this.__cscRequirementsValueOptions}\n layout=\"summary-item\"\n infer=\"csc-requirements\"\n >\n </foxy-internal-select-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"checkout-fields-group-one\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"disabled\"\n true-alias=\"enabled\"\n json-path=\"custom_checkout_field_requirements.cart_controls\"\n property=\"json\"\n infer=\"custom-checkout-field-requirements-cart-controls\"\n >\n </foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <div\n class=\"grid sm-grid-cols-2 gap-m\"\n ?hidden=${customCheckoutFieldRequirementsControls.every((group, index) => {\n return group.every(prop => {\n const suffix = index === 0 ? 'two' : 'three';\n const infer = prop.replace(/_/g, '-').replace('1', '-one').replace('2', '-two');\n const sel = `checkout-fields-group-${suffix}:custom-checkout-field-requirements-${infer}`;\n return this.hiddenSelector.matches(sel, true);\n });\n })}\n >\n ${customCheckoutFieldRequirementsControls.map((group, index) => {\n const suffix = index === 0 ? 'two' : 'three';\n return html`\n <foxy-internal-summary-control infer=\"checkout-fields-group-${suffix}\">\n ${group.map(prop => {\n const infer = prop.replace(/_/g, '-').replace('1', '-one').replace('2', '-two');\n const path = `custom_checkout_field_requirements.${prop}`;\n return html`\n <foxy-internal-select-control\n json-template=${this.__defaultJSON}\n json-path=${path}\n property=\"json\"\n options=${prop === 'coupon_entry'\n ? this.__customCheckoutFieldCouponEntryRequirementsOptions\n : this.__customCheckoutFieldRequirementsOptions}\n layout=\"summary-item\"\n infer=\"custom-checkout-field-requirements-${infer}\"\n >\n </foxy-internal-select-control>\n `;\n })}\n </foxy-internal-summary-control>\n `;\n })}\n </div>\n\n <foxy-internal-summary-control infer=\"csp\" class=\"space-y-m\" layout=\"section\">\n <foxy-internal-summary-control infer=\"csp-group-one\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n json-path=\"csp.usage\"\n property=\"json\"\n infer=\"csp-enable-ro-csp\"\n .getValue=${this.__cspRoUsageGetValue}\n .setValue=${this.__cspRoUsageSetValue}\n >\n </foxy-internal-switch-control>\n\n ${formCspUsage === 'report' || formCspUsage === 'both'\n ? html`\n <foxy-internal-text-control\n json-template=${this.__defaultJSON}\n json-path=\"csp.policy_report.reporting_endpoint\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"csp-policy-report-reporting-endpoint\"\n >\n </foxy-internal-text-control>\n\n <foxy-internal-editable-list-control\n json-template=${this.__defaultJSON}\n json-path=\"csp.policy_report.script_src\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"csp-policy-report-script-src\"\n simple-value\n >\n </foxy-internal-editable-list-control>\n\n ${dataCspUsage === 'none' || dataCspUsage === 'enforce'\n ? html`\n <div\n class=\"flex items-start bg-primary-10\"\n style=\"gap: calc(0.625em + (var(--lumo-border-radius) / 4) - 1px)\"\n >\n ${svg`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" class=\"flex-shrink-0 text-primary\" style=\"width: 1.25em\"><path fill-rule=\"evenodd\" d=\"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z\" clip-rule=\"evenodd\" /></svg>`}\n <p>\n <foxy-i18n infer=\"\" key=\"warning\"></foxy-i18n>\n <a\n target=\"_blank\"\n class=\"inline-block rounded font-medium text-primary transition-colors cursor-pointer hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50\"\n href=\"https://wiki.foxycart.com/v/2.0/content_security_policy\"\n >\n wiki.foxycart.com\n </a>\n </p>\n </div>\n `\n : ''}\n `\n : ''}\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"csp-group-two\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n json-path=\"csp.usage\"\n property=\"json\"\n infer=\"csp-enable-csp\"\n .getValue=${this.__cspUsageGetValue}\n .setValue=${this.__cspUsageSetValue}\n >\n </foxy-internal-switch-control>\n\n ${formCspUsage === 'enforce' || formCspUsage === 'both'\n ? html`\n <foxy-internal-text-control\n json-template=${this.__defaultJSON}\n json-path=\"csp.policy_enforce.reporting_endpoint\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"csp-policy-enforce-reporting-endpoint\"\n >\n </foxy-internal-text-control>\n\n <foxy-internal-editable-list-control\n json-template=${this.__defaultJSON}\n json-path=\"csp.policy_enforce.script_src\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"csp-policy-enforce-script-src\"\n simple-value\n >\n </foxy-internal-editable-list-control>\n\n ${dataCspUsage === 'none' || dataCspUsage === 'report'\n ? html`\n <div\n class=\"flex items-start bg-error-10\"\n style=\"gap: calc(0.625em + (var(--lumo-border-radius) / 4) - 1px)\"\n >\n ${svg`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\" class=\"flex-shrink-0 text-error\" style=\"width: 1.25em\"><path fill-rule=\"evenodd\" d=\"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z\" clip-rule=\"evenodd\" /></svg>`}\n <p>\n <foxy-i18n infer=\"\" key=\"warning\"></foxy-i18n>\n <a\n target=\"_blank\"\n class=\"inline-block rounded font-medium text-error transition-colors cursor-pointer hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-error-50\"\n href=\"https://wiki.foxycart.com/v/2.0/content_security_policy\"\n >\n wiki.foxycart.com\n </a>\n </p>\n </div>\n `\n : ''}\n `\n : ''}\n </foxy-internal-summary-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"analytics-config\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"analytics_config.usage\"\n property=\"json\"\n infer=\"analytics-config-usage\"\n >\n </foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"analytics-config-google-analytics\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"analytics_config.google_analytics.usage\"\n property=\"json\"\n infer=\"analytics-config-google-analytics-usage\"\n >\n </foxy-internal-switch-control>\n\n <foxy-internal-text-control\n json-template=${this.__defaultJSON}\n json-path=\"analytics_config.google_analytics.account_id\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"analytics-config-google-analytics-account-id\"\n >\n </foxy-internal-text-control>\n\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n json-path=\"analytics_config.google_analytics.include_on_site\"\n property=\"json\"\n infer=\"analytics-config-google-analytics-include-on-site\"\n >\n </foxy-internal-switch-control>\n\n <p class=\"flex items-start gap-s bg-error-10 text-error\">\n ${svg`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\" class=\"flex-shrink-0 text-error\" style=\"width: 1.25em\"><path fill-rule=\"evenodd\" d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z\" clip-rule=\"evenodd\"></path></svg>`}\n <foxy-i18n infer=\"\" key=\"deprecation_notice\"></foxy-i18n>\n </p>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"analytics-config-google-tag\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"analytics_config.google_tag.usage\"\n property=\"json\"\n infer=\"analytics-config-google-tag-usage\"\n >\n </foxy-internal-switch-control>\n\n <foxy-internal-text-control\n json-template=${this.__defaultJSON}\n json-path=\"analytics_config.google_tag.account_id\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"analytics-config-google-tag-account-id\"\n >\n </foxy-internal-text-control>\n\n <foxy-internal-text-control\n json-template=${this.__defaultJSON}\n json-path=\"analytics_config.google_tag.send_to\"\n property=\"json\"\n layout=\"summary-item\"\n infer=\"analytics-config-google-tag-send-to\"\n >\n </foxy-internal-text-control>\n\n <p class=\"flex items-start gap-s\">\n ${svg`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\" class=\"flex-shrink-0 text-primary\" style=\"width: 1.25em\"><path fill-rule=\"evenodd\" d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z\" clip-rule=\"evenodd\"></path></svg>`}\n <span>\n <foxy-i18n infer=\"\" key=\"usage_notice\"></foxy-i18n>\n <br />\n <a\n target=\"_blank\"\n class=\"cursor-pointer group text-primary rounded-s font-medium focus-outline-none focus-ring-2 focus-ring-primary-50\"\n href=\"https://wiki.foxycart.com/v/2.0/analytics#google_tag_ga4_google_ads\"\n rel=\"nofollow noreferrer noopener\"\n >\n <foxy-i18n class=\"transition-opacity group-hover-opacity-80\" infer=\"\" key=\"docs_link\">\n </foxy-i18n>\n </a>\n </span>\n </p>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"debug\">\n <foxy-internal-switch-control\n json-template=${this.__defaultJSON}\n false-alias=\"none\"\n true-alias=\"required\"\n json-path=\"debug.usage\"\n property=\"json\"\n infer=\"debug-usage\"\n >\n </foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-source-control\n infer=\"custom-config\"\n .getValue=${this.__customConfigGetValue}\n .setValue=${this.__customConfigSetValue}\n >\n </foxy-internal-source-control>\n\n <foxy-internal-source-control\n json-template=${this.__defaultJSON}\n json-path=\"custom_script_values.header\"\n property=\"json\"\n infer=\"custom-script-values-header\"\n >\n </foxy-internal-source-control>\n\n <foxy-internal-source-control\n json-template=${this.__defaultJSON}\n json-path=\"custom_script_values.checkout_fields\"\n property=\"json\"\n infer=\"custom-script-values-checkout-fields\"\n >\n </foxy-internal-source-control>\n\n <foxy-internal-source-control\n json-template=${this.__defaultJSON}\n json-path=\"custom_script_values.multiship_checkout_fields\"\n property=\"json\"\n infer=\"custom-script-values-multiship-checkout-fields\"\n >\n </foxy-internal-source-control>\n\n <foxy-internal-source-control\n json-template=${this.__defaultJSON}\n json-path=\"custom_script_values.footer\"\n property=\"json\"\n infer=\"custom-script-values-footer\"\n >\n </foxy-internal-source-control>\n\n ${super.renderBody()}\n\n <foxy-nucleon\n class=\"hidden\"\n infer=\"\"\n href=${ifDefined(this.store ?? this.data?._links['fx:store'].href)}\n id=\"storeLoader\"\n @update=${() => this.requestUpdate()}\n >\n </foxy-nucleon>\n `;\n }\n\n private get __storeLoader() {\n type Loader = NucleonElement<Resource<Rels.Store>>;\n return this.renderRoot.querySelector<Loader>('#storeLoader');\n }\n\n private get __formJson(): TemplateConfigJSON {\n return this.form.json ? JSON.parse(this.form.json) : getDefaultJSON();\n }\n\n private get __dataJson(): TemplateConfigJSON | null {\n return this.data?.json ? JSON.parse(this.data.json) : null;\n }\n}\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@foxy.io/elements",
3
3
  "type": "module",
4
- "version": "1.45.0-beta.4",
4
+ "version": "1.45.0-beta.5",
5
5
  "description": "E-commerce web components by Foxy.",
6
6
  "repository": {
7
7
  "type": "git",