PageSourceSearch

https://landlord-home.ephome.org/_next/static/chunks/pages/landlord/add-unit-79d0c671fa924075.js

js ephome.org collected 2026-10-09 03:22:51 UTC 43,587 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8040],{11964:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/landlord/add-unit",function(){return n(60635)}])},37637:function(e,t,n){"use strict";n.d(t,{Z:function(){return j}});var i=n(42454),r=n(29947),l=n(20132),a=n(37483),o=n(32568),d=n(58657),s=n(84819),c=n(74760),u=n(9461),p=n(3363),x=n(70363),m=n(70681),h=n(86828),A=n(11330);let v=(0,A.Z)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),O=(0,A.Z)("MuiListItemIcon",["root","alignItemsFlexStart"]),f=(0,A.Z)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);var b=n(4182);function g(e){return(0,b.ZP)("MuiMenuItem",e)}let I=(0,A.Z)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);var y=n(15311);let N=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],L=e=>{let{disabled:t,dense:n,divider:i,disableGutters:l,selected:a,classes:d}=e,s=(0,o.Z)({root:["root",n&&"dense",t&&"disabled",!l&&"gutters",i&&"divider",a&&"selected"]},g,d);return(0,r.Z)({},d,s)},R=(0,s.ZP)(x.Z,{shouldForwardProp:e=>(0,c.Z)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(e=>{let{theme:t,ownerState:n}=e;return(0,r.Z)({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.divider&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider),backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(I.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,d.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(I.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,d.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat(I.selected,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,d.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,d.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity)}},["&.".concat(I.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(I.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},["& + .".concat(v.root)]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},["& + .".concat(v.inset)]:{marginLeft:52},["& .".concat(f.root)]:{marginTop:0,marginBottom:0},["& .".concat(f.inset)]:{paddingLeft:36},["& .".concat(O.root)]:{minWidth:36}},!n.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},n.dense&&(0,r.Z)({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{["& .".concat(O.root," svg")]:{fontSize:"1.25rem"}}))});var j=l.forwardRef(function(e,t){let n;let o=(0,u.i)({props:e,name:"MuiMenuItem"}),{autoFocus:d=!1,component:s="li",dense:c=!1,divider:x=!1,disableGutters:A=!1,focusVisibleClassName:v,role:O="menuitem",tabIndex:f,className:b}=o,g=(0,i.Z)(o,N),I=l.useContext(p.Z),j=l.useMemo(()=>({dense:c||I.dense||!1,disableGutters:A}),[I.dense,c,A]),_=l.useRef(null);(0,m.Z)(()=>{d&&_.current&&_.current.focus()},[d]);let M=(0,r.Z)({},o,{dense:j.dense,divider:x,disableGutters:A}),T=L(o),D=(0,h.Z)(_,t);return o.disabled||(n=void 0!==f?f:-1),(0,y.jsx)(p.Z.Provider,{value:j,children:(0,y.jsx)(R,(0,r.Z)({ref:D,role:O,tabIndex:n,component:s,focusVisibleClassName:(0,a.Z)(T.focusVisible,v),className:(0,a.Z)(T.root,b)},g,{ownerState:M,classes:T}))})})},43708:function(e,t,n){"use strict";n.d(t,{Le:function(){return x},kr:function(){return m},P8:function(){return p},D0:function(){return h}});var i=n(43686),r=n(92114),l=n(73921),a=n(20743);let o=async e=>{let{data:t}=await a.o.get("Landlord/LandlordUnits/GetUnitsbyPropertyId/"+e);return t},d=async e=>{e.unitAminities=[...e.unitAmenitiesIndoor,...e.unitAmenitiesKitchen,...e.unitAmenitiesMaintenance,...e.unitAmenitiesOutdoor],e.isW9=!1;let{data:t}=await a.o.post("LandLord/LandLordUnits/SaveLandlordUnits",e);return t},s=async e=>{e.isW9=!1;let{data:t}=await a.o.post("LandLord/LandLordUnits/SaveLandlordUnits",e);return t},c=async(e,t,n)=>{let{data:i}=await a.o.put("LandLord/W9/update-rfta-w9?w9Id=".concat(e,"&IsCorrectionNeeded=").concat(t,"&rftaId=").concat(n));return i},u="units",p=e=>(0,i.a)([u,e],()=>o(e),{enabled:!!e&&-1!==e,onError:e=>console.log(e)}),x=e=>{let t=(0,r.NL)();return(0,l.D)({mutationFn:async e=>await d(e),onSuccess:n=>{t.invalidateQueries([u]),e&&e(n)}})},m=e=>{let t=(0,r.NL)();return(0,l.D)({mutationFn:async e=>await s(e),onSuccess:n=>
1{t.invalidateQueries([u]),e&&e(n.rowId)}})},h=(e,t)=>{let n=(0,r.NL)();return(0,l.D)({mutationFn:async e=>{let{w9Id:t,selectedValue:n,rftaId:i}=e;return await c(t,n,i)},onSuccess:async()=>{n.invalidateQueries([u]),e()},onError:async()=>{t()}})}},80064:function(e,t,n){"use strict";n.d(t,{I3:function(){return o},NE:function(){return d}});var i=n(11888),r=n(26662),l=n(9912);let a=l.Ry({landLordPropertiesId:l.Rx().min(1,(0,r.L)("COMMON:VALIDATION_REQUIRED")),unitNoName:l.Z_(),yearOfConstruction:l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")).max(4,(0,r.L)("COMMON:VALIDATION_MAX_LENGTH",{max:4})).regex(i.qC,(0,r.L)("COMMON:VALIDATION_NUMBER")),unitAreaSft:l.Rx({required_error:(0,r.L)("COMMON:VALIDATION_REQUIRED"),invalid_type_error:(0,r.L)("COMMON:VALIDATION_NUMBER")}).or(l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")).regex(i.qC,(0,r.L)("COMMON:VALIDATION_NUMBER"))).refine(e=>Number(e)>0,(0,r.L)("COMMON:VALIDATION_MIN",{min:0})),noOfBedRooms:l.Rx({required_error:(0,r.L)("COMMON:VALIDATION_REQUIRED"),invalid_type_error:(0,r.L)("COMMON:VALIDATION_NUMBER")}).or(l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")).regex(i.qC,(0,r.L)("COMMON:VALIDATION_NUMBER"))).refine(e=>Number(e)>0,(0,r.L)("COMMON:VALIDATION_MIN",{min:0})),noOfBathRooms:l.Rx({required_error:(0,r.L)("COMMON:VALIDATION_REQUIRED"),invalid_type_error:(0,r.L)("COMMON:VALIDATION_NUMBER")}).or(l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")).regex(i.qC,(0,r.L)("COMMON:VALIDATION_NUMBER"))).refine(e=>Number(e)>0,(0,r.L)("COMMON:VALIDATION_MIN",{min:0})),unitStructureTypeId:l.Rx().min(1,(0,r.L)("COMMON:VALIDATION_REQUIRED")),addr1:l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")),addr2:l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")),city:l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")),stateId:l.Rx(),zipcode:l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")).min(4,(0,r.L)("COMMON:VALIDATION_MIN_LENGTH",{min:4})).regex(i.qC,(0,r.L)("COMMON:VALIDATION_NUMBER")),state:l.Z_()}),o=l.Ry({landLordPropertiesId:l.Rx().min(1,(0,r.L)("COMMON:VALIDATION_REQUIRED")),unitNoName:l.Z_(),yearOfConstruction:l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")).max(4,(0,r.L)("COMMON:VALIDATION_MAX_LENGTH",{max:4})).regex(i.qC,(0,r.L)("COMMON:VALIDATION_NUMBER")),unitAreaSft:l.Rx({required_error:(0,r.L)("COMMON:VALIDATION_REQUIRED"),invalid_type_error:(0,r.L)("COMMON:VALIDATION_NUMBER")}).or(l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")).regex(i.qC,(0,r.L)("COMMON:VALIDATION_NUMBER"))).refine(e=>Number(e)>0,(0,r.L)("COMMON:VALIDATION_MIN",{min:0})),noOfBedRooms:l.Rx({required_error:(0,r.L)("COMMON:VALIDATION_REQUIRED"),invalid_type_error:(0,r.L)("COMMON:VALIDATION_NUMBER")}).or(l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")).regex(i.qC,(0,r.L)("COMMON:VALIDATION_NUMBER"))).refine(e=>Number(e)>0,(0,r.L)("COMMON:VALIDATION_MIN",{min:0})),noOfBathRooms:l.Rx({required_error:(0,r.L)("COMMON:VALIDATION_REQUIRED"),invalid_type_error:(0,r.L)("COMMON:VALIDATION_NUMBER")}).or(l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")).regex(i.qC,(0,r.L)("COMMON:VALIDATION_NUMBER"))).refine(e=>Number(e)>0,(0,r.L)("COMMON:VALIDATION_MIN",{min:0})),unitStructureTypeId:l.Rx().min(1,(0,r.L)("COMMON:VALIDATION_REQUIRED")),addr1:l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")),addr2:l.Z_(),city:l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")),stateId:l.Rx(),zipcode:l.Z_().nonempty((0,r.L)("COMMON:VALIDATION_REQUIRED")).min(4,(0,r.L)("COMMON:VALIDATION_MIN_LENGTH",{min:4})).regex(i.qC,(0,r.L)("COMMON:VALIDATION_NUMBER")),state:l.Z_()}),d=a.extend({unitUtility:l.IX(l.Ry({unitAttributeId:l.Rx(),unitAttributeTypeId:l.Rx().or(l.i0("")).optional(),isTenantPayee:l.i0("true").or(l.i0("false")).or(l.O7()).optional(),isSelected:l.O7()})),unitAppliance:l.IX(l.Ry({unitAttributeId:l.Rx(),isTenantPayee:l.i0("true").or(l.i0("false")).or(l.O7()).optional(),isSelected:l.O7()})),unitAminities:l.IX(l.Ry({unitAttributeId:l.Rx(),isSelected:l.O7()})),unitAmenitiesIndoor:l.IX(l.Ry({unitAttributeId:l.Rx(),isSelected:l.O7()})),unitAmenitiesKitchen:l.IX(l.Ry({unitAttributeId:l.Rx(),isSelected:l.O7()})),unitAmenitiesMaintenance:l.IX(l.Ry({unitAttributeId:l.Rx(),isSelected:l.O7()})),unitAmenitiesOutdoor:l.IX(l.Ry({unitAttributeId:l.Rx(),isSelected:l.O7()}))})},21236:function(e,t,n){"use strict";n.d(t,{g:function(){return a}});var i=n(43686),r=n(20743);let l=async()=>{let{data:e}
1=await r.o.get("LookUp/GetStates");return e},a=()=>(0,i.a)(["states"],()=>l(),{staleTime:1/0})},15957:function(e,t,n){"use strict";var i=n(15311);t.Z=e=>(0,i.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 8 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,i.jsx)("path",{d:"M5.9165 10.75L1.6665 6.5L5.9165 2.25",stroke:"#2F0B7C",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})})},38382:function(e,t,n){"use strict";var i=n(3247),r=n(15311),l=n(15957),a=n(58571),o=n(80185);function d(){let e=(0,i._)(["\n  border: none;\n  background: transparent;\n  cursor: pointer;\n  display: flex;\n  gap: 10px;\n  align-items: center;\n"]);return d=function(){return e},e}function s(){let e=(0,i._)(["\n  height: 48px;\n  display: flex;\n  align-items: center;\n  padding: 8px;\n"]);return s=function(){return e},e}n(20132);let c=(0,a.Z)("button")(d()),u=(0,a.Z)("div")(s());t.Z=e=>{let{onClick:t}=e;return(0,r.jsx)(u,{children:(0,r.jsxs)(c,{onClick:t,children:[(0,r.jsx)(l.Z,{}),(0,r.jsx)(o.Z,{variant:"subtitle1",component:"span",sx:{cursor:"pointer"},children:"Go back"})]})})}},64289:function(e,t,n){"use strict";var i=n(3247),r=n(15311),l=n(64344);function a(){let e=(0,i._)(["\n  width: 100%;\n  height: 100vh;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n"]);return a=function(){return e},e}let o=(0,n(84819).ZP)("div")(a());t.Z=function(){return(0,r.jsx)(o,{children:(0,r.jsx)(l.Z,{})})}},86192:function(e,t,n){"use strict";n.d(t,{h:function(){return x}});var i=n(15311),r=n(20132),l=n(21236),a=n(67914),o=n(54001),d=n(37637),s=n(25354),c=n(5724),u=n(39361),p=n(81215);function x(e){let{addressLine1:t,error:n,field:x,helperText:m,setValue:h,trigger:A,addressLine2:v,unit:O,cityFormName:f,fullAddress:b,customlabel:g,width:I,stateFormName:y,zipCodeFormName:N,addressRequired:L,starMark:R,disabled:j}=e,{data:_}=(0,l.g)(),{t:M}=(0,c.Z)(),T=(0,r.useRef)(null),D=()=>{T.current&&(T.current.blur(),T.current.focus())},E=(0,r.useCallback)(e=>{(0,u.NU)(e).then(n=>{var i,r;let l=n[0].address_components,a="",o="",d="",s="",c="",p="",x="";if(l.forEach(e=>{let t=e.types;t.includes("locality")?a=e.long_name:t.includes("administrative_area_level_1")?o=e.long_name:t.includes("postal_code")?d=e.long_name:t.includes("street_number")?s=e.long_name:t.includes("route")?c=e.long_name:t.includes("neighborhood")?p=e.long_name:t.includes("subpremise")&&(x=e.long_name)}),"District of Columbia"===o&&(o="Washington"),c&&s?h(t,"".concat(s," ").concat(c).concat(x&&!O?", ".concat(x):"")):h(t,e),A([t]),O&&(h(O,x),A(O)),v&&(h(v,p),A(v)),f&&(h(f,a),A(f)),y&&(null==_?void 0:null===(i=_.find(e=>e.state===o))||void 0===i?void 0:i.id)&&(h(y,null==_?void 0:null===(r=_.find(e=>e.state===o))||void 0===r?void 0:r.id),A(y)),b&&(h(b,"".concat(s," ").concat(c).concat(p?", ".concat(p):"").concat(x&&!O?", ".concat(x):"").concat(a?", ".concat(a):"")),A(b)),N)return h(N,d),A(N),D(),(0,u.WV)(n[0])}).catch(e=>console.error(M("COMMON:ERROR_API_GENERAL_REQUEST_FAILED"),e))},[t,v,f,h,y,b,_,M,A,O,N]);return(0,i.jsx)(u.ZP,{value:x.value,onChange:x.onChange,onSelect:E,searchOptions:{componentRestrictions:{country:"us"}},children:e=>{let{getInputProps:t,suggestions:l,getSuggestionItemProps:c}=e;return(0,i.jsx)(s.Z,{options:l,inputValue:x.value,componentsProps:{popupIndicator:{disableRipple:!0}},sx:{"& .MuiAutocomplete-inputRoot":{padding:"2px 4px 2px 6px"},"& .MuiButtonBase-root":{lineHeight:"0",padding:0,margin:0,height:"100%"},"& .MuiAutocomplete-endAdornment":{right:"0px !important",borderTopRightRadius:"16px",borderBottomRightRadius:"16px",backgroundColor:"primary.light",height:"100%"}},getOptionLabel:e=>e.description,popupIcon:(0,i.jsx)(o.ZP,{width:"40px",color:"secondary.dark",children:(0,i.jsx)(a.K5,{})}),renderInput:e=>(0,i.jsx)(p.Z,{...e,...t({variant:"outlined"}),inputProps:{...e.inputProps,autoComplete:"address-line1"},inputRef:T,customlabel:g||"",starMark:R||"",value:x.value,error:n,helperText:m,width:I,required:L,disabled:j}),renderOption:(e,t)=>(0,r.createElement)(d.Z,{...c(t),key:t.placeId,sx:{whiteSpace:"normal",wordWrap:"break-word"}},t.description)})}})}},33483:function(e,t,n){"use strict";var i=n(3247),r=n(15311),l=n(84819);function a(){let e=(0,i._)(["\n  width: 100%;\n  height: 2px;\n  background-color: ",";\n  margin-bottom: 25px;\n"]);return a=function(){return e},e}n(20132);let o=(0,l.ZP)("div")(a(),e=>{let{theme:t}=e;return t.palette.grey[300]});t.Z=()=>(0,r.jsx)(o,{})},11888:function(e,t,n){"use strict";n.d(t,{CU:function(){return i},_D:function(){return o},bn:function(){return r},qC:function(){return a},zU:function(){return l}});let i=/^[\w-\.+]+@([\w-]+\.)+[\w-]{2,4}$/,r=/^[a-zA-Z0-9_]*$/,l=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&#])[A-Za-z\d@$!#%*?&]{8,}$/,a=/^[+-]?\d+(\.\d+)?$/,o=/^[0-9]{10}$/},62025:function(e,t,n){"use strict";n.d(t,{u:function(){return a}});var i=n(33659),r=n(68102),l=n(20132);let a=()=>{let{data:e}=(0,i.v$)();(0,l.useEffect)(()=>
1{if(e){if("1"===e.locale){localStorage.setItem("lang","en"),(0,r.Z)("en");return}localStorage.setItem("lang","es"),(0,r.Z)("es")}},[e])}},69793:function(e,t,n){"use strict";n.d(t,{cE:function(){return u},cq:function(){return p},qn:function(){return x}});var i=n(3247),r=n(80185),l=n(84819);function a(){let e=(0,i._)(["\n  display: flex;\n  flex-direction: column;\n  gap: 15px;\n  margin: 15px 0 0px 0;\n\n  .selectionRow {\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n    flex-wrap: wrap;\n    gap: 20px;\n  }\n\n  "," {\n    .selectionRow {\n      flex-direction: column;\n      align-items: center;\n    }\n  }\n"]);return a=function(){return e},e}function o(){let e=(0,i._)(["\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  flex-wrap: wrap;\n  gap: 20px;\n\n  "," {\n    flex-direction: column;\n  }\n"]);return o=function(){return e},e}function d(){let e=(0,i._)(["\n  display: grid;\n  grid-template: 3fr;\n  margin-top: 20px;\n  width: 100%;\n  gap: 20px;\n\n  "," {\n    grid-template-columns: 1fr;\n    grid-auto-rows: auto;\n  }\n"]);return d=function(){return e},e}function s(){let e=(0,i._)(["\n  font-size: 27px;\n  font-weight: 500;\n  margin-top: 10px;\n  color: ",";\n"]);return s=function(){return e},e}function c(){let e=(0,i._)(["\n  font-size: 15px;\n  margin-bottom: 20px;\n  color: ",";\n"]);return c=function(){return e},e}let u=(0,l.ZP)("div")(a(),e=>{let{theme:t}=e;return t.breakpoints.down("md")});(0,l.ZP)("div")(o(),e=>{let{theme:t}=e;return t.breakpoints.down("md")}),(0,l.ZP)("div")(d(),e=>{let{theme:t}=e;return t.breakpoints.down("mobile")});let p=(0,l.ZP)(r.Z)(s(),e=>{let{theme:t}=e;return t.palette.secondary.dark}),x=(0,l.ZP)(r.Z)(c(),e=>{let{theme:t}=e;return t.palette.secondary.dark})},94102:function(e,t,n){"use strict";n.d(t,{AF:function(){return m},Ev:function(){return h},UT:function(){return p},Yk:function(){return x}});var i=n(3247),r=n(84819),l=n(39112),a=n(864),o=n(4825);function d(){let e=(0,i._)(["\n  background-color: ",";\n\n  th {\n    color: ",";\n    font-weight: 700;\n    font-size: 16px;\n    padding: 8px 16px;\n  }\n"]);return d=function(){return e},e}function s(){let e=(0,i._)(["\n  padding: 5px 16px;\n  font-size: 15px;\n  color: ",";\n  font-weight: 400;\n  border: none;\n  height: 34.5px;\n"]);return s=function(){return e},e}function c(){let e=(0,i._)(["\n  :nth-of-type(even) {\n    background-color: ",";\n    border-top: 1px solid #e8d7d7;\n  }\n"]);return c=function(){return e},e}function u(){let e=(0,i._)(["\n  :nth-of-type(even) {\n    background-color: ",";\n  }\n  display: flex;\n  justify-content: space-between;\n  width: 298px;\n"]);return u=function(){return e},e}let p=(0,r.ZP)(a.Z)(d(),e=>{let{theme:t}=e;return t.palette.primary.dark},e=>{let{theme:t}=e;return t.palette.primary.contrastText}),x=(0,r.ZP)(l.Z)(s(),e=>{let{theme:t}=e;return t.color.darkGray}),m=(0,r.ZP)(o.Z)(c(),e=>{let{theme:t}=e;return t.palette.primary.pale}),h=(0,r.ZP)(o.Z)(u(),e=>{let{theme:t}=e;return t.palette.primary.pale})},60635:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return $},default:function(){return J}});var i=n(15311),r=n(33659),l=n(64289),a=n(62025),o=n(23262),d=n(43708),s=n(88207),c=n(36809),u=n(54001),p=n(81217),x=n(28500),m=n(5762),h=n(8487),A=n(91054),v=n(3247),O=n(38239),f=n(80064),b=n(72155),g=n(57017),I=n(37637),y=n(64344),N=n(84819),L=n(20132),R=n(17723),j=n(69793),_=n(52691),M=n(36065),T=n(53560),D=n(96404),E=n(9338),Z=n(39112),C=n(36787),S=n(4825),U=n(94102),w=e=>{var t,n,r,l;let{control:a,watch:o}=e,{data:d}=(0,O.CO)(),{data:s}=(0,O.JA)(),{data:c}=(0,O.JN)(),{data:u,isLoading:p,isSuccess:m}=(0,O.tA)(),h=(0,L.useMemo)(()=>(s||[]).map((e,t)=>({unitAttributeid:e.id,isSelected:"unitUtility.".concat(t,".isSelected"),unitAttributeTypeId:"unitUtility.".concat(t,".unitAttributeTypeId"),isTenantPayee:"unitUtility.".concat(t,".isTenantPayee"),control:a,label:e.name})),[a,s]),A=(0,L.useMemo)(()=>[{id:"label",label:"Utility",minWidth:185,align:"left",render:e=>{let{label:t}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{style:{color:_.r.palette.error.main},children:"*"}),t]})}},{id:"available",label:"Available",minWidth:100,align:"center",render:e=>{let{isSelected:t,control:n}=e;return(0,i.jsx)(R.Qr,{name:t,control:n,defaultValue:!1,render:e=>{let{field:{value:t,...n}}=e;return(0,i.jsx)(b.x1,{checked:!!t,size:"small",...n})}})}},{id:"select",label:"Utility Type",minWidth:190,align:"center",render:e=>{let{unitAttributeTypeId:t,unitAttributeid:n,control:r}=e;return(0,i.jsxs)(i.Fragment,{children:[p&&(0,i.jsx)(b.RG,{size:"small",disabled:!0,defaultValue:""}),m&&u.filter(e=>e.llUnitUtilitiesID===n).length>0?(0,i.jsx)(R.Qr,{name:t,control:r,render:e=>{let{field:t}=e;return(0,i.jsxs)(b.RG,{size:"small",...t,value:void 0!==t.value?t.value:0,children:[(0,i.jsx)(I.Z,{value:0,children:"Select"}),u.filter(e=>e.llUnitUtilitiesID===n).map(e=>(0,i.jsx)(I.Z,{value:e.id,children:e.name},e.id))]})}}):null]})}},{id:"owner",label:(0,i.jsxs)("div",{style:{display:"flex"},children:[(0,i.jsx)("span",{style:{flex:"1"},children:(0,i.jsx)(x.Z,{i18nKey:"LANDLORD:RFTA_FORM_LABEL_OWNER"})}),(0,i.jsx)("span",{style:{flex:"1"},children:(0,i.jsx)(x.Z,{i18nKey:"LANDLORD:UNIT_TENANT"})})]}),minWidth:220,align:"center",render:e=>{let{isTenantPayee:t,control:n}=e;return(0,i.jsx)(R.Qr,{name:t,control:n,defaultValue:!1,render:e=>{let{field:t}=e;
1return(0,i.jsxs)(M.Z,{...t,sx:{display:"flex",flexDirection:"row"},itemType:"boolean",children:[(0,i.jsx)(T.Z,{sx:{display:"flex",flex:"1",margin:"0",justifyContent:"center"},value:!1,control:(0,i.jsx)(b.Pj,{size:"small"}),label:""}),(0,i.jsx)(T.Z,{sx:{display:"flex",flex:"1",margin:"0",justifyContent:"center"},value:!0,control:(0,i.jsx)(b.Pj,{size:"small"}),label:""})]})}})}}],[m,p,u]),v=(0,L.useMemo)(()=>(d||[]).map((e,t)=>({unitAttributeid:e.id,isSelected:"unitAppliance.".concat(t,".isSelected"),isTenantPayee:"unitAppliance.".concat(t,".isTenantPayee"),control:a,label:e.name})),[a,d]),f=(0,L.useMemo)(()=>[{id:"label",label:"Appliances",minWidth:185,align:"left",render:e=>{let{label:t}=e;return t}},{id:"available",label:"Available",minWidth:100,align:"center",render:e=>{let{isSelected:t,control:n}=e;return(0,i.jsx)(R.Qr,{name:t,control:n,defaultValue:!1,render:e=>{let{field:{value:t,...n}}=e;return(0,i.jsx)(b.x1,{size:"small",checked:!!t,...n})}})}},{id:"select",label:"",minWidth:190,align:"center",render:()=>null},{id:"owner",label:(0,i.jsxs)("div",{style:{display:"flex"},children:[(0,i.jsx)("span",{style:{flex:"1"},children:(0,i.jsx)(x.Z,{i18nKey:"LANDLORD:RFTA_FORM_LABEL_OWNER"})}),(0,i.jsx)("span",{style:{flex:"1"},children:(0,i.jsx)(x.Z,{i18nKey:"LANDLORD:UNIT_TENANT"})})]}),minWidth:220,align:"center",render:e=>{let{isTenantPayee:t,control:n}=e;return(0,i.jsx)(R.Qr,{name:t,control:n,defaultValue:!1,render:e=>{let{field:t}=e;return(0,i.jsxs)(M.Z,{...t,sx:{display:"flex",flexDirection:"row"},children:[(0,i.jsx)(T.Z,{sx:{display:"flex",flex:"1",margin:"0",justifyContent:"center"},value:!1,control:(0,i.jsx)(b.Pj,{size:"small"}),label:""}),(0,i.jsx)(T.Z,{sx:{display:"flex",flex:"1",margin:"0",justifyContent:"center"},value:!0,control:(0,i.jsx)(b.Pj,{size:"small"}),label:""})]})}})}}],[]),g=(0,L.useMemo)(()=>{var e;return((null==c?void 0:null===(e=c.data)||void 0===e?void 0:e.Indoor)||[]).map((e,t)=>({unitAttributeid:e.unitAttributeId,isSelected:"unitAmenitiesIndoor.".concat(t,".isSelected"),control:a,label:e.unitAttributeName}))},[a,null==c?void 0:null===(t=c.data)||void 0===t?void 0:t.Indoor]),y=(0,L.useMemo)(()=>{var e;return((null==c?void 0:null===(e=c.data)||void 0===e?void 0:e.Kitchen)||[]).map((e,t)=>({unitAttributeid:e.unitAttributeId,isSelected:"unitAmenitiesKitchen.".concat(t,".isSelected"),control:a,label:e.unitAttributeName}))},[a,null==c?void 0:null===(n=c.data)||void 0===n?void 0:n.Kitchen]),N=(0,L.useMemo)(()=>{var e;return((null==c?void 0:null===(e=c.data)||void 0===e?void 0:e.Maintenance)||[]).map((e,t)=>({unitAttributeid:e.unitAttributeId,isSelected:"unitAmenitiesMaintenance.".concat(t,".isSelected"),control:a,label:e.unitAttributeName}))},[a,null==c?void 0:null===(r=c.data)||void 0===r?void 0:r.Maintenance]),w=(0,L.useMemo)(()=>{var e;return((null==c?void 0:null===(e=c.data)||void 0===e?void 0:e.Outdoor)||[]).map((e,t)=>({unitAttributeid:e.unitAttributeId,isSelected:"unitAmenitiesOutdoor.".concat(t,".isSelected"),control:a,label:e.unitAttributeName}))},[a,null==c?void 0:null===(l=c.data)||void 0===l?void 0:l.Outdoor]),V=(0,L.useMemo)(()=>[{id:"label",label:"Amenities",minWidth:185,align:"left",render:e=>{let{label:t}=e;return t}},{id:"available",label:"Available",minWidth:100,align:"center",render:e=>{let{isSelected:t,control:n}=e;return(0,i.jsx)(R.Qr,{name:t,control:n,defaultValue:!1,render:e=>{let{field:{value:t,...n}}=e;return(0,i.jsx)(b.x1,{size:"small",checked:!!t,...n})}})}}],[]),k=Math.ceil(g.length/2),P=g.slice(0,k),B=g.slice(k),F=Math.ceil(y.length/2),W=y.slice(0,F),Q=y.slice(F),z=Math.ceil(N.length/2),Y=N.slice(0,z),q=N.slice(z);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(C.Z,{children:(0,i.jsxs)(D.Z,{sx:{minWidth:650},"aria-label":"uhit details table",children:[(0,i.jsx)(U.UT,{children:(0,i.jsx)(S.Z,{children:A.map(e=>(0,i.jsx)(Z.Z,{align:e.align,style:{minWidth:e.minWidth},children:e.label},e.id))})}),(0,i.jsx)(E.Z,{children:h.map(e=>(0,i.jsx)(U.AF,{children:A.map(t=>{let n=t.id,r="available"===n?"isSelected":"select"===n?"unitAttributeTypeId":"owner"===n?"isTenantPayee":"label"===n?"label":"",l="available"===n?e.isSelected:"select"===n?e.unitAttributeTypeId:"owner"===n?e.isTenantPayee:"label"===n?e.label:"",a=!e.isSelected||o(e.isSelected);return r&&l&&"select"!==n&&"owner"!==n||("select"===n||"owner"===n)&&a?(0,i.jsx)(U.Yk,{align:t.align,children:t.render&&t.render({[r]:l,control:e.control,unitAttributeid:e.unitAttributeid||0,show:e.isSelected&&o(e.isSelected)||void 0})},t.id):(0,i.jsx)(U.Yk,{align:t.align,children:"\xa0"},t.id)})},e.unitAttributeid))}),(0,i.jsx)(U.UT,{children:(0,i.jsx)(S.Z,{children:f.map(e=>(0,i.jsx)(Z.Z,{align:e.align,style:{minWidth:e.minWidth},children:e.label},e.id))})}),(0,i.jsx)(E.Z,{children:v.map(e=>(0,i.jsx)(U.AF,{children:f.map(t=>{let n=t.id,r="available"===n?"isSelected":"select"===n?"":"owner"===n?"isTenantPayee":"label"===n?"label":"",l="available"===n?e.isSelected:"select"===n?"":"owner"===n?e.isTenantPayee:"label"===n?e.label:"",a=!!e.isSelected&&o(e.isSelected);return r&&l&&"owner"!==n||"owner"===n&&a?(0,i.jsx)(U.Yk,{align:t.align,children:t.render&&t.render({[r]:l,control:e.control,show:e.isSelected&&o(e.isSelected)||void 0})},t.id):(0,i.jsx)(U.Yk,{align:t.align},t.id)})},e.unitAttributeid))})]})}),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(j.cq,{children:(0,i.jsx)(x.Z,{i18nKey:"LANDLORD:AMENITIES"})}),(0,i.jsx)("div",{children:(0,i.jsx)(j.cq,{style:{backgroundColor:"#270276",width:"100%",padding:"10px",color:"white",fontSize:"13px",fontWeight:700},children:"Indoor"})}),(0,i.jsx)(C.Z,{children:(0,i.jsx)(D.Z,{sx:{minWidth:650},"aria-label":"uhit details table",children:(0,i.jsx)(E.Z,{children:(0,i.jsxs)(S.Z,{children:[(0,i.jsx)(Z.Z,{colSpan:2,style:{borderBottom:"none"},children:(0,i.jsx)(D.Z,{children:(0,i.jsx)(E.Z,{children:P.map((e,t)=>(0,i.jsx)(U.Ev,{children:V.map(t=>{let n=t.id,r="available"===n?"isSelected":"label"===n?"label":"",l="available"===n?e.isSelected:"label"===n?e.label:"";return r&&l?(0,i.jsx)(U.Yk,{align:t.align,style:{padding:"5px 0px"},children:t.render&&t.render({[r]:l,control:e.control})},t.id):(0,i.jsx)(U.Yk,{align:t.align},t.id)})},t))})})}),(0,i.jsx)(Z.Z,{style:{borderBottom:"none",minWidth:0}}),(0,i.jsx)(Z.Z,{colSpan:2,style:{borderBottom:"none",padding:"0px"},children:(0,i.jsx)(D.Z,{children:(0,i.jsx)(E.Z,{children:B.map((e,t)=>(0,i.jsx)(U.Ev,{children:V.map(t=>{let n=t.id,r="available"===n?"isSelected":"select"===n?"":"owner"===n?"":"label"===n?"label":"",l="available"===n?e.isSelected:"select"===n?"":"owner"===n?"":"label"===n?e.label:"";return r&&l?(0,i.jsx)(U.Yk,{align:t.align,style:{padding:"5px 0px"},children:t.render&&t.render({[r]:l,control:e.control})},t.id):(0,i.jsx)(U.Yk,{align:t.align},t.id)})},t))})})})]})})})}),(0,i.jsx)("div",{children:(0,i.jsx)(j.cq,{style:{backgroundColor:"#270276",width:"100%",padding:"10px",color:"white",fontSize:"13px",fontWeight:700},children:"Kitchen"})}),(0,i.jsx)(C.Z,{children:(0,i.jsx)(D.Z,{sx:{minWidth:650},"aria-label":"uhit details table",children:(0,i.jsx)(E.Z,{children:(0,i.jsxs)(S.Z,{children:[(0,i.jsx)(Z.Z,{colSpan:2,style:{borderBottom:"none"},children:(0,i.jsx)(D.Z,{children:(0,i.jsx)(E.Z,{children:W.map((e,t)=>(0,i.jsx)(U.Ev,{children:V.map(t=>{let n=t.id,r="available"===n?"isSelected":"label"===n?"label":"",l="available"===n?e.isSelected:"label"===n?e.label:"";return r&&l?(0,i.jsx)(U.Yk,{align:t.align,style:{padding:"5px 0px"},children:t.render&&t.render({[r]:l,control:e.control})},t.id):(0,i.jsx)(U.Yk,{align:t.align},t.id)})},t))})})}),(0,i.jsx)(Z.Z,{style:{borderBottom:"none",minWidth:0}}),(0,i.jsx)(Z.Z,{colSpan:2,style:{borderBottom:"none",padding:"0px"},children:(0,i.jsx)(D.Z,{children:(0,i.jsx)(E.Z,{children:Q.map((e,t)=>(0,i.jsx)(U.Ev,{children:V.map(t=>{let n=t.id,r="available"===n?"isSelected":"select"===n?"":"owner"===n?"":"label"===n?"label":"",l="available"===n?e.isSelected:"select"===n?"":"owner"===n?"":"label"===n?e.label:"";return r&&l?(0,i.jsx)(U.Yk,{align:t.align,style:{padding:"5px 0px"},children:t.render&&t.render({[r]:l,control:e.control})},t.id):(0,i.jsx)(U.Yk,{align:t.align},t.id)})},t))})})})]})})})}),(0,i.jsx)("div",{children:(0,i.jsx)(j.cq,{style:{backgroundColor:"#270276",width:"100%",padding:"10px",color:"white",fontSize:"13px",fontWeight:700},children:"Maintenance"})}),(0,i.jsx)(C.Z,{children:(0,i.jsx)(D.Z,{sx:{minWidth:650},"aria-label":"uhit details table",children:(0,i.jsx)(E.Z,{children:(0,i.jsxs)(S.Z,{children:[(0,i.jsx)(Z.Z,{colSpan:2,style:{borderBottom:"none"},children:(0,i.jsx)(D.Z,{children:(0,i.jsx)(E.Z,{children:Y.map((e,t)=>(0,i.jsx)(U.Ev,{children:V.map(t=>{let n=t.id,r="available"===n?"isSelected":"label"===n?"label":"",l="available"===n?e.isSelected:"label"===n?e.label:"";return r&&l?(0,i.jsx)(U.Yk,{align:t.align,style:{padding:"5px 0px"},children:t.render&&t.render({[r]:l,control:e.control})},t.id):(0,i.jsx)(U.Yk,{align:t.align},t.id)})},t))})})}),(0,i.jsx)(Z.Z,{style:{borderBottom:"none",minWidth:0}}),(0,i.jsx)(Z.Z,{colSpan:2,style:{borderBottom:"none",padding:"0px"},children:(0,i.jsx)(D.Z,{children:(0,i.jsx)(E.Z,{children:q.map((e,t)=>(0,i.jsx)(U.Ev,{children:V.map(t=>{let n=t.id,r="available"===n?"isSelected":"select"===n?"":"owner"===n?"":"label"===n?"label":"",l="available"===n?e.isSelected:"select"===n?"":"owner"===n?"":"label"===n?e.label:"";return r&&l?(0,i.jsx)(U.Yk,{align:t.align,style:{padding:"5px 0px"},children:t.render&&t.render({[r]:l,control:e.control})},t.id):(0,i.jsx)(U.Yk,{align:t.align},t.id)})},t))})})})]})})})}),(0,i.jsx)("div",{children:(0,i.jsx)(j.cq,{style:{backgroundColor:"#270276",width:"100%",padding:"10px",color:"white",fontSize:"13px",fontWeight:700},children:"Outdoor"})}),(0,i.jsx)(C.Z,{children:(0,i.jsx)(D.Z,{sx:{minWidth:650},"aria-label":"uhit details table",children:(0,i.jsx)(E.Z,{children:(0,i.jsxs)(S.Z,{children:[(0,i.jsx)(Z.Z,{colSpan:2,style:{borderBottom:"none"},children:(0,i.jsx)(D.Z,{children:(0,i.jsx)(E.Z,{children:w.map(e=>[17,18].includes(e.unitAttributeid)?null:(0,i.jsx)(U.Ev,{children:V.map(t=>{let n=t.id,r="available"===n?"isSelected":"select"===n?"":"owner"===n?"":"label"===n?"label":"",l="available"===n?e.isSelected:"select"===n?"":"owner"===n?"":"label"===n?e.label:"";return r&&l?(0,i.jsx)(U.Yk,{align:t.align,style:{padding:"5px 0px"},children:t.render&&t.render({[r]:l,control:e.control})},t.id):(0,i.jsx)(U.Yk,{align:t.align},t.id)})},e.unitAttributeid))})})}),(0,i.jsx)(Z.Z,{style:{borderBottom:"none",minWidth:0}}),(0,i.jsx)(Z.Z,{colSpan:2,style:{borderBottom:"none",padding:"0px"},children:(0,i.jsx)(D.Z,{children:(0,i.jsx)(E.Z,{children:w.map(e=>{if([17,18].includes(e.unitAttributeid))return(0,i.jsx)(U.Ev,{children:V.map(t=>{let n=t.id,r="available"===n?"isSelected":"select"===n?"":"owner"===n?"":"label"===n?"label":"",l="available"===n?e.isSelected:"select"===n?"":"owner"===n?"":"label"===n?e.label:"";return r&&l?(0,i.jsx)(U.Yk,{align:t.align,style:{padding:"5px 0px"},children:t.render&&t.render({[r]:l,control:e.control})},t.id):(0,i.jsx)(U.Yk,{align:t.align},t.id)})},e.unitAttributeid)})})})})]})})})})]})]})},V=n(86192),k=n(21236);function P(){let e=(0,v._)(["\n  display: grid;\n  grid-template: repeat(2, 1fr) / repeat(2, 1fr);\n  align-items: center;\n  justify-items: center;\n  margin-top: 20px;\n  width: 100%;\n  gap: 20px;\n\n  "," {\n    grid-template-columns: 1fr;\n    grid-auto-rows: auto;\n  }\n"]);return P=function(){return e},e}function B(){let e=(0,v._)(["\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  gap: 20px;\n  margin: 40px 0;\n\n  "," {\n    flex-direction: column;\n  }\n"]);return B=function(){return e},e}let F=(0,N.ZP)("div")(P(),e=>{let{theme:t}=e;return t.breakpoints.down("mobile")}),W=(0,N.ZP)("div")(B(),e=>{let{theme:t}=e;return t.breakpoints.down("mobile")});var Q=function(e){var t,n,r,l;let{properties:a,isLoading:o,onSave:d,onCancel:s,editDefaultData:c}=e,{data:u,isLoading:m,isError:v,isSuccess:N}=(0,k.g)(),{data:M,isLoading:T}=(0,O.CO)(),{data:D,isLoading:E}=(0,O.JA)(),{data:Z,isLoading:C}=(0,O.p5)(),{data:S}=(0,O.JN)(),{data:U,isLoading:P,isError:B,isSuccess:Q}=(0,O.Um)(),z=L.useMemo(()=>null==U?void 0:U.filter(e=>
1e.hasUnit),[U]),{control:Y,handleSubmit:q,setValue:G,watch:K,getValues:X,trigger:H,formState:{errors:$}}=(0,R.cI)({resolver:(0,g.F)(f.NE),values:{...c,unitNoName:(null==c?void 0:c.unitNoName)||"",yearOfConstruction:String((null==c?void 0:c.yearOfConstruction)||""),unitAreaSft:String((null==c?void 0:c.unitAreaSft)||""),noOfBedRooms:String((null==c?void 0:c.noOfBedRooms)||""),noOfBathRooms:String((null==c?void 0:c.noOfBathRooms)||""),unitStructureTypeId:0,landLordPropertiesId:0,unitAminities:(null==c?void 0:c.unitAminities)||[],unitAppliance:(null==c?void 0:c.unitAppliance)||[],unitUtility:(null==c?void 0:c.unitUtility)||[],unitAmenitiesIndoor:(null==c?void 0:null===(t=c.unitAmenitiesIndoor[0])||void 0===t?void 0:t.value)||[],unitAmenitiesKitchen:(null==c?void 0:null===(n=c.unitAmenitiesKitchen[0])||void 0===n?void 0:n.value)||[],unitAmenitiesMaintenance:(null==c?void 0:null===(r=c.unitAmenitiesMaintenance[0])||void 0===r?void 0:r.value)||[],unitAmenitiesOutdoor:(null==c?void 0:null===(l=c.unitAmenitiesOutdoor[0])||void 0===l?void 0:l.value)||[],addr1:"",addr2:"",city:"",stateId:0,zipcode:"",state:""},mode:"all"}),J=async e=>{var t,n,r,l,a,o,s,c,p,m;H(),e.preventDefault();let v=X(),O=null==u?void 0:u.filter(e=>e.id===v.stateId);void 0!==O&&0!==O.length&&(v.state=null===(p=O[0])||void 0===p?void 0:p.state,G("state",null===(m=O[0])||void 0===m?void 0:m.state)),v.unitUtility.forEach((e,t)=>{"true"===e.isTenantPayee?G("unitUtility.".concat(t,".isTenantPayee"),!0):"false"===e.isTenantPayee&&G("unitUtility.".concat(t,".isTenantPayee"),!1)}),v.unitAppliance.forEach((e,t)=>{"true"===e.isTenantPayee?G("unitAppliance.".concat(t,".isTenantPayee"),!0):"false"===e.isTenantPayee&&G("unitAppliance.".concat(t,".isTenantPayee"),!1)}),null==S||null===(t=S.data)||void 0===t||t.Indoor.forEach((e,t)=>{G("unitAmenitiesIndoor.".concat(t,".unitAttributeId"),e.unitAttributeId)}),null==S||null===(r=S.data)||void 0===r||null===(n=r.Kitchen)||void 0===n||n.forEach((e,t)=>{G("unitAmenitiesKitchen.".concat(t,".unitAttributeId"),e.unitAttributeId)}),null==S||null===(a=S.data)||void 0===a||null===(l=a.Maintenance)||void 0===l||l.forEach((e,t)=>{G("unitAmenitiesMaintenance.".concat(t,".unitAttributeId"),e.unitAttributeId)}),null==S||null===(s=S.data)||void 0===s||null===(o=s.Outdoor)||void 0===o||o.forEach((e,t)=>{G("unitAmenitiesOutdoor.".concat(t,".unitAttributeId"),e.unitAttributeId)}),null==Z||Z.forEach((e,t)=>{G("unitAminities.".concat(t,".unitAttributeId"),e.id)}),null==Z||Z.forEach((e,t)=>{G("unitAminities.".concat(t,".unitAttributeId"),e.id),G("unitAminities.".concat(t,".isSelected"),!1)}),null==M||M.forEach((e,t)=>{G("unitAppliance.".concat(t,".unitAttributeId"),e.id)}),null==D||D.forEach((e,t)=>{G("unitUtility.".concat(t,".unitAttributeId"),e.id)});let f=null===(c=v.unitUtility)||void 0===c?void 0:c.filter(e=>"unitAttributeTypeId"in e),b=!1;if(""===K("addr2")?G("unitNoName"," "):G("unitNoName",K("addr2")),K("unitUtility").find(e=>!0!==e.isSelected)){h.Am.error((0,i.jsx)(A.Z,{text:(0,i.jsx)(x.Z,{i18nKey:"LANDLORD:RFTA_UNIT_DETAILS_UTILITIES_MANDATORY_ERROR"})}));return}b=!0;let g=!0;null==f||f.forEach(e=>{if((1===e.unitAttributeId||2===e.unitAttributeId||3===e.unitAttributeId||4===e.unitAttributeId)&&(void 0===e.unitAttributeTypeId||0===e.unitAttributeTypeId)&&g){h.Am.error((0,i.jsx)(A.Z,{text:"Please select all utility types"})),g=!1;return}}),b&&g&&v.unitUtility.forEach((e,t)=>{G("unitUtility.".concat(t,".unitAttributeTypeId"),(null==f?void 0:f[t])?null==f?void 0:f[t].unitAttributeTypeId:0)}),b&&g&&q(e=>{d(e)})()},ee=()=>{let e=null==a?void 0:a.filter(e=>e.propertyId===K("landLordPropertiesId"));if((null==e?void 0:e.length)!==0&&void 0!==e){var t,n,i,r,l;G("addr1",null===(t=e[0])||void 0===t?void 0:t.propertyAddrOne),G("addr2",null===(n=e[0])||void 0===n?void 0:n.propertyAddrTwo),G("city",null===(i=e[0])||void 0===i?void 0:i.propertyCity),G("stateId",null===(r=e[0])||void 0===r?void 0:r.propertyStateId),G("zipcode",null===(l=e[0])||void 0===l?void 0:l.propertyZipCode)}};return(0,i.jsx)("div",{children:(0,i.jsxs)("form",{onSubmit:e=>J(e),children:[(0,i.jsxs)(F,{children:[(0,i.jsx)(R.Qr,{name:"landLordPropertiesId",control:Y,render:e=>{var t;
1let{field:{onChange:n,...r}}=e;return(0,i.jsx)(b.RG,{customlabel:"LANDLORD:RFTA_PROPERTY_NAME",...r,onChange:e=>{var t;n(e),ee(),null==z||null===(t=z.find(e=>e.id===K("unitStructureTypeId")))||void 0===t||t.name},error:!!$.landLordPropertiesId,errormessage:null===(t=$.landLordPropertiesId)||void 0===t?void 0:t.message,disabled:!!c,starMark:"*",children:null==a?void 0:a.map(e=>(0,i.jsx)(I.Z,{value:e.propertyId,children:e.propertyName},e.propertyId))})}}),(0,i.jsx)(R.Qr,{name:"addr1",control:Y,defaultValue:"",render:e=>{var t;let{field:n}=e;return(0,i.jsx)(V.h,{customlabel:"LANDLORD:RFTA_FORM_LABEL_ADDRESS_LINE_1",field:n,error:!!$.addr1,helperText:null===(t=$.addr1)||void 0===t?void 0:t.message,setValue:G,addressLine1:"addr1",addressLine2:"addr2",cityFormName:"city",stateFormName:"stateId",zipCodeFormName:"zipcode",starMark:"*",trigger:H})}}),(0,i.jsx)(R.Qr,{name:"addr2",control:Y,defaultValue:"",render:e=>{var t;let{field:n}=e;return(0,i.jsx)(b._l,{starMark:"*",autoComplete:"address-line2",variant:"outlined",customlabel:"LANDLORD:RFTA_UNIT_NAME",error:!!$.addr2,helperText:null===(t=$.addr2)||void 0===t?void 0:t.message,...n,sx:{maxWidth:"283px"}})}}),(0,i.jsx)(R.Qr,{name:"city",control:Y,defaultValue:"",render:e=>{var t;let{field:n}=e;return(0,i.jsx)(b._l,{variant:"outlined",customlabel:"LANDLORD:RFTA_FORM_LABEL_CITY",error:!!$.city,helperText:null===(t=$.city)||void 0===t?void 0:t.message,...n,starMark:"*",sx:{maxWidth:"283px"}})}}),(0,i.jsxs)(i.Fragment,{children:[m&&(0,i.jsx)(b.RG,{placeholder:"LANDLORD:RFTA_LOADING_UNITS",customlabel:"LANDLORD:RFTA_FORM_LABEL_STATE",defaultValue:"",disabled:!0}),N&&(0,i.jsx)(R.Qr,{name:"stateId",control:Y,defaultValue:u[6].id,render:e=>{let{field:t}=e;return(0,i.jsx)(b.RG,{...t,customlabel:"LANDLORD:RFTA_FORM_LABEL_STATE",defaultValue:u[6].id,children:u.map(e=>(0,i.jsx)(I.Z,{value:e.id,children:e.state},e.id))})}}),v&&(0,i.jsx)(b.RG,{error:!0,errormessage:"LANDLORD:RFTA_ERROR_LOADING_STATES",disabled:!0})]}),(0,i.jsx)(R.Qr,{name:"zipcode",control:Y,defaultValue:"",render:e=>{var t;let{field:n}=e;return(0,i.jsx)(b._l,{autoComplete:"postal-code",variant:"outlined",customlabel:"LANDLORD:RFTA_ZIP_CODE",error:!!$.zipcode,helperText:null===(t=$.zipcode)||void 0===t?void 0:t.message,...n,starMark:"*",sx:{maxWidth:"283px"}})}}),(0,i.jsxs)(i.Fragment,{children:[P&&(0,i.jsx)(b.RG,{placeholder:"LANDLORD:RFTA_LOADING_STRUCTURE_TYPES",customlabel:"LANDLORD:RFTA_STRUCTURE_TYPE",defaultValue:"",disabled:!0}),Q&&(0,i.jsx)(R.Qr,{name:"unitStructureTypeId",control:Y,render:e=>{var t;let{field:{onChange:n,...r}}=e;return(0,i.jsx)(b.RG,{...r,customlabel:"LANDLORD:RFTA_STRUCTURE_TYPE",error:!!$.unitStructureTypeId,errormessage:null===(t=$.unitStructureTypeId)||void 0===t?void 0:t.message,onChange:e=>{var t;n(e),null==z||null===(t=z.find(t=>t.id===e.target.value))||void 0===t||t.name},starMark:"*",children:U.map(e=>(0,i.jsx)(I.Z,{value:e.id,children:e.name},e.id))})}}),B&&(0,i.jsx)(b.RG,{customlabel:"LANDLORD:RFTA_STRUCTURE_TYPE",error:!0,errormessage:"LANDLORD:RFTA_ERROR_LOADING_STRUCTURE_TYPES",defaultValue:"",disabled:!0})]}),(0,i.jsx)(R.Qr,{name:"yearOfConstruction",control:Y,defaultValue:"",render:e=>{var t;let{field:n}=e;return(0,i.jsx)(b._l,{variant:"outlined",customlabel:"LANDLORD:RFTA_YEAR_CONSTRUCTED",error:!!$.yearOfConstruction,helperText:null===(t=$.yearOfConstruction)||void 0===t?void 0:t.message,...n,starMark:"*",sx:{maxWidth:"283px"}})}}),(0,i.jsx)(R.Qr,{name:"unitAreaSft",control:Y,defaultValue:"",render:e=>{var t;let{field:n}=e;return(0,i.jsx)(b._l,{variant:"outlined",customlabel:"LANDLORD:RFTA_SQUARE_FOOTAGE",error:!!$.unitAreaSft,helperText:null===(t=$.unitAreaSft)||void 0===t?void 0:t.message,...n,starMark:"*",sx:{maxWidth:"283px"}})}}),(0,i.jsx)(R.Qr,{name:"noOfBedRooms",control:Y,defaultValue:"",render:e=>{var t;let{field:n}=e;return(0,i.jsx)(b._l,{variant:"outlined",customlabel:"LANDLORD:RFTA_NUMBER_OF_BEDROOMS",error:!!$.noOfBedRooms,helperText:null===(t=$.noOfBedRooms)||void 0===t?void 0:t.message,...n,starMark:"*",sx:{maxWidth:"283px"}})}}),(0,i.jsx)(R.Qr,{name:"noOfBathRooms",control:Y,defaultValue:"",render:e=>{var t;let{field:n}=e;return(0,i.jsx)(b._l,{variant:"outlined",customlabel:"LANDLORD:RFTA_NUM
1BER_OF_BATHROOMS",error:!!$.noOfBathRooms,helperText:null===(t=$.noOfBathRooms)||void 0===t?void 0:t.message,...n,starMark:"*",sx:{maxWidth:"283px"}})}})]}),(0,i.jsx)(p.Z,{mt:2,children:C||E||T?(0,i.jsx)(p.Z,{display:"flex",justifyContent:"center",children:(0,i.jsx)(y.Z,{})}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(j.cq,{children:(0,i.jsx)(x.Z,{i18nKey:"LANDLORD:RFTA_UNIT_DETAILS_TABLE_HEADER"})}),(0,i.jsxs)(j.qn,{children:["(",(0,i.jsx)("span",{style:{color:_.r.palette.error.main},children:"*"}),")"," ",(0,i.jsx)(x.Z,{i18nKey:"COMMON:VALIDATION_MANDATORY_FIELD"})]}),(0,i.jsx)(w,{control:Y,watch:K})]})}),(0,i.jsxs)(W,{children:[(0,i.jsx)(b.MG,{size:"medium",styletype:"Secondary",onClick:()=>s(),children:(0,i.jsx)(x.Z,{i18nKey:"COMMON:CANCEL"})}),(0,i.jsx)(b.MG,{size:"medium",type:"submit",disabled:o,children:o?(0,i.jsx)(y.Z,{size:20}):(0,i.jsx)(x.Z,{i18nKey:"COMMON:SAVE"})})]})]})})},z=n(73536),Y=n(38382),q=n(33483),G=()=>{let e=(0,m.useRouter)(),{isDesktop:t}=(0,z.Z)(),{data:n,isSuccess:r}=(0,O.Lv)(),{mutate:l}=(0,d.Le)(()=>{(0,h.Am)((0,i.jsx)(A.Z,{text:(0,i.jsx)(x.Z,{i18nKey:"LANDLORD:UNIT_ADD_NEW_UNIT"})})),e.push(c.default.LANDLORD_MY_UNITS.ROUTE)});return(0,i.jsxs)(o._U,{navigation:(0,i.jsx)(s.X,{}),children:[(0,i.jsx)(Y.Z,{onClick:()=>{e.push(c.default.LANDLORD_MY_UNITS.ROUTE)}}),(0,i.jsx)("div",{style:{display:"flex",justifyContent:"center",fontSize:"24px",color:"#26284e",fontWeight:700,alignItems:"center"},children:(0,i.jsx)("p",{children:(0,i.jsx)(x.Z,{i18nKey:"LANDLORD:RFTA_ADD_NEW_UNIT"})})}),(0,i.jsx)("div",{style:{margin:"1rem 0px 1rem 0px"},children:(0,i.jsx)(q.Z,{})}),(0,i.jsx)(u.ZP,{container:!0,justifyContent:"right",children:(0,i.jsx)(u.ZP,{item:!0,xs:6,md:6,children:(0,i.jsx)(p.Z,{mt:{xs:"0",mobile:"12px",textAlign:"right"},children:(0,i.jsx)(b.MG,{size:"medium",onClick:()=>e.push(c.default.LANDLORD_ADD_NEW_PROPERTY.ROUTE),styletype:"Secondary",sx:t?{width:"281px",height:"56px"}:null,children:(0,i.jsx)(x.Z,{i18nKey:"LANDLORD:RFTA_ADD_NEW_PROPERTY"})})})})}),r&&(0,i.jsx)(Q,{showAddPropertyButton:!0,properties:(null==n?void 0:n.data)||[],onSave:l,onCancel:()=>e.push(c.default.LANDLORD_MY_UNITS.ROUTE)})]})},K=n(5724),X=n(33326),H=n.n(X),$=!0,J=()=>{let{isLoading:e}=(0,r.v$)();(0,a.u)();let{t}=(0,K.Z)();return e?(0,i.jsx)(l.Z,{}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(H(),{children:(0,i.jsx)("title",{children:t("LANDLORD:MY_UNITS_ADD_HEADER")})}),(0,i.jsx)(o.Nm,{children:(0,i.jsx)(G,{})})]})}},26662:function(e,t,n){"use strict";n.d(t,{L:function(){return i}});let i=(e,t)=>JSON.stringify({translationKey:e,...t})}},function(e){e.O(0,[6637,8753,9912,7017,8830,8686,5262,197,608,2888,9774,179],function(){return e(e.s=11964)}),_N_E=e.O()}]);

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.