"use strict";(self.webpackChunkapp_container=self.webpackChunkapp_container||[]).push([[7156],{7167:(e,l,t)=>{t.d(l,{b:()=>n});var i=t(4914),o=t.n(i);const n=e=>{var l;let{optionValue:t,handleCountryChange:n}=e;const[a,s]=(0,i.useState)(null),u=(0,i.useRef)(!0),d=(e,l)=>-(e.toLowerCase().charCodeAt(0)-97)*l,_=(0,i.useCallback)((e=>({x:d(e[1],31.25),y:d(e[0],25)})),[]),r=(0,i.useCallback)((()=>{if(t){var e;const l=null===(e=window)||void 0===e?void 0:e.country_list.find((e=>"+".concat(null==e?void 0:e.phoneCode)===(null==t?void 0:t.phoneCode)||"+".concat(e.phoneCode)===(null==t?void 0:t.phone)));if(l){const e=_(l.code).x+"px ",t=_(l.code).y+"px";s([e,t].join("")),n("+".concat(l.phoneCode))}}}),[t,_,n]);return(0,i.useEffect)((()=>{u.current&&t&&(u.current=!1,r())}),[u,r,t]),o().createElement("div",{className:"CountrySelectModule_flits_country_dropdown__mPwIn"},o().createElement("span",{className:"CountrySelectModule_flits_country_flag__E+3+W",style:{backgroundPosition:a}}),o().createElement("div",{className:"CountrySelectModule_flits_select_row__nXDWh"},o().createElement("select",{onChange:e=>{const l=e.target.selectedIndex,t=e.target.options[l],i=t.dataset.xPos+"px ",o=t.dataset.yPos+"px";s([i,o].join("")),n(t.dataset.countryCode)},className:"CountrySelectModule_flits_input__k+zl+"},null===(l=window)||void 0===l?void 0:l.country_list.map(((e,l)=>o().createElement("option",{key:l,"data-country-iso-code":e.code,"data-country-flag":e.code.toUpperCase().replace(/./g,(e=>String.fromCodePoint(e.charCodeAt(0)+127397))),"data-country-code":"+"+e.phoneCode,"data-x-pos":_(e.code).x,"data-y-pos":_(e.code).y,defaultValue:t===e.countryName},"".concat(e.countryName," (+").concat(e.phoneCode,")"))))),o().createElement("div",{className:"CountrySelectModule_flits_select_arrow__-DVdf"},o().createElement("svg",{viewBox:"0 0 24 24",width:"14",height:"14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",shapeRendering:"geometricPrecision"},o().createElement("path",{d:"M6 9l6 6 6-6"})))))}},2142:(e,l,t)=>{t.d(l,{E:()=>n});var i=t(4914),o=t.n(i);const n=e=>{let{svgString:l}=e;return o().createElement("span",{dangerouslySetInnerHTML:{__html:l}})}},8286:(e,l,t)=>{t.d(l,{w:()=>o});var i=t(1228);function o(e){var l;let t,o=null===(l=window)||void 0===l?void 0:l.country_list,n="",a=-1,s=(0,i.l)(e);if(e&&void 0!==e){for(let e=0;e<(null==o?void 0:o.length);e++)if(o[e].code===(null==s?void 0:s.country)){n="+".concat(o[e].phoneCode),a=e;break}t=e.replace(n,"")}else{var u,d,_;const e=null!==(u=null===(d=window)||void 0===d||null===(d=d.flitsThemeAppExtensionObjects)||void 0===d?void 0:d.shopCountryName)&&void 0!==u?u:null===(_=window)||void 0===_||null===(_=_.flitsThemeAppExtensionObjects)||void 0===_?void 0:_.defaultCountry;for(let l=0;l<(null==o?void 0:o.length);l++)if(o[l].countryName===e){n="+".concat(o[l].phoneCode),a=l;break}}return{...s,phone:t||"",phoneCode:n,countryIndex:a}}},7156:(e,l,t)=>{t.r(l),t.d(l,{MyProfileBirthDate:()=>f,MyProfileButtonWrapper:()=>Q,MyProfileCancelButton:()=>h,MyProfileContactInputEditMode:()=>W,MyProfileContentWrapper:()=>a,MyProfileCustomAlphaNumericField:()=>I,MyProfileCustomDateField:()=>q,MyProfileCustomFileField:()=>J,MyProfileCustomMultiLineField:()=>L,MyProfileCustomNumberField:()=>j,MyProfileCustomRow:()=>V,MyProfileCustomTextField:()=>S,MyProfileCustomTimeField:()=>T,MyProfileEditButton:()=>g,MyProfileGender:()=>_,MyProfileInput:()=>N,MyProfileInputContactNormal:()=>H,MyProfileLabel:()=>U,MyProfileRow:()=>v,MyProfileRowWrapper:()=>r,MyProfileSaveButton:()=>M,MyProfileSelect:()=>d,MyProfileSnackBar:()=>F,SaveSnackBar:()=>P});const i={};var o=t(4914),n=t.n(o);const a=e=>n().createElement("form",{action:"/profile_save",autoComplete:"off",id:"flits_form_profile",className:i.flits_read_input},e.children),s={flits_gender_input_row:"MyProfileGenderModule_flits_gender_input_row__ydACw",flits_input_row:"MyProfileGenderModule_flits_input_row__1ZIhV",flits_input:"MyProfileGenderModule_flits_input__+ZV3f",flits_input_label:"MyProfileGenderModule_flits_input_label__0570W",flits_mobile:"MyProfileGenderModule_flits_mobile__XmSmQ",flits_desktop:"MyProfileGenderModule_flits_desktop__qmYIK"};var u=t(5605);const d=e=>{var l,t,i;const o=u.GlobalStore.Get(),{t:a}=o._globalActions.Helpers[0].useTranslationLanguage();return n().createElement("div",{className:"MyProfileSelectModule_flits_select_row__XO3vr"},n().createElement("select",{className:"".concat("MyProfileSelectModule_flits_input__ltABc"," ").concat(null!=e&&e.edit?"MyProfileSelectModule_flits_input_edit_mode__f36PW":""),defaultValue:null==e?void 0:e.value,name:null!==(l=null==e?void 0:e.name)&&void 0!==l?l:"",id:null!==(t=null==e?void 0:e.id)&&void 0!==t?t:"",readOnly:null==e?void 0:e.readOnly,disabled:null!==(i=null==e?void 0:e.disabled)&&void 0!==i&&i,onChange:e.onValueChange},n().createElement("option",{value:"none",className:"MyProfileSelectModule_flits_d_none__kjatN"}),n().createElement("option",{value:"male"},a("flits.profile_page.male","Male")),n().createElement("option",{value:"female"},a("flits.profile_page.female","Female")),n().createElement("option",{value:"other"},a("flits.profile_page.other","Other"))),(null==e?void 0:e.edit)&&n().createElement("div",{className:"MyProfileSelectModule_flits_select_arrow__tlNH-"},n().createElement("svg",{viewBox:"0 0 24 24",width:"14",height:"14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",shapeRendering:"geometricPrecision"},n().createElement("path",{d:"M6 9l6 6 6-6"}))))},_=e=>{const l=u.GlobalStore.Get(),{t}=l._globalActions.Helpers[0].useTranslationLanguage(),i=l=>{null==e||e.onValueChange(l)};return n().createElement(n().Fragment,null,n().createElement("div",{className:"".concat(s.flits_gender_input_row," ").concat(s.flits_gender_radio," ").concat(s.flits_desktop)},n().createElement("div",{className:s.flits_input_row},n().createElement("input",{type:"radio",className:s.flits_input,id:"flits-gender-male",name:null==e?void 0:e.name,value:"male",onClick:i,disabled:null==e?void 0:e.disabled,checked:"male"===(null==e?void 0:e.value)}),n().createElement("label",{className:s.flits_input_label},t("flits.profile_page.male","Male"))),n().createElement("div",{className:s.flits_input_row},n().createElement("input",{type:"radio",className:s.flits_input,id:"flits-gender-female",name:null==e?void 0:e.name,onClick:i,value:"female",disabled:null==e?void 0:e.disabled,checked:"female"===(null==e?void 0:e.value)}),n().createElement("label",{className:s.flits_input_label},t("flits.profile_page.female","Female"))),n().createElement("div",{className:s.flits_input_row},n().createElement("input",{type:"radio",className:s.flits_input,id:"flits-gender-other",name:null==e?void 0:e.name,onClick:i,value:"other",disabled:null==e?void 0:e.disabled,checked:"other"===(null==e?void 0:e.value)}),n().createElement("label",{className:s.flits_input_label},t("flits.profile_page.other","Other")))),n().createElement("div",{className:s.flits_mobile},n().createElement(o.Suspense,{fallback:n().createElement(n().Fragment,null)},n().createElement(d,e))))},r=e=>n().createElement("div",{className:"MyProfileRowWrapperModule_flits_row__D8UWj"},null==e?void 0:e.children),c={flits_dob_wrap:"MyProfileBirthDateModule_flits_dob_wrap__5pwSN",flits_select_row:"MyProfileBirthDateModule_flits_select_row__A9j3M",flits_dd_select:"MyProfileBirthDateModule_flits_dd_select__nMNiW",flits_mm_select:"MyProfileBirthDateModule_flits_mm_select__INzAG",flits_input:"MyProfileBirthDateModule_flits_input__fwBxP",flits_select_arrow:"MyProfileBirthDateModule_flits_select_arrow__RqtW5",flits_textarea:"MyProfileBirthDateModule_flits_textarea__gA98h",flits_mx_10:"MyProfileBirthDateModule_flits_mx_10__BG+Dz",flits_select_edit:"MyProfileBirthDateModule_flits_select_edit__FHJ7X"};var m=t(2142);const f=e=>{var l,t,i,o,a,s,u,d,_,r,f,v;return n().createElement("div",{className:c.flits_dob_wrap},n().createElement("div",{className:"".concat(c.flits_select_row," ").concat(c.flits_dd_select," ").concat(null!=e&&e.edit?c.flits_select_edit:"")},n().createElement("select",{className:c.flits_input,disabled:null==e?void 0:e.disabled,defaultValue:null==e||null===(l=e.value)||void 0===l?void 0:l.day,onChange:l=>{const t=l.target.value;e.onValueChange({...null==e?void 0:e.value,day:t})},value:(null==e||null===(t=e.value)||void 0===t?void 0:t.length)>0&&new Date(null==e?void 0:e.value).getDate()||(null==e||null===(i=e.value)||void 0===i?void 0:i.day),name:null==e?void 0:e.name},n().createElement("option",{value:"DD",disabled:!0},"DD"),function(e,l){const t=[];for(let e=1;e<=31;e++)e=e<10?"0"+e:e,t.push(n().createElement("option",{key:e,value:e},e));return t}()),(null==e?void 0:e.edit)&&n().createElement("div",{className:c.flits_select_arrow},n().createElement(m.E,{svgString:null===(o=window)||void 0===o||null===(o=o.DuoIcon)||void 0===o?void 0:o.Select}))),n().createElement("div",{className:"".concat(c.flits_select_row," ").concat(c.flits_mm_select," ").concat(c.flits_mx_10," ").concat(null!=e&&e.edit?c.flits_select_edit:"")},n().createElement("select",{value:(null==e||null===(a=e.value)||void 0===a?void 0:a.length)>0&&new Date(null==e?void 0:e.value).getMonth()+1||(null==e||null===(s=e.value)||void 0===s?void 0:s.month),onChange:l=>{const t=l.target.value;e.onValueChange({...null==e?void 0:e.value,month:t})},className:c.flits_input,disabled:null==e?void 0:e.disabled,name:null==e?void 0:e.name,defaultValue:null==e||null===(u=e.value)||void 0===u?void 0:u.month},n().createElement("option",{value:"MM",disabled:!0},"MM"),function(e,l){const t=[];for(let e=1;e<=12;e++)e=e<10?"0"+e:e,t.push(n().createElement("option",{key:e,value:e},e));return t}()),(null==e?void 0:e.edit)&&n().createElement("div",{className:c.flits_select_arrow},n().createElement(m.E,{svgString:null===(d=window)||void 0===d||null===(d=d.DuoIcon)||void 0===d?void 0:d.Select}))),n().createElement("div",{className:"".concat(c.flits_select_row," ").concat(c.flits_yy_select)},n().createElement("select",{className:c.flits_input,disabled:null==e?void 0:e.disabled,defaultValue:null==e||null===(_=e.value)||void 0===_?void 0:_.year,onChange:l=>{const t=l.target.value;e.onValueChange({...null==e?void 0:e.value,year:t})},value:(null==e||null===(r=e.value)||void 0===r?void 0:r.length)>0&&new Date(null==e?void 0:e.value).getFullYear()||(null==e||null===(f=e.value)||void 0===f?void 0:f.year),name:null==e?void 0:e.name},n().createElement("option",{value:"YYYY",disabled:!0},"YYYY"),function(e,l){const t=[];for(let e=1920;e<=l;e++)e=e<10?"0"+e:e,t.push(n().createElement("option",{key:e,value:e},e));return t}(0,(new Date).getFullYear())),(null==e?void 0:e.edit)&&n().createElement("div",{className:c.flits_select_arrow},n().createElement(m.E,{svgString:null===(v=window)||void 0===v||null===(v=v.DuoIcon)||void 0===v?void 0:v.Select}))))},v=e=>n().createElement("div",{className:"".concat("MyProfileRowModule_flits_col_md_6__+DJDX"," ").concat("MyProfileRowModule_flits_col_sm_6__E-zyo"," ").concat(null!=e&&e.notNeedMB?"":"MyProfileRowModule_flits_mb_15__jahrV"," ").concat(null!=e&&e.needmt?"MyProfileRowModule_flits_mt_15__YMa-Y":"")},n().createElement("div",{className:"MyProfileRowModule_flits_input_wrap__86eGZ"},e.children)),p={flits_row:"MyProfileSaveButtonModule_flits_row__Q2W+K",flits_text_center:"MyProfileSaveButtonModule_flits_text_center__UuMen",flits_col_md_12:"MyProfileSaveButtonModule_flits_col_md_12__d-Kf+",flits_mt_30:"MyProfileSaveButtonModule_flits_mt_30__NH4SB",flits_button:"MyProfileSaveButtonModule_flits_button__pe9y2",flits_primary_btn:"MyProfileSaveButtonModule_flits_primary_btn__Mu5IB",flits_profile_save_button:"MyProfileSaveButtonModule_flits_profile_save_button__EuG7r",flits_pb_15:"MyProfileSaveButtonModule_flits_pb_15__bcsZB",flits_px_0:"MyProfileSaveButtonModule_flits_px_0__R6FIJ"},M=e=>n().createElement("div",{className:p.flits_edit_form_btn_grp},n().createElement("div",{className:"".concat(p.flits_row," ").concat(p.flits_text_center)},n().createElement("div",{className:"".concat(p.flits_col_md_12," ").concat(p.flits_mt_30," ").concat(p.flits_pb_15," ").concat(p.flits_px_0)},n().createElement("button",{name:null==e?void 0:e.name,onClick:()=>{null==e||e.onClickEvent()},type:null==e?void 0:e.type,className:"".concat(p.flits_button," ").concat(p.flits_primary_btn," ").concat(p.flits_profile_save_button)},null==e?void 0:e.label)))),y={flits_button_float:"MyProfileEditButtonModule_flits_button_float__c4MWQ",flits_button_icon:"MyProfileEditButtonModule_flits_button_icon__qb72s"},g=e=>{var l;return n().createElement("div",{className:y.flits_button_float,onClick:()=>{null==e||e.onClickEvent()}},n().createElement("div",{className:"".concat(y.flits_button_icon," ").concat(y.flits_edit_button)},n().createElement(m.E,{svgString:null===(l=window)||void 0===l||null===(l=l.DuoIcon)||void 0===l?void 0:l.ProfileEdit})))},E={flits_button_float:"MyProfileCancelButtonModule_flits_button_float__WtoiG",flits_button_icon:"MyProfileCancelButtonModule_flits_button_icon__KxfZM"},h=e=>{var l;return n().createElement("div",{className:E.flits_button_float,onClick:()=>{null==e||e.onClickEvent()}},n().createElement("div",{className:"".concat(E.flits_button_icon," ").concat(E.flits_cancel_button)},n().createElement(m.E,{svgString:null===(l=window)||void 0===l||null===(l=l.DuoIcon)||void 0===l?void 0:l.ProfileCancel})))};var C=t(9621),w=t(8059),b=t(2412);const P=e=>{let{message:l,open:t,bg:i}=e;const[a,s]=(0,o.useState)(t||!1);return n().createElement(C.A,{anchorOrigin:{horizontal:"center",vertical:"bottom"},open:a,message:l,autoHideDuration:1e4,onClose:()=>s(!1),TransitionComponent:b.A},n().createElement(w.A,{style:{fontSize:"14px",backgroundColor:i||"black",color:"white",width:"288px",padding:"18px 24px",fontWeight:"600"}},l))},N=e=>{var l,t,i;return n().createElement("input",{type:null==e?void 0:e.type,className:"".concat("MyProfileInputModule_flits_input__J+HGJ"," ").concat(null!=e&&e.edit?"MyProfileInputModule_flits_mobile_edit__bwrmM":""),placeholder:null!==(l=null==e?void 0:e.placeholder)&&void 0!==l?l:"",name:null!==(t=null==e?void 0:e.name)&&void 0!==t?t:"",value:null==e?void 0:e.value,onChange:l=>{e.onValueChange(l.target.value)},disabled:null==e?void 0:e.disabled,readOnly:null!==(i=null==e?void 0:e.readOnly)&&void 0!==i&&i})},F=e=>{let{message:l,open:t}=e;const[i,a]=(0,o.useState)(t||!1);return n().createElement(C.A,{anchorOrigin:{horizontal:"center",vertical:"bottom"},open:i,message:l,autoHideDuration:1e4,onClose:()=>a(!1),TransitionComponent:b.A},n().createElement(w.A,{style:{fontSize:"14px",backgroundColor:"red",color:"white",width:"288px",padding:"18px 24px",fontWeight:"600"}},l))},x={flits_input:"MyProfileCustomTextFieldModule_flits_input__FlVba",customer_custom_field_required_error_message:"MyProfileCustomTextFieldModule_customer_custom_field_required_error_message__+38Vx",customer_custom_field_description:"MyProfileCustomTextFieldModule_customer_custom_field_description__Px-iD",customer_custom_field_description_icon:"MyProfileCustomTextFieldModule_customer_custom_field_description_icon__f6Jlp",customer_custom_field_description_text:"MyProfileCustomTextFieldModule_customer_custom_field_description_text__xnM1S",flits_textarea:"MyProfileCustomTextFieldModule_flits_textarea__DFBDd",flits_text_wrapper:"MyProfileCustomTextFieldModule_flits_text_wrapper__oy6Vv"},S=e=>{var l,t,i,o,a;return n().createElement("div",{className:x.flits_text_wrapper},n().createElement("input",{type:null==e?void 0:e.type,"data-unique-id":null==e?void 0:e.name,className:" flits-input-height-selector ".concat(x.flits_input," ").concat(x.customer_custom_field_value_input),placeholder:null!==(l=null==e?void 0:e.placeholder)&&void 0!==l?l:"",name:null!==(t=null==e?void 0:e.name)&&void 0!==t?t:"",value:null==e?void 0:e.value,onChange:l=>{const t=l.target.value.replace(/[^a-zA-Z ]/g,"");e.onValueChange(t)},disabled:null==e?void 0:e.disabled,readOnly:null!==(i=null==e?void 0:e.readOnly)&&void 0!==i&&i}),(null==e?void 0:e.required_message)&&n().createElement("p",{"data-unique-id":null==e?void 0:e.name,className:"".concat(x.customer_custom_field_required_error_message," ").concat(x.text_danger," flits-custom-field-error-message")},null==e?void 0:e.error),(null==e?void 0:e.description)&&(null==e||null===(o=e.description)||void 0===o?void 0:o.length)>0&&n().createElement("div",{className:x.customer_custom_field_description},n().createElement("div",{className:"".concat(x.customer_custom_field_description_icon)},n().createElement(m.E,{svgString:null===(a=window)||void 0===a||null===(a=a.DuoIcon)||void 0===a?void 0:a.Description}))," ",n().createElement("span",{"data-unique-id":null==e?void 0:e.name,className:"".concat(x.customer_custom_field_description_text," flits-custom-field-description ")},null==e?void 0:e.description)))},D={flits_dob_wrap:"MyProfileCustomDateFieldModule_flits_dob_wrap__wdISI",flits_select_row:"MyProfileCustomDateFieldModule_flits_select_row__D5XXH",flits_input:"MyProfileCustomDateFieldModule_flits_input__51LXW",flits_select_arrow:"MyProfileCustomDateFieldModule_flits_select_arrow__aspU6",flits_mm_select:"MyProfileCustomDateFieldModule_flits_mm_select__CQVCL",flits_dd_select:"MyProfileCustomDateFieldModule_flits_dd_select__FlTvC",flits_mx_10:"MyProfileCustomDateFieldModule_flits_mx_10__d5HeM",customer_custom_field_required_error_message:"MyProfileCustomDateFieldModule_customer_custom_field_required_error_message__DLrK0",flits_datewrap:"MyProfileCustomDateFieldModule_flits_datewrap__EjgSg",customer_custom_field_description:"MyProfileCustomDateFieldModule_customer_custom_field_description__qvNx9",customer_custom_field_description_icon:"MyProfileCustomDateFieldModule_customer_custom_field_description_icon__gyCTE",customer_custom_field_description_text:"MyProfileCustomDateFieldModule_customer_custom_field_description_text__2setf",flits_select_edit:"MyProfileCustomDateFieldModule_flits_select_edit__V-M7X",flits_textarea:"MyProfileCustomDateFieldModule_flits_textarea__y4FJx"},q=e=>{var l,t,i,o,a,s,u,d,_,r,c;return n().createElement("div",{className:D.flits_datewrap},n().createElement("div",{className:D.flits_dob_wrap},n().createElement("div",{className:"".concat(D.flits_select_row," ").concat(D.flits_dd_select," ").concat(null!=e&&e.edit?D.flits_select_edit:"")},n().createElement("select",{disabled:null==e?void 0:e.disabled,name:"".concat(null==e?void 0:e.name,"[day]"),"data-unique-id":null==e?void 0:e.name,value:null!==(l=null==e||null===(t=e.value)||void 0===t?void 0:t.day)&&void 0!==l?l:null,required:"required",className:"flits-input-height-selector ".concat(D.flits_input," ").concat(D.day," ").concat(D.customer_custom_field_value_input),onChange:l=>{var t,i;const o=l.target.value;e.onValueChange({year:null==e||null===(t=e.value)||void 0===t?void 0:t.year,month:null==e||null===(i=e.value)||void 0===i?void 0:i.month,day:o})}},n().createElement("option",{value:"DD",disabled:!0},"DD"),function(e,l){const t=[];for(let e=1;e<=31;e++)e=e<10?"0"+e:e,t.push(n().createElement("option",{key:e,value:e},e));return t}()),(null==e?void 0:e.edit)&&n().createElement("div",{className:D.flits_select_arrow},n().createElement(m.E,{svgString:null===(i=window)||void 0===i||null===(i=i.DuoIcon)||void 0===i?void 0:i.Select}))),n().createElement("div",{className:"".concat(D.flits_select_row," ").concat(D.flits_mm_select," ").concat(D.flits_mx_10," ").concat(null!=e&&e.edit?D.flits_select_edit:"")},n().createElement("select",{disabled:null==e?void 0:e.disabled,name:"".concat(null==e?void 0:e.name,"[month]"),value:null!==(o=null==e||null===(a=e.value)||void 0===a?void 0:a.month)&&void 0!==o?o:null,required:"required",className:"".concat(D.flits_input," ").concat(D.month," ").concat(D.customer_custom_field_value_input),onChange:l=>{var t,i;const o=l.target.value;e.onValueChange({year:null==e||null===(t=e.value)||void 0===t?void 0:t.year,month:o,day:null==e||null===(i=e.value)||void 0===i?void 0:i.day})}},n().createElement("option",{value:"MM",disabled:!0},"MM"),function(e,l){const t=[];for(let e=1;e<=12;e++)e=e<10?"0"+e:e,t.push(n().createElement("option",{key:e,value:e},e));return t}()),(null==e?void 0:e.edit)&&n().createElement("div",{className:D.flits_select_arrow},n().createElement(m.E,{svgString:null===(s=window)||void 0===s||null===(s=s.DuoIcon)||void 0===s?void 0:s.Select}))),n().createElement("div",{className:"".concat(D.flits_select_row," ").concat(D.flits_yy_select)},n().createElement("select",{disabled:null==e?void 0:e.disabled,name:"".concat(null==e?void 0:e.name,"[year]"),required:"required",value:null!==(u=null==e||null===(d=e.value)||void 0===d?void 0:d.year)&&void 0!==u?u:null,className:"".concat(D.flits_input," ").concat(D.year," ").concat(D.customer_custom_field_value_input),onChange:l=>{var t,i;const o=l.target.value;e.onValueChange({year:o,month:null==e||null===(t=e.value)||void 0===t?void 0:t.month,day:null==e||null===(i=e.value)||void 0===i?void 0:i.day})}},n().createElement("option",{value:"YYYY",disabled:!0},"YYYY"),function(e,l){const t=[];for(let e=1920;e<=l;e++)e=e<10?"0"+e:e,t.push(n().createElement("option",{key:e,value:e},e));return t}(0,(new Date).getFullYear())),(null==e?void 0:e.edit)&&n().createElement("div",{className:D.flits_select_arrow},n().createElement(m.E,{svgString:null===(_=window)||void 0===_||null===(_=_.DuoIcon)||void 0===_?void 0:_.Select})))),(null==e?void 0:e.required_message)&&n().createElement("p",{"data-unique-id":null==e?void 0:e.name,className:"".concat(D.customer_custom_field_required_error_message," ").concat(D.text_danger," flits-custom-field-error-message")},null==e?void 0:e.error),(null==e?void 0:e.description)&&(null==e||null===(r=e.description)||void 0===r?void 0:r.length)>0&&n().createElement("div",{className:D.customer_custom_field_description},n().createElement("div",{className:"".concat(D.customer_custom_field_description_icon)},n().createElement(m.E,{svgString:null===(c=window)||void 0===c||null===(c=c.DuoIcon)||void 0===c?void 0:c.Description}))," ",n().createElement("span",{"data-unique-id":null==e?void 0:e.name,className:"".concat(D.customer_custom_field_description_text," flits-custom-field-description")},null==e?void 0:e.description)))},k={flits_input:"MyProfileCustomAlphaNumericFieldModule_flits_input__umROc",customer_custom_field_required_error_message:"MyProfileCustomAlphaNumericFieldModule_customer_custom_field_required_error_message__shtgf",customer_custom_field_description:"MyProfileCustomAlphaNumericFieldModule_customer_custom_field_description__lIRSJ",customer_custom_field_description_icon:"MyProfileCustomAlphaNumericFieldModule_customer_custom_field_description_icon__cZuJP",customer_custom_field_description_text:"MyProfileCustomAlphaNumericFieldModule_customer_custom_field_description_text__1l+IC",flits_textarea:"MyProfileCustomAlphaNumericFieldModule_flits_textarea__VTJhb",flits_alphaNumberic_wrapper:"MyProfileCustomAlphaNumericFieldModule_flits_alphaNumberic_wrapper__67kSY"},I=e=>{var l,t,i,o,a;return n().createElement("div",{className:k.flits_alphaNumberic_wrapper},n().createElement("input",{type:null==e?void 0:e.type,"data-unique-id":null==e?void 0:e.name,className:"".concat(k.flits_input," ").concat(k.customer_custom_field_value_input," flits-input-height-selector"),placeholder:null!==(l=null==e?void 0:e.placeholder)&&void 0!==l?l:"",name:null!==(t=null==e?void 0:e.name)&&void 0!==t?t:"",value:null==e?void 0:e.value,onChange:l=>{e.onValueChange(l.target.value)},disabled:null==e?void 0:e.disabled,readOnly:null!==(i=null==e?void 0:e.readOnly)&&void 0!==i&&i}),(null==e?void 0:e.required_message)&&void 0!==(null==e?void 0:e.required_message)&&n().createElement("p",{"data-unique-id":null==e?void 0:e.name,className:"".concat(k.customer_custom_field_required_error_message," ").concat(k.text_danger," flits-custom-field-error-message")},null==e?void 0:e.error),(null==e?void 0:e.description)&&(null==e||null===(o=e.description)||void 0===o?void 0:o.length)>0&&n().createElement("div",{className:k.customer_custom_field_description},n().createElement("div",{className:"".concat(k.customer_custom_field_description_icon)},n().createElement(m.E,{svgString:null===(a=window)||void 0===a||null===(a=a.DuoIcon)||void 0===a?void 0:a.Description}))," ",n().createElement("span",{"data-unique-id":null==e?void 0:e.name,className:"".concat(k.customer_custom_field_description_text," flits-custom-field-description ")},null==e?void 0:e.description)))},B={flits_dob_wrap:"MyProfileCustomTimeFieldModule_flits_dob_wrap__bj2BE",flits_select_row:"MyProfileCustomTimeFieldModule_flits_select_row__7gkiO",flits_input:"MyProfileCustomTimeFieldModule_flits_input__YiLhn",flits_select_arrow:"MyProfileCustomTimeFieldModule_flits_select_arrow__AlLEi",flits_mm_select:"MyProfileCustomTimeFieldModule_flits_mm_select__tHsEj",flits_dd_select:"MyProfileCustomTimeFieldModule_flits_dd_select__-+ST1",flits_mx_10:"MyProfileCustomTimeFieldModule_flits_mx_10__7UYQN",customer_custom_field_required_error_message:"MyProfileCustomTimeFieldModule_customer_custom_field_required_error_message__Wrlgs",customer_custom_field_description:"MyProfileCustomTimeFieldModule_customer_custom_field_description__zcMYc",flits_timewrap:"MyProfileCustomTimeFieldModule_flits_timewrap__6lD9E",customer_custom_field_description_icon:"MyProfileCustomTimeFieldModule_customer_custom_field_description_icon__Jexk4",customer_custom_field_description_text:"MyProfileCustomTimeFieldModule_customer_custom_field_description_text__YoU7y",flits_select_edit:"MyProfileCustomTimeFieldModule_flits_select_edit__DKJGQ",flits_textarea:"MyProfileCustomTimeFieldModule_flits_textarea__RjH43"},T=e=>{var l,t,i,o;return n().createElement("div",{className:B.flits_timewrap},n().createElement("div",{className:B.flits_dob_wrap},n().createElement("div",{className:"".concat(B.flits_select_row," ").concat(B.flits_dd_select," ").concat(e.edit?B.flits_select_edit:"")},n().createElement("select",{disabled:null==e?void 0:e.disabled,value:e.value.hour,"data-unique-id":null==e?void 0:e.name,name:"".concat(null==e?void 0:e.name,"[hour]"),required:"required",className:"".concat(B.flits_input," flits-input-height-selector ").concat(B.hour," ").concat(B.customer_custom_field_value_input),onChange:l=>{var t;const i=l.target.value;e.onValueChange({hour:i,minute:null==e||null===(t=e.value)||void 0===t?void 0:t.minute})}},n().createElement("option",{value:"HH",disabled:!0},"HH"),function(e,l){const t=[];for(let e=0;e<=23;e++)e=e<10?"0"+e:e,t.push(n().createElement("option",{key:e,value:e},e));return t}()),(null==e?void 0:e.edit)&&n().createElement("div",{className:B.flits_select_arrow},n().createElement(m.E,{svgString:null===(l=window)||void 0===l||null===(l=l.DuoIcon)||void 0===l?void 0:l.Select}))),n().createElement("div",{className:"".concat(B.flits_select_row," ").concat(B.flits_mm_select," ").concat(B.flits_mx_10)},n().createElement("select",{disabled:null==e?void 0:e.disabled,name:"".concat(null==e?void 0:e.name,"[minute]"),value:e.value.minute,required:"required",className:"".concat(B.flits_input," ").concat(B.minute," ").concat(B.customer_custom_field_value_input),onChange:l=>{var t;const i=l.target.value;e.onValueChange({hour:null==e||null===(t=e.value)||void 0===t?void 0:t.hour,minute:i})}},n().createElement("option",{value:"MM",disabled:!0},"MM"),function(e,l){const t=[];for(let e=0;e<=59;e++)e=e<10?"0"+e:e,t.push(n().createElement("option",{key:e,value:e},e));return t}()),(null==e?void 0:e.edit)&&n().createElement("div",{className:B.flits_select_arrow},n().createElement(m.E,{svgString:null===(t=window)||void 0===t||null===(t=t.DuoIcon)||void 0===t?void 0:t.Select})))),(null==e?void 0:e.required_message)&&n().createElement("p",{"data-unique-id":null==e?void 0:e.name,className:"".concat(B.customer_custom_field_required_error_message," ").concat(B.text_danger," flits-custom-field-error-message")},null==e?void 0:e.error),(null==e?void 0:e.description)&&(null==e||null===(i=e.description)||void 0===i?void 0:i.length)>0&&n().createElement("div",{className:B.customer_custom_field_description},n().createElement("div",{className:"".concat(B.customer_custom_field_description_icon)},n().createElement(m.E,{svgString:null===(o=window)||void 0===o||null===(o=o.DuoIcon)||void 0===o?void 0:o.Description}))," ",n().createElement("span",{"data-unique-id":null==e?void 0:e.name,className:"".concat(B.customer_custom_field_description_text," flits-custom-field-description ")},null==e?void 0:e.description)))},V=e=>{const{index:l}=e;return n().createElement("div",{className:"".concat("MyProfileCustomRowModule_flits_row__l0EjW"," ").concat("MyProfileCustomRowModule_customer_custom_field_row__7Yi9i")},n().createElement("div",{className:"".concat("MyProfileCustomRowModule_flits_col_md_6__3eUJE"," ").concat("MyProfileCustomRowModule_flits_col_sm_6__hw8aA"," ")},n().createElement("div",{id:l,"data-unique-id":l,"set-height-mobile":l,className:"".concat("MyProfileCustomRowModule_flits_input_wrap__sxRKZ"," flits-input-wrap")},e.children)))},A={flits_textara:"MyProfileCustomMultiLineFieldModule_flits_textara__0hf7S",customer_custom_field_required_error_message:"MyProfileCustomMultiLineFieldModule_customer_custom_field_required_error_message__TEr3W",customer_custom_field_value_input:"MyProfileCustomMultiLineFieldModule_customer_custom_field_value_input__VhCna",customer_custom_field_description:"MyProfileCustomMultiLineFieldModule_customer_custom_field_description__JBqTZ",customer_custom_field_description_icon:"MyProfileCustomMultiLineFieldModule_customer_custom_field_description_icon__ZixEw",customer_custom_field_description_text:"MyProfileCustomMultiLineFieldModule_customer_custom_field_description_text__uyHe9",flits_input:"MyProfileCustomMultiLineFieldModule_flits_input__Su23o",flits_multiline_wrapper:"MyProfileCustomMultiLineFieldModule_flits_multiline_wrapper__bwEz-"},L=e=>{var l,t,i,o,a;return n().createElement("div",{className:A.flits_multiline_wrapper},n().createElement("textarea",{type:null==e?void 0:e.type,className:"".concat(A.flits_textara," flits-input-height-selector ").concat(A.flits_input," ").concat(A.customer_custom_field_value_input),"data-unique-id":null==e?void 0:e.name,placeholder:null!==(l=null==e?void 0:e.placeholder)&&void 0!==l?l:"",name:null!==(t=null==e?void 0:e.name)&&void 0!==t?t:"",value:null==e?void 0:e.value,rows:3,onChange:l=>{e.onValueChange(l.target.value)},disabled:null==e?void 0:e.disabled,readOnly:null!==(i=null==e?void 0:e.readOnly)&&void 0!==i&&i}),(null==e?void 0:e.required_message)&&n().createElement("p",{className:"".concat(A.customer_custom_field_required_error_message," ").concat(A.text_danger," flits-custom-field-error-message"),"data-unique-id":null==e?void 0:e.name},null==e?void 0:e.error),(null==e?void 0:e.description)&&(null==e||null===(o=e.description)||void 0===o?void 0:o.length)>0&&n().createElement("div",{className:A.customer_custom_field_description},n().createElement("div",{className:"".concat(A.customer_custom_field_description_icon)},n().createElement(m.E,{svgString:null===(a=window)||void 0===a||null===(a=a.DuoIcon)||void 0===a?void 0:a.Description}))," ",n().createElement("span",{"data-unique-id":null==e?void 0:e.name,className:"".concat(A.customer_custom_field_description_text," flits-custom-field-description ")},null==e?void 0:e.description)))};var Y=t(8330),O=t(8286),R=t(7167);const W=e=>{var l,t,i,a,s,u;const d=(0,O.w)(null==e?void 0:e.value),[_,r]=(0,o.useState)(null!==(l=d.phone)&&void 0!==l?l:null),[c,m]=(0,o.useState)(null),f=(0,Y.useDispatch)(),v=window.profileState("setContact"),p=(0,o.useCallback)((e=>{m(e),f(v("".concat(e).concat(_)))}),[v,f,_]);return n().createElement(n().Fragment,null,n().createElement("input",{type:null==e?void 0:e.type,className:"".concat("MyProfileContactInputEditModeModule_flits_input__6x27Y"," ").concat("MyProfileContactInputEditModeModule_flits_input_edit_mode__FFD0U"),placeholder:null!==(t=null==e?void 0:e.placeholder)&&void 0!==t?t:"",name:null!==(i=null==e?void 0:e.name)&&void 0!==i?i:"",value:_,onChange:e=>(e=>{const l=e.target.value.replace(/[^0-9]/g,"");r(l),f(v("".concat(c).concat(l)))})(e),disabled:null==e?void 0:e.disabled,readOnly:null!==(a=null==e?void 0:e.readOnly)&&void 0!==a&&a,style:{paddingLeft:"".concat(8*((null!==(s=null==c?void 0:c.length)&&void 0!==s?s:0)+2),"px")}}),n().createElement("input",{type:"text",className:"MyProfileContactInputEditModeModule_flits_country_code_textbox__PgC3-",value:c,disabled:null==e?void 0:e.edit,style:{width:"".concat(8*((null!==(u=null==c?void 0:c.length)&&void 0!==u?u:0)+2)+10,"px")}}),n().createElement(o.Suspense,{fallback:n().createElement(n().Fragment,null)},n().createElement(R.b,{optionValue:d,handleCountryChange:p})))},H=e=>{var l,t,i;return n().createElement(n().Fragment,null,n().createElement("input",{type:null==e?void 0:e.type,className:"".concat("MyProfileContactInputNormalModule_flits_input__zdrp9"),placeholder:null!==(l=null==e?void 0:e.placeholder)&&void 0!==l?l:"",name:null!==(t=null==e?void 0:e.name)&&void 0!==t?t:"",value:null==e?void 0:e.value,onChange:e=>{},disabled:null==e?void 0:e.disabled,readOnly:null!==(i=null==e?void 0:e.readOnly)&&void 0!==i&&i}))},G={flits_input:"MyProfileCustomNumberFieldModule_flits_input__iHsvA",customer_custom_field_required_error_message:"MyProfileCustomNumberFieldModule_customer_custom_field_required_error_message__k8iHL",customer_custom_field_description:"MyProfileCustomNumberFieldModule_customer_custom_field_description__K9RDy",customer_custom_field_description_icon:"MyProfileCustomNumberFieldModule_customer_custom_field_description_icon__-cinc",customer_custom_field_description_text:"MyProfileCustomNumberFieldModule_customer_custom_field_description_text__vQnyp",flits_textarea:"MyProfileCustomNumberFieldModule_flits_textarea__klnAI",flits_number_wrapper:"MyProfileCustomNumberFieldModule_flits_number_wrapper__Lx6xt"},j=e=>{var l,t,i,o,a;return n().createElement("div",{className:G.flits_number_wrapper},n().createElement("input",{type:null==e?void 0:e.type,"data-unique-id":null==e?void 0:e.name,className:"".concat(G.flits_input," flits-input-height-selector ").concat(G.customer_custom_field_value_input),placeholder:null!==(l=null==e?void 0:e.placeholder)&&void 0!==l?l:"",name:null!==(t=null==e?void 0:e.name)&&void 0!==t?t:"",value:null==e?void 0:e.value,onChange:l=>{const t=l.target.value.replace(/[^0-9]/g,"");e.onValueChange(t)},disabled:null==e?void 0:e.disabled,readOnly:null!==(i=null==e?void 0:e.readOnly)&&void 0!==i&&i}),(null==e?void 0:e.required_message)&&n().createElement("p",{"data-unique-id":null==e?void 0:e.name,className:"".concat(G.customer_custom_field_required_error_message," ").concat(G.text_danger," flits-custom-field-error-message")},null==e?void 0:e.error),(null==e?void 0:e.description)&&(null==e||null===(o=e.description)||void 0===o?void 0:o.length)>0&&n().createElement("div",{className:G.customer_custom_field_description},n().createElement("div",{className:"".concat(G.customer_custom_field_description_icon)},n().createElement(m.E,{svgString:null===(a=window)||void 0===a||null===(a=a.DuoIcon)||void 0===a?void 0:a.Description}))," ",n().createElement("span",{"data-unique-id":null==e?void 0:e.name,className:"".concat(G.customer_custom_field_description_text," flits-custom-field-description ")},null==e?void 0:e.description)))},z={custom_file_input:"MyProfileCustomFileFieldModule_custom_file_input__5fmPL",flits_input:"MyProfileCustomFileFieldModule_flits_input__OG89i",file_upload_button:"MyProfileCustomFileFieldModule_file_upload_button__R+DGF",customer_custom_field_required_error_message:"MyProfileCustomFileFieldModule_customer_custom_field_required_error_message__jjebd",file_name_label:"MyProfileCustomFileFieldModule_file_name_label__NSomY",customer_custom_field_file_view:"MyProfileCustomFileFieldModule_customer_custom_field_file_view__eQvaW",customer_custom_field_file_delete:"MyProfileCustomFileFieldModule_customer_custom_field_file_delete__u78cv",customer_custom_field_file_undo:"MyProfileCustomFileFieldModule_customer_custom_field_file_undo__htgPD",customer_custom_field_description:"MyProfileCustomFileFieldModule_customer_custom_field_description__XQUF6",customer_custom_field_description_icon:"MyProfileCustomFileFieldModule_customer_custom_field_description_icon__qzLKR",flits_full_wrap:"MyProfileCustomFileFieldModule_flits_full_wrap__4vLaH",customer_custom_field_description_text:"MyProfileCustomFileFieldModule_customer_custom_field_description_text__dFUTq",flits_file_input_edit_mode:"MyProfileCustomFileFieldModule_flits_file_input_edit_mode__nJr4+",custom_fields_loading:"MyProfileCustomFileFieldModule_custom_fields_loading__RL4W0",spinner:"MyProfileCustomFileFieldModule_spinner__AJgSh",flits_textarea:"MyProfileCustomFileFieldModule_flits_textarea__7JApC",flits_mobile:"MyProfileCustomFileFieldModule_flits_mobile__12CRE",flits_file_wrap:"MyProfileCustomFileFieldModule_flits_file_wrap__qYq6Q",flits_svg:"MyProfileCustomFileFieldModule_flits_svg__wubuP",flits_info_wrap:"MyProfileCustomFileFieldModule_flits_info_wrap__lMjMa",flits_error_description_wrap:"MyProfileCustomFileFieldModule_flits_error_description_wrap__B6uJb"},J=e=>{var l,t,i,a,s,d,_;const[r,c]=(0,o.useState)(!1),[f,v]=(0,o.useState)(""),[p,M]=(0,o.useState)(!1),[y,g]=(0,o.useState)(""),E=u.GlobalStore.Get(),h=E._globalActions.API[0].API,C=E._globalActions.Helpers[0].IsFileSizeValidationFailed,w=E._globalActions.Helpers[0].IsFileTypeValidation,b=E._globalActions.Helpers[0].useTranslationLanguage,{t:N}=b();return n().createElement("div",{className:z.flits_file_wrap},n().createElement("div",{className:z.flits_full_wrap},n().createElement("div",{className:"".concat(z.custom_file_input," ").concat(z.disabled," ").concat(null!=e&&e.edit?z.flits_mobile:"")},n().createElement("div",{className:z.flits_info_wrap},n().createElement("input",{type:null==e?void 0:e.type,className:"".concat(z.flits_input," flits-input-height-selector ").concat(z.customer_custom_field_value_input),title:"",accept:null==e?void 0:e.extension,name:null==e?void 0:e.name,onChange:l=>{let t=l.target.files[0];const i=C(t,null==e?void 0:e.fileSizeLimit),o=w(t,null==e?void 0:e.extension);o||(v(""),t=null,M(!0),g(N("flits.custom_fields.file_type_invalid_error_message","Please check file type and try again")),setTimeout((function(){M(!1),g("")}),2500)),o&&i&&(v(""),t=null,M(!0),g(N("flits.custom_fields.file_size_exceed_error_message","File size exceeds 1MB, please resize and upload")),setTimeout((function(){M(!1),g("")}),2500)),e.onValueChange(t)},"data-unique-id":null==e?void 0:e.name,required:null==e?void 0:e.required,readOnly:null==e?void 0:e.readOnly,disabled:null==e?void 0:e.disabled,value:f}),((""===(null==e?void 0:e.path)||!(null!=e&&e.path)||"delete"===(null==e?void 0:e.fileStatus))&&(null==e?void 0:e.edit)||(null==e||null===(l=e.path)||void 0===l?void 0:l.length)>0&&!(null!=e&&e.filename))&&n().createElement("span",{className:"".concat(z.file_upload_button)},null==e?void 0:e.title),n().createElement("span",{className:"".concat(z.file_name_label),"data-file-label":null==e?void 0:e.filename,"data-file-name":null==e?void 0:e.filename},(null!=e&&e.path||"uploaded"===(null==e?void 0:e.fileStatus))&&"delete"!==(null==e?void 0:e.fileStatus)&&null!=e&&e.filename?null==e?void 0:e.filename:null==e?void 0:e.placeholder),n().createElement("input",{type:"hidden",className:"".concat(z.customer_custom_field_value_input),readOnly:"",name:"file_status",value:""}))),n().createElement("div",{className:z.flits_svg},(null==e?void 0:e.path)&&"delete"!==(null==e?void 0:e.fileStatus)&&n().createElement("a",{className:"".concat(r?z.custom_fields_loading:""," ").concat(z.customer_custom_field_file_view),onClick:async()=>{c(!0);try{const l=await h.myprofile.get_url(null==e?void 0:e.path);window.open(l),c(!1)}catch(e){}},"data-file-path":null==e?void 0:e.path},r?n().createElement(m.E,{svgString:null===(t=window)||void 0===t||null===(t=t.DuoIcon)||void 0===t?void 0:t.Wheel}):n().createElement(m.E,{svgString:null===(i=window)||void 0===i||null===(i=i.DuoIcon)||void 0===i?void 0:i.ViewFile})),(null==e?void 0:e.path)&&(null==e?void 0:e.edit)&&"delete"!==e.fileStatus&&n().createElement("a",{className:z.customer_custom_field_file_delete,onClick:()=>{e.onValueDelete()}},n().createElement(m.E,{svgString:null===(a=window)||void 0===a||null===(a=a.DuoIcon)||void 0===a?void 0:a.Delete})),(null==e?void 0:e.path)&&(null==e?void 0:e.edit)&&"delete"===e.fileStatus&&n().createElement("a",{className:"".concat(z.customer_custom_field_file_undo),onClick:()=>{e.onValueUndo()}},n().createElement(m.E,{svgString:null===(s=window)||void 0===s||null===(s=s.DuoIcon)||void 0===s?void 0:s.Undo})))),n().createElement("div",{className:z.flits_error_description_wrap},(null==e?void 0:e.required_message)&&n().createElement("p",{"data-unique-id":null==e?void 0:e.name,className:"".concat(z.customer_custom_field_required_error_message," ").concat(z.text_danger," flits-custom-field-error-message")},null==e?void 0:e.error),(null==e?void 0:e.description)&&(null==e||null===(d=e.description)||void 0===d?void 0:d.length)>0&&n().createElement("div",{className:z.customer_custom_field_description},n().createElement("div",{className:"".concat(z.customer_custom_field_description_icon)},n().createElement(m.E,{svgString:null===(_=window)||void 0===_||null===(_=_.DuoIcon)||void 0===_?void 0:_.Description}))," ",n().createElement("span",{"data-unique-id":null==e?void 0:e.name,className:"".concat(z.customer_custom_field_description_text," flits-custom-field-description ")},null==e?void 0:e.description))),p&&n().createElement(o.Suspense,{fallback:n().createElement(n().Fragment,null)},n().createElement(P,{message:y,open:p,bg:"black"})))},U=e=>{var l;return n().createElement("label",{className:"".concat("MyProfileLabelModule_flits_input_label__nhx7O"," ").concat(null!=e&&e.edit?"MyProfileLabelModule_flits_mobile__dde+0":"")},null!==(l=null==e?void 0:e.label)&&void 0!==l?l:"")},Q=e=>null==e?void 0:e.children}}]);