1import{CONSENT_TAGS}from"@theme/customer-register-constants";function isKoreaMarket(countryCode){return countryCode==="KR"}function getActiveConsentCheckboxes(refs,countryCode){const{consentTos,consentPrivacy,consentOver14,consentMarketing}=refs;return(isKoreaMarket(countryCode)?[consentTos,consentPrivacy,consentOver14,consentMarketing]:[consentOver14,consentMarketing]).filter(checkbox=>checkbox instanceof HTMLInputElement)}function getRequiredConsentCheckboxes(refs,countryCode){const{consentTos,consentPrivacy,consentOver14}=refs;return(isKoreaMarket(countryCode)?[consentTos,consentPrivacy,consentOver14]:[consentOver14]).filter(checkbox=>checkbox instanceof HTMLInputElement)}export function syncConsentAll(refs,countryCode){const{consentAll}=refs;if(!consentAll)return;const isChecked=consentAll.checked;getActiveConsentCheckboxes(refs,countryCode).forEach(checkbox=>{checkbox&&(checkbox.checked=isChecked)})}export function updateConsentAllState(refs,countryCode){const{consentAll}=refs;if(!consentAll)return;const allCheckboxes=getActiveConsentCheckboxes(refs,countryCode),checkedCount=allCheckboxes.filter(cb=>cb?.checked).length;allCheckboxes.length===0||checkedCount===0?(consentAll.checked=!1,consentAll.indeterminate=!1):checkedCount===allCheckboxes.length?(consentAll.checked=!0,consentAll.indeterminate=!1):(consentAll.checked=!1,consentAll.indeterminate=!0)}export function areRequiredConsentsChecked(refs,countryCode){return getRequiredConsentCheckboxes(refs,countryCode).every(checkbox=>checkbox.checked)}export function generateConsentTags(refs,countryCode){const{consentTos,consentPrivacy,consentOver14,consentMarketing}=refs,tags=[],isKorea=isKoreaMarket(countryCode);return isKorea&&consentTos?.checked&&tags.push(CONSENT_TAGS.TOS),isKorea&&consentPrivacy?.checked&&tags.push(CONSENT_TAGS.PRIVACY),consentOver14?.checked&&tags.push(CONSENT_TAGS.OVER14),consentMarketing?.checked&&tags.push(CONSENT_TAGS.MARKETING),tags.join(",")}export function updateTagsInput(tagsInput,refs,countryCode){tagsInput&&(tagsInput.value=generateConsentTags(refs,countryCode))} 2//# sourceMappingURL=/cdn/shop/t/2/assets/customer-register-consent.js.map?v=68178198917230120841774832940
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.