1import{at as V,r as I,aY as w,a4 as x,ae as k,a8 as _,a9 as P,_ as b,au as E,G as o,a5 as D,a7 as F,am as O,av as R,g as v}from"./CEPW8sVu.js";import S from"./_Il_vvUS.js";import{be as Z,bk as A,b5 as B,bN as j,bO as M,bP as N,bl as q,bQ as z,bc as L}from"./KPt6UUil.js";import{I as y}from"./CrpfoHX7.js";import"./DLwL7Km4.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="6ce2a65b-3aab-41fd-81f5-966253876b5d",t._sentryDebugIdIdentifier="sentry-dbid-6ce2a65b-3aab-41fd-81f5-966253876b5d")}catch{}})();const T={id:"formPostalCodeError",role:"alert",class:"el-form-item__error"},$={__name:"AtxFormPostalCode",props:R({clearable:{default:!1,type:Boolean},disabled:{default:!1,type:Boolean}},{modelValue:{type:Object,default:{postalCode:""},type:Object},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const i=V(t,"modelValue",{type:Object,default:{postalCode:""},type:Object}),p=A(),{t:l}=B(),n=v(),c=v(),d=p.info.siteId,C=async s=>{let e=new z(!1,!1);if(!s||s.length===0)return e;try{const a=await L("/v1/validate/postalcode",{postalCode:s});return a&&"isValidated"in a&&(e=a),e}catch(a){return console.error("Failed to check zip restriction:",a),e}},g=(s,e,a)=>{if(!M(d).test(String(e).toLowerCase())){if(N(d,e)){a(new Error(l("atx_ui.validation.is__slovakian__postal")));return}a(new Error(l("atx_ui.validation.postal")));return}if(d!==q.PL){c.value.checkZipRestriction(e),a();return}C(e).then(r=>{!r.isValidated||r.isValidated&&!r.isValid?a(new Error(r.validationMessage??l("atx_ui.validation.postal"))):(c.value.checkZipRestriction(e),a())})},h=I({postalCode:[{required:!0,message:l("atx_ui.validation.postal")},{validator:g}]});return(s,e)=>{const a=E,f=S,m=O,r=w("maska");return x(),k(m,{ref_key:"postalCode",ref:n,class:"postal-code",prop:"postalCode",label:s.$t("customer__form.postal__code"),rules:o(h).postalCode},{error:_(({error:u})=>[D("div",T,F(u),1)]),default:_(()=>[P(b(a,{modelValue:i.value.postalCode,"onUpdate:modelValue":e[0]||(e[0]=u=>i.value.postalCode=u),"data-maska":o(j)(o(d)),placeholder:"",name:"postalCode",style:{"max-width":"100px"},clearable:t.clearable,disabled:t.disabled,"aria-required":!0,"aria-invalid":o(y)(o(n)),"aria-describedby":o(y)(o(n))?"formPostalCodeError":null},null,8,["modelValue","data-maska","clearable","disabled","aria-invalid","aria-describedby"]),[[r]]),b(f,{ref_key:"formZipValidate",ref:c},null,512)]),_:1},8,["label","rules"])}}},J=Z($,[["__scopeId","data-v-42f9c7cb"]]);export{J as default};
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.