@egovernments/digit-ui-module-core 1.8.2-beta.7 → 1.8.2-beta.9
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.
- package/CHANGELOG.md +6 -0
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=require("@egovernments/digit-ui-components"),n=require("react"),r=e(n),i=require("react-i18next"),o=require("react-query"),l=require("react-redux"),a=require("react-router-dom"),u=require("@egovernments/digit-ui-react-components"),c=e(require("react-tooltip")),s=require("redux"),d=e(require("redux-thunk"));const f={error:{imgUrl:"https://s3.ap-south-1.amazonaws.com/egov-qa-assets/error-image.png",infoMessage:"CORE_SOMETHING_WENT_WRONG",buttonInfo:"ACTION_TEST_HOME"},maintenance:{imgUrl:"https://s3.ap-south-1.amazonaws.com/egov-qa-assets/maintainence-image.png",infoMessage:"CORE_UNDER_MAINTENANCE",buttonInfo:"ACTION_TEST_HOME"},notfound:{imgUrl:"https://s3.ap-south-1.amazonaws.com/egov-qa-assets/PageNotFound.png",infoMessage:"MODULE_NOT_FOUND",buttonInfo:"ACTION_TEST_HOME"}},m=e=>{const{type:t="error"}=Digit.Hooks.useQueryParams(),n=f[t],{t:o}=i.useTranslation();return r.createElement("div",{className:"error-boundary"},r.createElement("div",{className:"error-container"},r.createElement("img",{src:n.imgUrl,alt:"error"}),r.createElement("h1",null,o(n.infoMessage)),r.createElement("button",{onClick:()=>{e.goToHome()}},o(n.buttonInfo))))},v=()=>{var e,t;const n="employee"===Digit.UserService.getType()?"/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/user/error":"/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/citizen/error";return window.location.href.includes("employee/user/error")||window.location.href.includes("citizen/error")||"development"===process.env.NODE_ENV||(window.location.href=n),r.createElement("span",null)};class p extends r.Component{constructor(e){super(e),this.state={error:null,errorStack:null,hasError:!1}}static getDerivedStateFromError(e){return{error:null==e?void 0:e.message,hasError:!0,errorStack:null==e?void 0:e.stack}}componentDidCatch(e,t){this.setState({error:null==e?void 0:e.message,hasError:!0,errorStack:null==e?void 0:e.stack})}render(){return this.state.hasError?r.createElement("div",{className:"error-boundary"},r.createElement(v,null),r.createElement(m,{initData:this.props.initData})):this.props.children}}const g=(e,t,n)=>{const r=null==e?void 0:e[""+t];r&&r.map(e=>{e.link=e.navigationURL,e.i18nKey=n(e.name)});const i={links:null==r?void 0:r.reverse(),header:Digit.Utils.locale.getTransformedLocale("ACTION_TEST_"+t),iconName:"CITIZEN_"+t+"_ICON"};var o;return"FSM"===t&&[{role:"FSM_DSO",from:"/"+(null===(o=window)||void 0===o?void 0:o.contextPath)+"/citizen/fsm/dso-dashboard",dashoardLink:"CS_LINK_DSO_DASHBOARD",loginLink:"CS_LINK_LOGIN_DSO"}].map(e=>{var t,r,o;let{role:l,from:a,loginLink:u,dashoardLink:c}=e;Digit.UserService.hasAccess(l)?null==i||null===(t=i.links)||void 0===t||t.push({link:a,i18nKey:n(c)}):null==i||null===(r=i.links)||void 0===r||r.push({link:"/"+(null===(o=window)||void 0===o?void 0:o.contextPath)+"/citizen/login",state:{role:"FSM_DSO",from:a},i18nKey:n(u)})}),i},h=e=>{let{modules:n,getCitizenMenu:o,fetchedCitizen:l,isLoading:a}=e;const u=[n.filter(e=>{let{code:t}=e;return"Payment"===t})[0],...n.filter(e=>{let{code:t}=e;return"Payment"!==t})],{t:c}=i.useTranslation();return a?r.createElement(t.Loader,null):r.createElement(r.Fragment,null,r.createElement("div",{className:"citizen-all-services-wrapper"},location.pathname.includes("sanitation-ui/citizen/all-services")?null:r.createElement(t.BackButton,null),r.createElement("div",{className:"citizenAllServiceGrid"},u.filter(e=>e).map((e,n)=>{var i,a;let u,{code:s}=e;var d,f,m,v;return l&&(u=l?g(o,s,c):void 0),(null===(i=u)||void 0===i||null===(a=i.links)||void 0===a?void 0:a.length)>0?r.createElement(t.CitizenHomeCard,{header:c(null===(d=u)||void 0===d?void 0:d.header),links:null===(f=u)||void 0===f||null===(m=f.links)||void 0===m||null===(v=m.filter(e=>null==e?void 0:e.link))||void 0===v?void 0:v.sort((e,t)=>(null==e?void 0:e.orderNumber)-(null==t?void 0:t.orderNumber)),Icon:()=>(e=>{switch(e){case"PT":return r.createElement(PTIcon,{className:"fill-path-primary-main"});case"WS":return r.createElement(WSICon,{className:"fill-path-primary-main"});case"FSM":return r.createElement(t.FSMIcon,{className:"fill-path-primary-main"});case"MCollect":return r.createElement(t.MCollectIcon,{className:"fill-path-primary-main"});case"PGR":return r.createElement(PGRIcon,{className:"fill-path-primary-main"});case"TL":return r.createElement(TLIcon,{className:"fill-path-primary-main"});case"OBPS":return r.createElement(OBPSIcon,{className:"fill-path-primary-main"});case"Bills":return r.createElement(t.BillsIcon,{className:"fill-path-primary-main"});default:return r.createElement(PTIcon,{className:"fill-path-primary-main"})}})(s),Info:"OBPS"===s?()=>r.createElement(t.CitizenInfoLabel,{style:{margin:"0px",padding:"10px"},info:c("CS_FILE_APPLICATION_INFO_LABEL"),text:c("BPA_CITIZEN_HOME_STAKEHOLDER_INCLUDES_INFO_LABEL")}):null,isInfo:"OBPS"===s}):r.createElement(r.Fragment,null)}))))},E=e=>{let{modules:t,additionalComponent:i}=e;return r.createElement(n.Fragment,null,r.createElement("div",{className:"employee-app-container digit-home-employee-app"},r.createElement("div",{className:"ground-container moduleCardWrapper gridModuleWrapper digit-home-moduleCardWrapper"},t.map((e,t)=>{let{code:n}=e;const i=Digit.ComponentRegistryService.getComponent(n+"Card")||(()=>r.createElement(r.Fragment,null));return r.createElement(i,{key:t})}))),i&&(null==i?void 0:i.length)>0&&i.map(e=>{const t="string"==typeof e?Digit.ComponentRegistryService.getComponent(e):null;return t?r.createElement("div",{className:"additional-component-wrapper"},r.createElement(t,null)):null}))},y=e=>{let{userType:t,modules:n,getCitizenMenu:i,fetchedCitizen:o,isLoading:l,additionalComponent:a}=e;return"citizen"===t?r.createElement(h,{modules:n,getCitizenMenu:i,fetchedCitizen:o,isLoading:l}):r.createElement(E,{modules:n,additionalComponent:a})},_=function(e,t,n){if(void 0===e&&(e=""),void 0===t&&(t=""),void 0===n&&(n=""),""==t)return e;for(;null!==(r=e)&&void 0!==r&&r.includes(t);){var r,i;e=null===(i=e)||void 0===i?void 0:i.replace(t,n)}return e},b=e=>{var i;const[o,l]=n.useState(null),[u,c]=n.useState([]),[s,d]=n.useState([]),f=a.useHistory();let m=[];return n.useEffect(()=>{var e,t;const n=Digit.SessionStorage.get("citizen.userRequestObject");let r=[],i=[];null==n||null===(e=n.info)||void 0===e||null===(t=e.roles)||void 0===t||t.forEach(e=>r.push(e.tenantId));let o=r.filter((e,t,n)=>n.indexOf(e)===t);null==o||o.forEach(e=>{var t;i.push({label:"TENANT_TENANTS_"+(null===(t=_(e,".","_"))||void 0===t?void 0:t.toUpperCase()),value:e})}),m=null==i?void 0:i.filter(e=>e.value==Digit.SessionStorage.get("Employee.tenantId")),c(i)},[o]),r.createElement("div",{style:null!=e&&e.mobileView?{color:"#767676"}:{}},r.createElement(t.Dropdown,{t:null==e?void 0:e.t,option:u,selected:u.find(e=>e.value===(null==o?void 0:o.value)),optionKey:"label",select:e=>{var t,n,r,i;const o=Digit.SessionStorage.get("citizen.userRequestObject"),a=null===(t=Digit.SessionStorage.get("citizen.userRequestObject"))||void 0===t||null===(n=t.info)||void 0===n||null===(r=n.roles)||void 0===r?void 0:r.filter(t=>t.tenantId===e.value);if((null==a?void 0:a.length)>0&&(o.info.roles=a,o.info.tenantId=null==e?void 0:e.value),Digit.SessionStorage.set("Employee.tenantId",null==e?void 0:e.value),Digit.UserService.setUser(o),l(e),window.location.href.includes("/"+(null===(i=window)||void 0===i?void 0:i.contextPath)+"/employee/")){var u,c;const e=(null===(u=location.state)||void 0===u?void 0:u.from)||"/"+(null===(c=window)||void 0===c?void 0:c.contextPath)+"/employee";f.replace(e)}window.location.reload()},freeze:!0,customSelector:r.createElement("label",{className:"cp"},null==e?void 0:e.t("TENANT_TENANTS_"+(null===(i=_(Digit.SessionStorage.get("Employee.tenantId"),".","_"))||void 0===i?void 0:i.toUpperCase())))}))},C=e=>{const i=e.dropdown||!1,{data:o,isLoading:l}=Digit.Hooks.useStore.getInitData(),{languages:a,stateInfo:u}=o||{},c=Digit.StoreData.getCurrentLanguage(),[s,d]=n.useState(c),f=e=>{d(e.value),Digit.LocalizationService.changeLanguage(e.value,u.code)};return l?null:i?r.createElement("div",null,r.createElement(t.Dropdown,{className:"language-dropdown",option:a,selected:a.find(e=>e.value===c),optionKey:"label",select:f,freeze:!0,customSelector:r.createElement("label",{className:"cp"},a.find(e=>e.value===s).label)})):r.createElement(r.Fragment,null,r.createElement("div",{style:{marginBottom:"5px"}},"Language"),r.createElement("div",{className:"language-selector"},a.map((e,n)=>r.createElement("div",{className:"language-button-container",key:n},r.createElement(t.Button,{label:e.label,onClick:()=>f(e),variation:e.value===s?"primary":""})))))},O=e=>{var t,n;return r.createElement("span",{className:"user-img-txt",onClick:e.toggleMenu,title:e.name},null==e||null===(t=e.name)||void 0===t||null===(n=t[0])||void 0===n?void 0:n.toUpperCase())},S=e=>{var n,i,o,l,c,s,d,f;let{t:m,stateInfo:v,toggleSidebar:p,isSidebarOpen:g,handleLogout:h,userDetails:E,CITIZEN:y,cityDetails:_,mobileView:S,userOptions:w,handleUserDropdownSelection:N,logoUrl:I,showLanguageChange:D=!0}=e;const[T,A]=r.useState(null);r.useEffect(function(){try{var e;const t=Digit.ULBService.getCurrentTenantId(),n=null==E||null===(e=E.info)||void 0===e?void 0:e.uuid,r=function(){if(n)return Promise.resolve(Digit.UserService.userSearch(t,{uuid:[n]},{})).then(function(e){if(e&&e.user&&e.user.length){var t;const n=e.user[0],r=null==n||null===(t=n.photo)||void 0===t?void 0:t.split(",");A(null==r?void 0:r.at(0))}})}();return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},[null!==T,null==E||null===(n=E.info)||void 0===n?void 0:n.uuid]);const L=Digit.ULBService.getCitizenCurrentTenant(!0);let R=a.useHistory();const{pathname:x}=a.useLocation(),{data:{unreadCount:P}={},isSuccess:M}=Digit.Hooks.useNotificationCount({tenantId:L,config:{enabled:"EMPLOYEE"!==(null===(k=Digit.UserService)||void 0===k||null===(U=k.getUser())||void 0===U||null===(B=U.info)||void 0===B?void 0:B.type)&&"CITIZEN"===(null===(j=Digit.UserService)||void 0===j||null===(F=j.getUser())||void 0===F||null===(V=F.info)||void 0===V?void 0:V.type)&&!!L}});var k,U,B,j,F,V;if(y)return r.createElement("div",null,r.createElement(u.TopBar,{img:null==v?void 0:v.logoUrlWhite,isMobile:!0,toggleSidebar:()=>{Digit.clikOusideFired?Digit.clikOusideFired=!1:p(!0)},logoUrl:null==v?void 0:v.logoUrlWhite,onLogout:h,userDetails:E,notificationCount:P<99?P:99,notificationCountLoaded:M,cityOfCitizenShownBesideLogo:m(L),onNotificationIconClick:function(){var e;R.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/citizen/engagement/notifications")},hideNotificationIconOnSomeUrlsWhenNotLoggedIn:(e=>{var t,n,r,i;return(null===(t=Digit.UserService)||void 0===t||null===(n=t.getUser())||void 0===n||!n.access_token)&&["/"+(null===(r=window)||void 0===r?void 0:r.contextPath)+"/citizen/select-language","/"+(null===(i=window)||void 0===i?void 0:i.contextPath)+"/citizen/select-location"].includes(e)})(x),changeLanguage:S?null:r.createElement(C,{dropdown:!0})}));const z=!(null==E||!E.access_token),W=null===(i=Digit.ComponentRegistryService)||void 0===i?void 0:i.getComponent("CustomEmployeeTopBar");return W?r.createElement(W,{t:m,stateInfo:v,toggleSidebar:p,isSidebarOpen:g,handleLogout:h,userDetails:E,CITIZEN:y,cityDetails:_,mobileView:S,userOptions:w,handleUserDropdownSelection:N,logoUrl:I,showLanguageChange:D,loggedin:z}):r.createElement("div",{className:"topbar"},r.createElement("div",{className:"digit-hamburger-class"},r.createElement(u.Hamburger,{handleClick:p,color:"#9E9E9E"})),r.createElement("img",{className:"city",src:z?null==_?void 0:_.logoId:null==v?void 0:v.statelogo}),r.createElement("span",{className:"digit-topbar-container"},z&&(null!=_&&null!==(o=_.city)&&void 0!==o&&o.ulbGrade?r.createElement("p",{className:"ulb"},m(null==_?void 0:_.i18nKey).toUpperCase()," ",m("ULBGRADE_"+(null==_||null===(l=_.city)||void 0===l?void 0:l.ulbGrade.toUpperCase().replace(" ","_").replace(".","_"))).toUpperCase()):r.createElement("img",{className:"state",src:I})),!z&&r.createElement("p",{className:"ulb"},m("MYCITY_"+(null==v||null===(c=v.code)||void 0===c?void 0:c.toUpperCase())+"_LABEL")," ",m("MYCITY_STATECODE_LABEL")),r.createElement("div",{className:S?"right":"flex-right right w-80 column-gap-15",style:z?{}:{width:"80%"}},r.createElement("div",{className:"left"},!window.location.href.includes("employee/user/login")&&!window.location.href.includes("employee/user/language-selection")&&r.createElement(b,{dropdown:!0,t:m})),r.createElement("div",{className:"left"},D&&r.createElement(C,{dropdown:!0})),(null==E?void 0:E.access_token)&&r.createElement("div",{className:"left"},r.createElement(t.Dropdown,{option:w,optionKey:"name",select:N,showArrow:!0,freeze:!0,style:{},optionCardStyles:{overflow:"revert",display:"table"},topbarOptionsClassName:"topbarOptionsClassName",customSelector:null==T?r.createElement(O,{name:(null==E||null===(s=E.info)||void 0===s?void 0:s.name)||(null==E||null===(d=E.info)||void 0===d||null===(f=d.userInfo)||void 0===f?void 0:f.name)||"Employee"}):r.createElement("img",{src:T,style:{height:"48px",width:"48px",borderRadius:"50%"}}),showIcon:!0})),r.createElement("img",{className:"state",src:I}))))},w=(e,n,i,o)=>{var l,a;return[{type:"link",element:"HOME",text:e("COMMON_BOTTOM_NAVIGATION_HOME"),link:o?"/"+(null===(l=window)||void 0===l?void 0:l.contextPath)+"/employee":"/"+(null===(a=window)||void 0===a?void 0:a.contextPath)+"/citizen",icon:"HomeIcon",populators:{onClick:n}},{type:"component",element:"LANGUAGE",action:r.createElement(C,null),icon:"LanguageIcon"},{id:"login-btn",element:"LOGIN",text:e("CORE_COMMON_LOGIN"),icon:r.createElement(t.LogoutIcon,{className:"icon"}),populators:{onClick:i}}]},N="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAO4AAADUCAMAAACs0e/bAAAAM1BMVEXK0eL////Dy97GzuD4+fvL0uPg5O7T2efb4OvR1+Xr7vTk5/Df4+37/P3v8fbO1eTt8PUsnq5FAAAGqElEQVR4nO2d25ajIBBFCajgvf//a0eMyZgEjcI5xgt7Hmatme507UaxuJXidiDqjmSgeVIMlB1ZR1WZAf2gbdu0QwixSYzjOJPmHurfEGEfY9XzjNGG9whQCeVAuv5xQEySLtR9hPuIcwj0EeroN5m3D1IbsbgHK0esiQ9MKsqXVr8Hm/a/Pulk6wihpCIXBw3dh7bTvRBt9+dC5NfS1VH3xETdM3MxXRN1T0zUPTNR98xcS1dlV9NNfx3DhkTdM6PKqHteVBF1z0vU5f0sKdpc2zWLKutXrjJjdLvpesRmukqYonauPhXpdsLb6CppmpnltsYIuY2yavi6Mi2/rzAWm1zUfF0limVLqkZyA+mDYevKBS37aGC+L1lX5e7uyU1Cv565uiua9k5LFqbqqrnu2I3m+jJ11ZoLeRtfmdB0Uw/ZDsP0VTxdn7a1VERfmq7XlXyn5D2QWLoq8bZlPoBJumphJjVBw/Ll6CoTZGsTDs4NrGqKbqBth8ZHJUi6cn168QmleSm6GmB7Kxm+6obXlf7PoDHosCwM3QpiS2legi6ocSl3L0G3BdneDDgwQdENfeY+SfDJBkF37ZB+GvwzA6/rMaafAn8143VhPZWdjMWG1oHXhdnemgPoAvLlB/iZyRTfVeF06wPoQhJmlm4bdcOAZRlRN5gcPc5SoPEQR1fDdbOo6wn+uYvXxY0QCLom6gYROKH+Aj5nvphuFXWDiLpRdxl/19LFT95k6CHCrnW7pCDqBn1i1PUFvii2c11oZOJ6usWeH0RRNzC4Zs+6FTi2nevCVwCjbugnXklX5fkfTldL8PEilUB1kfNyN1u9MME2sATr4lbuB7AjfLAuvsRm1A0g6gYRdcPAjvBlje2Z8brI8OC68AcRdlCkwLohx2mcZMjw9q+LzarQurjtnwPYAydX08WecECO/u6Ad0GBdYG7jO5gB4Ap+PwKcA9ZT43dn4/W9TyiPAn4OAJaF7h3uwe8StSCddFdM3jqFa2LvnnB5zzhuuBBAjY4gi50cg694gnXhTYvfMdrjtcFZhrwE9r41gUem8IXWMC3LrBzxh+a0gRd1N1LOK7M0IUUGuggvEmHoStA2/MJh7MpupiDU4TzjhxdzLAoO4ouZvqVURbFMHQlZD6SUeWHoguZsSLUGegrehA+FZFowPdUWTi6iMoZlIpGGUUXkDbjj/9ZOLqAQS/+GIKl5BQOCn/ycqpzkXSDm5dU7ZWkG7wUyGlcmm7g5Ux56AqirgoaJ7BeokPTDbp9CbVunjFxPrl7+HqnkrSq1Da7JX20f3dV8yJi6voO81mX8vV0mx3qUsZCPRfTlVRdz2EvdufYGDvNQvvwqHtmXd+a1ITinwNcXc+lT6JuzdT1XDyBn/x7wtX1HCQQdW9MXc8xArGrirowfLeUEbMqqq6f7TF1lfRdOuGNiGi6SpT+WxY06xUfNN2wBfyE9I4tlm7w5hvOPDNJN3yNiLMipji6gE3chKhouoCtN5x3QlF0EZt8OW/8ougitqJQlk1aii7iFC9l0MvRReyao7xNjKML2Z/PuHlzhi5mFxljiZeiC9rPTEisNEMX9KYAwo5Xhi7qaA3hamboYm7dG+NVrXhdaYDv5zFaQZsYrCtbbAGnjkQDX2+J1FXCwOsqWOpKoIQNTFdqYBWydxqNqUoG0pVpCS+H8kaJaGKErlIaXj7CRRE+gRWuKwW9YZ80oVOUgbpdT0zpnSZJTIiwCtJVelvXntr4P5j6BWfPb5Wcx84C4cq3hb11lco2u2Mdwp6XdJ/Ne3wb8DWdfiRenZaXrhLwOj4e+GQeHroy3YOspS7TlU28Wle2m2QUS0mqdcbrdNW+ZHsSsyK7tBfm0q/dWcv+Z3mytVx3t7KWulqUe6ilunu8jF8pFwgv1FXp3mUt35OtRbr7eM4u4Gs6vUBXgeuHc5kfE/cbvWZtkROLm1DMtLCy80tzsu2PRj0hTI8fvrQuvsjlJkyutszq+m423wHaLTyniy/XuiGZ84LuT+m5ZfNfRxyGs7LXZOvia7VujatUwVTrIt+Q/Csc7Tuhe+BOakT10b4TuoiiJjvgU9emTO42PwEfBa+cuodKkuf42DXr1D3JpXz73Hnn0j10evHKe+nufgfUm+7B84sX9FfdEzXux2DBpWuKokkCqN/5pa/8pmvnL+RGKCddCGmatiPyPB/+ekO/M/q/7uvbt22kTt3zEnXPzCV13T3Gel4/6NduDu66xRvlPNkM1RjjxUdv+4WhGx6TftD19Q/dfzpwcHO+rE3fAAAAAElFTkSuQmCC";function I(){return(I=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}const D=e=>{let{onSelect:n,onCancel:o,onDismiss:l,PopupStyles:a,isDisabled:u,hideSubmit:c}=e;const{t:s}=i.useTranslation(),d=[r.createElement("div",null,r.createElement(t.CardText,null,s("CORE_LOGOUT_WEB_CONFIRMATION_MESSAGE")+" ",r.createElement("strong",null,s("CORE_LOGOUT_MESSAGE"))))],f=[r.createElement(t.Button,{type:"button",size:"large",variation:"digit-action-cancel",label:s("CORE_LOGOUT_CANCEL"),className:"logout-cancel-button",onClick:o}),r.createElement(t.Button,{type:"button",size:"large",variation:"primary",label:s("CORE_LOGOUT_WEB_YES"),formId:"modal-action",onClick:n,isDisabled:u})],m=[r.createElement(t.Button,{type:"button",size:"large",variation:"digit-action-cancel",label:s("CORE_LOGOUT_CANCEL"),className:"logout-cancel-button",onClick:o})];return r.createElement(t.PopUp,{type:"default",children:d,heading:s("CORE_LOGOUT_WEB_HEADER"),footerChildren:c?m:f,sortFooterButtons:!0,onClose:l,className:"digit-logout-popup-wrapper",onOverlayClick:l,style:a})},T=e=>{let{info:t,t:n}=e;return r.createElement("div",{className:"profile-section"},r.createElement("div",{className:"imageloader imageloader-loaded"},r.createElement("img",{className:"img-responsive img-circle img-Profile",src:N})),r.createElement("div",{id:"profile-name",className:"label-container name-Profile"},r.createElement("div",{className:"label-text"}," ",null==t?void 0:t.name," ")),r.createElement("div",{id:"profile-location",className:"label-container loc-Profile"},r.createElement("div",{className:"label-text"}," ",null==t?void 0:t.mobileNumber," ")),(null==t?void 0:t.emailId)&&r.createElement("div",{id:"profile-emailid",className:"label-container loc-Profile"},r.createElement("div",{className:"label-text"}," ",t.emailId," ")),r.createElement("div",{className:"profile-divider"}),window.location.href.includes("/employee")&&!window.location.href.includes("/employee/user/login")&&!window.location.href.includes("employee/user/language-selection")&&r.createElement(b,{t:n,mobileView:!0}))},A={CommonPTIcon:r.createElement(t.PTIcon,{className:"icon"}),OBPSIcon:r.createElement(t.OBPSIcon,{className:"icon"}),propertyIcon:r.createElement(t.PropertyHouse,{className:"icon"}),TLIcon:r.createElement(t.CaseIcon,{className:"icon"}),PGRIcon:r.createElement(t.PGRIcon,{className:"icon"}),FSMIcon:r.createElement(t.FSMIcon,{className:"icon"}),WSIcon:r.createElement(t.WSICon,{className:"icon"}),MCollectIcon:r.createElement(t.MCollectIcon,{className:"icon"}),BillsIcon:r.createElement(t.CollectionIcon,{className:"icon"}),BirthIcon:r.createElement(t.BirthIcon,{className:"icon"}),DeathIcon:r.createElement(t.DeathIcon,{className:"icon"}),FirenocIcon:r.createElement(t.FirenocIcon,{className:"icon"}),HomeIcon:r.createElement(t.HomeIcon,{className:"icon"}),EditPencilIcon:r.createElement(t.EditPencilIcon,{className:"icon"}),LogoutIcon:r.createElement(t.LogoutIcon,{className:"icon"}),Phone:r.createElement(t.Phone,{className:"icon"})},L=e=>{var o,l,u;let{linkData:c,islinkDataLoading:s}=e;const{t:d}=i.useTranslation(),f=a.useHistory(),m=a.useLocation(),{pathname:v}=m,{data:p,isFetched:g}=Digit.Hooks.useStore.getInitData(),{stateInfo:h}=p||{},E=Digit.UserService.getUser();let y=window.Digit.Utils.browser.isMobile();const[_,b]=n.useState(!1),[C,O]=n.useState(!1),[S,N]=n.useState(!1),L=()=>{N(!1)};if(s)return r.createElement(t.Loader,null);const R=()=>{var e;f.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/citizen/user/profile")};let x=[...w(d,R,()=>{var e;f.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/citizen/login")},_)];x=x.filter(e=>"LANGUAGE"!==e.element),Digit.ULBService.getCurrentTenantId();const P=e=>{var t,n;let{item:i}=e;const o=(null==i?void 0:i.icon)||(null===(t=i.icon)||void 0===t||null===(n=t.type)||void 0===n?void 0:n.name),l=o?A[o]:A.BillsIcon;let u;u="component"===i.type?i.action:i.text;const c=()=>r.createElement("span",I({className:"menu-item"},i.populators),l,r.createElement("div",{className:"menu-label"},u));return"external-link"===i.type?r.createElement("a",{href:i.link},r.createElement(c,null)):"link"===i.type?r.createElement(a.Link,{to:null==i?void 0:i.link},r.createElement(c,null)):r.createElement(c,null)};let M;return g&&E&&E.access_token&&(M=r.createElement(T,{info:null==E?void 0:E.info,stateName:null==h?void 0:h.name,t:d}),x=x.filter(e=>"login-btn"!==(null==e?void 0:e.id)),x=[...x,{text:d("EDIT_PROFILE"),element:"PROFILE",icon:"EditPencilIcon",populators:{onClick:R}},{text:d("CORE_COMMON_LOGOUT"),element:"LOGOUT",icon:"LogoutIcon",populators:{onClick:()=>{O(!1),N(!0)}}},{text:r.createElement(r.Fragment,null,d("CS_COMMON_HELPLINE"),r.createElement("div",{className:"telephone",style:{marginTop:"-10%"}},null==p?void 0:p.tenants.map(e=>{}),r.createElement("div",{className:"link"},r.createElement("a",{href:"tel:"+(null==p?void 0:p.tenants[0].contactNumber)},null==p?void 0:p.tenants[0].contactNumber)))),element:"Helpline",icon:"Phone"}]),null===(o=Object.keys(c))||void 0===o||null===(l=o.sort((e,t)=>t.localeCompare(e)))||void 0===l||l.map(e=>{var t,n,r,i,o,l;(null===(t=c[e][0])||void 0===t?void 0:t.sidebar)===window.contextPath+"-links"&&x.splice(1,0,{type:null!==(n=c[e][0])&&void 0!==n&&null!==(r=n.sidebarURL)&&void 0!==r&&r.includes(null===(i=window)||void 0===i?void 0:i.contextPath)?"link":"external-link",text:d("ACTION_TEST_"+Digit.Utils.locale.getTransformedLocale(e)),links:c[e],icon:null===(o=c[e][0])||void 0===o?void 0:o.leftIcon,link:null===(l=c[e][0])||void 0===l?void 0:l.sidebarURL})}),r.createElement(r.Fragment,null,r.createElement("div",null,r.createElement("div",{style:{height:"100%",width:"100%",top:"0px",backgroundColor:"rgba(0, 0, 0, 0.54)",pointerzevents:"auto"}}),r.createElement("div",{style:{display:"flex",flexDirection:"column",height:y?"calc(100vh - 56px)":"auto",zIndex:"99"}},M,r.createElement("div",{className:"drawer-desktop"},null===(u=x)||void 0===u?void 0:u.map((e,t)=>r.createElement("div",{className:"sidebar-list "+(v===(null==e?void 0:e.link)||v===(null==e?void 0:e.sidebarURL)?"active":""),key:t},r.createElement(P,{item:e}))))),r.createElement("div",null,S&&r.createElement(D,{onSelect:()=>{Digit.UserService.logout(),N(!1)},onCancel:L,onDismiss:L}))))},R=e=>{var t;let{info:n,t:i}=e;const[o,l]=r.useState(null);r.useEffect(function(){try{const e=Digit.ULBService.getCurrentTenantId(),t=null==n?void 0:n.uuid,r=function(){if(t)return Promise.resolve(Digit.UserService.userSearch(e,{uuid:[t]},{})).then(function(e){if(e&&e.user&&e.user.length){var t;const n=e.user[0],r=null==n||null===(t=n.photo)||void 0===t?void 0:t.split(",");l(null==r?void 0:r.at(0))}})}();return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},[null!==o]);const a=null===(t=Digit.ComponentRegistryService)||void 0===t?void 0:t.getComponent("CustomEmployeeTopBar");return r.createElement("div",{className:"profile-section"},r.createElement("div",{className:"imageloader imageloader-loaded"},r.createElement("img",{className:"img-responsive img-circle img-Profile",src:o||N,style:{objectFit:"cover",objectPosition:"center"}})),r.createElement("div",{id:"profile-name",className:"label-container name-Profile"},r.createElement("div",{className:"label-text"}," ",null==n?void 0:n.name," ")),r.createElement("div",{id:"profile-location",className:"label-container loc-Profile"},r.createElement("div",{className:"label-text"}," ",null==n?void 0:n.mobileNumber," ")),(null==n?void 0:n.emailId)&&r.createElement("div",{id:"profile-emailid",className:"label-container loc-Profile"},r.createElement("div",{className:"label-text"}," ",n.emailId," ")),r.createElement("div",{className:"profile-divider"}),window.location.href.includes("/employee")&&!window.location.href.includes("/employee/user/login")&&!window.location.href.includes("employee/user/language-selection")&&!a&&r.createElement(b,{t:i,mobileView:!0}))},x=()=>{var e,t,n;return r.createElement("div",{className:"digit-footer",style:{marginBottom:0}},r.createElement("img",{alt:"Powered by DIGIT",src:null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_FOOTER"),style:{cursor:"pointer"},onClick:()=>{var e,t,n;window.open(null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_HOME_URL"),"_blank").focus()}})," ")},P=e=>{let{isOpen:o,isMobile:l=!1,toggleSidebar:c,onLogout:s,isEmployee:d=!1,linkData:f,islinkDataLoading:m}=e;const{data:v,isFetched:p}=Digit.Hooks.useStore.getInitData(),{stateInfo:g}=v||{},h=Digit.UserService.getUser(),[E,y]=n.useState(""),{t:_}=i.useTranslation(),b=a.useHistory(),C=()=>{Digit.clikOusideFired=!0,c(!1)},{isLoading:O,data:S}=Digit.Hooks.useAccessControl(),N=(Digit.ULBService.getCurrentTenantId(),()=>{var e,t;const n=d?"/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/user/profile":"/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/citizen/user/profile";b.push(n),C()});if(m||O)return r.createElement(t.Loader,null);let I,D=[...w(_,C,()=>{var e;b.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/citizen/login"),C()},d)];p&&h&&h.access_token&&(I=r.createElement(R,{info:null==h?void 0:h.info,stateName:null==g?void 0:g.name,t:_}),D=D.filter(e=>"login-btn"!==(null==e?void 0:e.id)),D=[...D,{text:_("EDIT_PROFILE"),element:"PROFILE",icon:"EditPencilIcon",populators:{onClick:N}},{text:_("CORE_COMMON_LOGOUT"),element:"LOGOUT",icon:"LogoutIcon",populators:{onClick:s}},{text:r.createElement(r.Fragment,null,_("CS_COMMON_HELPLINE"),r.createElement("div",{className:"telephone",style:{marginTop:"-10%"}},null==v?void 0:v.tenants.map(e=>{}),r.createElement("div",{className:"link"},r.createElement("a",{href:"tel:"+(null==v?void 0:v.tenants[0].contactNumber)},null==v?void 0:v.tenants[0].contactNumber)))),element:"Helpline",icon:"Phone"}]);let T={};if(d){var A;null==S||S.actions.filter(e=>"url"===e.url&&"Home"!==e.displayName).forEach(e=>{var t;if(""==E&&""!==e.path){let t=e.path.split(".")[0];"TradeLicense"===t&&(t="Trade License"),T[t]?T[t].push(e):T[t]=[e]}else if(""!==e.path&&null!=e&&null!==(t=e.displayName)&&void 0!==t&&t.toLowerCase().includes(E.toLowerCase())){let t=e.path.split(".")[0];"TradeLicense"===t&&(t="Trade License"),T[t]?T[t].push(e):T[t]=[e]}});const e=Object.keys(T);for(let t=0;t<e.length;t++){var P,M,k,U,B;const n=null===(P=T[e[t]][0])||void 0===P||null===(M=P.displayName)||void 0===M||null===(k=M.toUpperCase())||void 0===k?void 0:k.replace(/[ -]/g,"_"),r=null===(U=e[t])||void 0===U||null===(B=U.toUpperCase())||void 0===B?void 0:B.replace(/[ -]/g,"_");var j,F,V,z,W,H,G;-1===T[e[t]][0].path.indexOf(".")?D.splice(1,0,{type:"link",text:_("ACTION_TEST_"+n),link:null===(j=T[e[t]][0])||void 0===j?void 0:j.navigationURL,icon:null===(F=T[e[t]][0])||void 0===F||null===(V=F.leftIcon)||void 0===V||null===(z=(W=V).split)||void 0===z?void 0:z.call(W,":")[1],populators:{onClick:()=>{var n;b.push(null===(n=T[e[t]][0])||void 0===n?void 0:n.navigationURL),C()}}}):D.splice(1,0,{type:"dynamic",moduleName:_("ACTION_TEST_"+r),links:null===(H=T[e[t]])||void 0===H?void 0:H.map(e=>{var t,n;return{...e,displayName:_("ACTION_TEST_"+(null==e||null===(t=e.displayName)||void 0===t||null===(n=t.toUpperCase())||void 0===n?void 0:n.replace(/[ -]/g,"_")))}}),icon:null===(G=T[e[t]][1])||void 0===G?void 0:G.leftIcon})}const t=D.findIndex(e=>"HOME"===e.element),n=D.splice(t,1),r=D.findIndex(e=>"LANGUAGE"===e.element),i=D.splice(r,(null===(A=D)||void 0===A?void 0:A.length)-r);D.sort((e,t)=>("dynamic"===(null==e?void 0:e.type)?null==e?void 0:e.moduleName:null==e?void 0:e.text).localeCompare("dynamic"===(null==t?void 0:t.type)?null==t?void 0:t.moduleName:null==t?void 0:t.text)),(null==n?void 0:n[0])&&D.splice(0,0,n[0]),D=(null==i?void 0:i.length)>0?D.concat(i):D}else{var q,Z;null===(q=Object.keys(f))||void 0===q||null===(Z=q.sort((e,t)=>t.localeCompare(e)))||void 0===Z||Z.map(e=>{var t,n,r,i,o,l;"digit-ui-links"===(null===(t=f[e][0])||void 0===t?void 0:t.sidebar)&&D.splice(1,0,{type:null!==(n=f[e][0])&&void 0!==n&&null!==(r=n.sidebarURL)&&void 0!==r&&r.includes(null===(i=window)||void 0===i?void 0:i.contextPath)?"link":"external-link",text:_("ACTION_TEST_"+Digit.Utils.locale.getTransformedLocale(e)),links:f[e],icon:null===(o=f[e][0])||void 0===o?void 0:o.leftIcon,link:null===(l=f[e][0])||void 0===l?void 0:l.sidebarURL})})}return b.location.pathname.includes("/openlink")&&(I=r.createElement("span",null),D=D.filter(e=>"LANGUAGE"===e.element)),l?r.createElement(u.NavBar,{open:o,toggleSidebar:c,profileItem:I,onClose:C,menuItems:D,Footer:r.createElement(x,null),isEmployee:d,search:E,setSearch:y}):r.createElement(L,{logout:s})};var M="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function k(e,t){return e(t={exports:{}},t.exports),t.exports}k(function(e,t){(function(){var n="Expected a function",r="__lodash_placeholder__",i=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],o="[object Arguments]",l="[object Array]",a="[object Boolean]",u="[object Date]",c="[object Error]",s="[object Function]",d="[object GeneratorFunction]",f="[object Map]",m="[object Number]",v="[object Object]",p="[object RegExp]",g="[object Set]",h="[object String]",E="[object Symbol]",y="[object WeakMap]",_="[object ArrayBuffer]",b="[object DataView]",C="[object Float32Array]",O="[object Float64Array]",S="[object Int8Array]",w="[object Int16Array]",N="[object Int32Array]",I="[object Uint8Array]",D="[object Uint16Array]",T="[object Uint32Array]",A=/\b__p \+= '';/g,L=/\b(__p \+=) '' \+/g,R=/(__e\(.*?\)|\b__t\)) \+\n'';/g,x=/&(?:amp|lt|gt|quot|#39);/g,P=/[&<>"']/g,k=RegExp(x.source),U=RegExp(P.source),B=/<%-([\s\S]+?)%>/g,j=/<%([\s\S]+?)%>/g,F=/<%=([\s\S]+?)%>/g,V=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,z=/^\w*$/,W=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,H=/[\\^$.*+?()[\]{}|]/g,G=RegExp(H.source),q=/^\s+/,Z=/\s/,X=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,$=/\{\n\/\* \[wrapped with (.+)\] \*/,Y=/,? & /,K=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,J=/[()=,{}\[\]\/\s]/,Q=/\\(\\)?/g,ee=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,te=/\w*$/,ne=/^[-+]0x[0-9a-f]+$/i,re=/^0b[01]+$/i,ie=/^\[object .+?Constructor\]$/,oe=/^0o[0-7]+$/i,le=/^(?:0|[1-9]\d*)$/,ae=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ue=/($^)/,ce=/['\n\r\u2028\u2029\\]/g,se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",de="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",fe="["+de+"]",me="["+se+"]",ve="\\d+",pe="[a-z\\xdf-\\xf6\\xf8-\\xff]",ge="[^\\ud800-\\udfff"+de+ve+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",he="\\ud83c[\\udffb-\\udfff]",Ee="[^\\ud800-\\udfff]",ye="(?:\\ud83c[\\udde6-\\uddff]){2}",_e="[\\ud800-\\udbff][\\udc00-\\udfff]",be="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Ce="(?:"+pe+"|"+ge+")",Oe="(?:"+be+"|"+ge+")",Se="(?:"+me+"|"+he+")?",we="[\\ufe0e\\ufe0f]?"+Se+"(?:\\u200d(?:"+[Ee,ye,_e].join("|")+")[\\ufe0e\\ufe0f]?"+Se+")*",Ne="(?:"+["[\\u2700-\\u27bf]",ye,_e].join("|")+")"+we,Ie="(?:"+[Ee+me+"?",me,ye,_e,"[\\ud800-\\udfff]"].join("|")+")",De=RegExp("['’]","g"),Te=RegExp(me,"g"),Ae=RegExp(he+"(?="+he+")|"+Ie+we,"g"),Le=RegExp([be+"?"+pe+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[fe,be,"$"].join("|")+")",Oe+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[fe,be+Ce,"$"].join("|")+")",be+"?"+Ce+"+(?:['’](?:d|ll|m|re|s|t|ve))?",be+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ve,Ne].join("|"),"g"),Re=RegExp("[\\u200d\\ud800-\\udfff"+se+"\\ufe0e\\ufe0f]"),xe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Pe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Me=-1,ke={};ke[C]=ke[O]=ke[S]=ke[w]=ke[N]=ke[I]=ke["[object Uint8ClampedArray]"]=ke[D]=ke[T]=!0,ke[o]=ke[l]=ke[_]=ke[a]=ke[b]=ke[u]=ke[c]=ke[s]=ke[f]=ke[m]=ke[v]=ke[p]=ke[g]=ke[h]=ke[y]=!1;var Ue={};Ue[o]=Ue[l]=Ue[_]=Ue[b]=Ue[a]=Ue[u]=Ue[C]=Ue[O]=Ue[S]=Ue[w]=Ue[N]=Ue[f]=Ue[m]=Ue[v]=Ue[p]=Ue[g]=Ue[h]=Ue[E]=Ue[I]=Ue["[object Uint8ClampedArray]"]=Ue[D]=Ue[T]=!0,Ue[c]=Ue[s]=Ue[y]=!1;var Be={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},je=parseFloat,Fe=parseInt,Ve="object"==typeof M&&M&&M.Object===Object&&M,ze="object"==typeof self&&self&&self.Object===Object&&self,We=Ve||ze||Function("return this")(),He=t&&!t.nodeType&&t,Ge=He&&e&&!e.nodeType&&e,qe=Ge&&Ge.exports===He,Ze=qe&&Ve.process,Xe=function(){try{return Ge&&Ge.require&&Ge.require("util").types||Ze&&Ze.binding&&Ze.binding("util")}catch(e){}}(),$e=Xe&&Xe.isArrayBuffer,Ye=Xe&&Xe.isDate,Ke=Xe&&Xe.isMap,Je=Xe&&Xe.isRegExp,Qe=Xe&&Xe.isSet,et=Xe&&Xe.isTypedArray;function tt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function nt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var l=e[i];t(r,l,n(l),e)}return r}function rt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function it(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function ot(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function lt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var l=e[n];t(l,n,e)&&(o[i++]=l)}return o}function at(e,t){return!(null==e||!e.length)&&ht(e,t,0)>-1}function ut(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function ct(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function st(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function dt(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function ft(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function mt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var vt=bt("length");function pt(e,t,n){var r;return n(e,function(e,n,i){if(t(e,n,i))return r=n,!1}),r}function gt(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function ht(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):gt(e,yt,n)}function Et(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function yt(e){return e!=e}function _t(e,t){var n=null==e?0:e.length;return n?St(e,t)/n:NaN}function bt(e){return function(t){return null==t?void 0:t[e]}}function Ct(e){return function(t){return null==e?void 0:e[t]}}function Ot(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}function St(e,t){for(var n,r=-1,i=e.length;++r<i;){var o=t(e[r]);void 0!==o&&(n=void 0===n?o:n+o)}return n}function wt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Nt(e){return e?e.slice(0,Ht(e)+1).replace(q,""):e}function It(e){return function(t){return e(t)}}function Dt(e,t){return ct(t,function(t){return e[t]})}function Tt(e,t){return e.has(t)}function At(e,t){for(var n=-1,r=e.length;++n<r&&ht(t,e[n],0)>-1;);return n}function Lt(e,t){for(var n=e.length;n--&&ht(t,e[n],0)>-1;);return n}function Rt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var xt=Ct({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Pt=Ct({"&":"&","<":"<",">":">",'"':""","'":"'"});function Mt(e){return"\\"+Be[e]}function kt(e){return Re.test(e)}function Ut(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function Bt(e,t){return function(n){return e(t(n))}}function jt(e,t){for(var n=-1,i=e.length,o=0,l=[];++n<i;){var a=e[n];a!==t&&a!==r||(e[n]=r,l[o++]=n)}return l}function Ft(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function Vt(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function zt(e){return kt(e)?function(e){for(var t=Ae.lastIndex=0;Ae.test(e);)++t;return t}(e):vt(e)}function Wt(e){return kt(e)?function(e){return e.match(Ae)||[]}(e):function(e){return e.split("")}(e)}function Ht(e){for(var t=e.length;t--&&Z.test(e.charAt(t)););return t}var Gt=Ct({"&":"&","<":"<",">":">",""":'"',"'":"'"}),qt=function e(t){var M,Z=(t=null==t?We:qt.defaults(We.Object(),t,qt.pick(We,Pe))).Array,se=t.Date,de=t.Error,fe=t.Function,me=t.Math,ve=t.Object,pe=t.RegExp,ge=t.String,he=t.TypeError,Ee=Z.prototype,ye=ve.prototype,_e=t["__core-js_shared__"],be=fe.prototype.toString,Ce=ye.hasOwnProperty,Oe=0,Se=(M=/[^.]+$/.exec(_e&&_e.keys&&_e.keys.IE_PROTO||""))?"Symbol(src)_1."+M:"",we=ye.toString,Ne=be.call(ve),Ie=We._,Ae=pe("^"+be.call(Ce).replace(H,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Re=qe?t.Buffer:void 0,Be=t.Symbol,Ve=t.Uint8Array,ze=Re?Re.allocUnsafe:void 0,He=Bt(ve.getPrototypeOf,ve),Ge=ve.create,Ze=ye.propertyIsEnumerable,Xe=Ee.splice,vt=Be?Be.isConcatSpreadable:void 0,Ct=Be?Be.iterator:void 0,Zt=Be?Be.toStringTag:void 0,Xt=function(){try{var e=Ji(ve,"defineProperty");return e({},"",{}),e}catch(e){}}(),$t=t.clearTimeout!==We.clearTimeout&&t.clearTimeout,Yt=se&&se.now!==We.Date.now&&se.now,Kt=t.setTimeout!==We.setTimeout&&t.setTimeout,Jt=me.ceil,Qt=me.floor,en=ve.getOwnPropertySymbols,tn=Re?Re.isBuffer:void 0,nn=t.isFinite,rn=Ee.join,on=Bt(ve.keys,ve),ln=me.max,an=me.min,un=se.now,cn=t.parseInt,sn=me.random,dn=Ee.reverse,fn=Ji(t,"DataView"),mn=Ji(t,"Map"),vn=Ji(t,"Promise"),pn=Ji(t,"Set"),gn=Ji(t,"WeakMap"),hn=Ji(ve,"create"),En=gn&&new gn,yn={},_n=Do(fn),bn=Do(mn),Cn=Do(vn),On=Do(pn),Sn=Do(gn),wn=Be?Be.prototype:void 0,Nn=wn?wn.valueOf:void 0,In=wn?wn.toString:void 0;function Dn(e){if(Gl(e)&&!Pl(e)&&!(e instanceof Rn)){if(e instanceof Ln)return e;if(Ce.call(e,"__wrapped__"))return To(e)}return new Ln(e)}var Tn=function(){function e(){}return function(t){if(!Hl(t))return{};if(Ge)return Ge(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function An(){}function Ln(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Rn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function xn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Pn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Mn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function kn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Mn;++t<n;)this.add(e[t])}function Un(e){var t=this.__data__=new Pn(e);this.size=t.size}function Bn(e,t){var n=Pl(e),r=!n&&xl(e),i=!n&&!r&&Bl(e),o=!n&&!r&&!i&&Ql(e),l=n||r||i||o,a=l?wt(e.length,ge):[],u=a.length;for(var c in e)!t&&!Ce.call(e,c)||l&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||oo(c,u))||a.push(c);return a}function jn(e){var t=e.length;return t?e[Mr(0,t-1)]:void 0}function Fn(e,t){return Oo(gi(e),$n(t,0,e.length))}function Vn(e){return Oo(gi(e))}function zn(e,t,n){(void 0!==n&&!Al(e[t],n)||void 0===n&&!(t in e))&&Zn(e,t,n)}function Wn(e,t,n){var r=e[t];Ce.call(e,t)&&Al(r,n)&&(void 0!==n||t in e)||Zn(e,t,n)}function Hn(e,t){for(var n=e.length;n--;)if(Al(e[n][0],t))return n;return-1}function Gn(e,t,n,r){return er(e,function(e,i,o){t(r,e,n(e),o)}),r}function qn(e,t){return e&&hi(t,ba(t),e)}function Zn(e,t,n){"__proto__"==t&&Xt?Xt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Xn(e,t){for(var n=-1,r=t.length,i=Z(r),o=null==e;++n<r;)i[n]=o?void 0:ga(e,t[n]);return i}function $n(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}function Yn(e,t,n,r,i,l){var c,y=1&t,A=2&t,L=4&t;if(n&&(c=i?n(e,r,i,l):n(e)),void 0!==c)return c;if(!Hl(e))return e;var R=Pl(e);if(R){if(c=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ce.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!y)return gi(e,c)}else{var x=to(e),P=x==s||x==d;if(Bl(e))return si(e,y);if(x==v||x==o||P&&!i){if(c=A||P?{}:ro(e),!y)return A?function(e,t){return hi(e,eo(e),t)}(e,function(e,t){return e&&hi(t,Ca(t),e)}(c,e)):function(e,t){return hi(e,Qi(e),t)}(e,qn(c,e))}else{if(!Ue[x])return i?e:{};c=function(e,t,n){var r=e.constructor;switch(t){case _:return di(e);case a:case u:return new r(+e);case b:return function(e,t){var n=t?di(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case C:case O:case S:case w:case N:case I:case"[object Uint8ClampedArray]":case D:case T:return fi(e,n);case f:return new r;case m:case h:return new r(e);case p:return function(e){var t=new e.constructor(e.source,te.exec(e));return t.lastIndex=e.lastIndex,t}(e);case g:return new r;case E:return Nn?ve(Nn.call(e)):{}}}(e,x,y)}}l||(l=new Un);var M=l.get(e);if(M)return M;l.set(e,c),Yl(e)?e.forEach(function(r){c.add(Yn(r,t,n,r,e,l))}):ql(e)&&e.forEach(function(r,i){c.set(i,Yn(r,t,n,i,e,l))});var k=R?void 0:(L?A?Gi:Hi:A?Ca:ba)(e);return rt(k||e,function(r,i){k&&(r=e[i=r]),Wn(c,i,Yn(r,t,n,i,e,l))}),c}function Kn(e,t,n){var r=n.length;if(null==e)return!r;for(e=ve(e);r--;){var i=n[r],o=e[i];if(void 0===o&&!(i in e)||!(0,t[i])(o))return!1}return!0}function Jn(e,t,r){if("function"!=typeof e)throw new he(n);return yo(function(){e.apply(void 0,r)},t)}function Qn(e,t,n,r){var i=-1,o=at,l=!0,a=e.length,u=[],c=t.length;if(!a)return u;n&&(t=ct(t,It(n))),r?(o=ut,l=!1):t.length>=200&&(o=Tt,l=!1,t=new kn(t));e:for(;++i<a;){var s=e[i],d=null==n?s:n(s);if(s=r||0!==s?s:0,l&&d==d){for(var f=c;f--;)if(t[f]===d)continue e;u.push(s)}else o(t,d,r)||u.push(s)}return u}Dn.templateSettings={escape:B,evaluate:j,interpolate:F,variable:"",imports:{_:Dn}},(Dn.prototype=An.prototype).constructor=Dn,(Ln.prototype=Tn(An.prototype)).constructor=Ln,(Rn.prototype=Tn(An.prototype)).constructor=Rn,xn.prototype.clear=function(){this.__data__=hn?hn(null):{},this.size=0},xn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},xn.prototype.get=function(e){var t=this.__data__;if(hn){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Ce.call(t,e)?t[e]:void 0},xn.prototype.has=function(e){var t=this.__data__;return hn?void 0!==t[e]:Ce.call(t,e)},xn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=hn&&void 0===t?"__lodash_hash_undefined__":t,this},Pn.prototype.clear=function(){this.__data__=[],this.size=0},Pn.prototype.delete=function(e){var t=this.__data__,n=Hn(t,e);return!(n<0||(n==t.length-1?t.pop():Xe.call(t,n,1),--this.size,0))},Pn.prototype.get=function(e){var t=this.__data__,n=Hn(t,e);return n<0?void 0:t[n][1]},Pn.prototype.has=function(e){return Hn(this.__data__,e)>-1},Pn.prototype.set=function(e,t){var n=this.__data__,r=Hn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Mn.prototype.clear=function(){this.size=0,this.__data__={hash:new xn,map:new(mn||Pn),string:new xn}},Mn.prototype.delete=function(e){var t=Yi(this,e).delete(e);return this.size-=t?1:0,t},Mn.prototype.get=function(e){return Yi(this,e).get(e)},Mn.prototype.has=function(e){return Yi(this,e).has(e)},Mn.prototype.set=function(e,t){var n=Yi(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},kn.prototype.add=kn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},kn.prototype.has=function(e){return this.__data__.has(e)},Un.prototype.clear=function(){this.__data__=new Pn,this.size=0},Un.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Un.prototype.get=function(e){return this.__data__.get(e)},Un.prototype.has=function(e){return this.__data__.has(e)},Un.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Pn){var r=n.__data__;if(!mn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Mn(r)}return n.set(e,t),this.size=n.size,this};var er=_i(ur),tr=_i(cr,!0);function nr(e,t){var n=!0;return er(e,function(e,r,i){return n=!!t(e,r,i)}),n}function rr(e,t,n){for(var r=-1,i=e.length;++r<i;){var o=e[r],l=t(o);if(null!=l&&(void 0===a?l==l&&!Jl(l):n(l,a)))var a=l,u=o}return u}function ir(e,t){var n=[];return er(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function or(e,t,n,r,i){var o=-1,l=e.length;for(n||(n=io),i||(i=[]);++o<l;){var a=e[o];t>0&&n(a)?t>1?or(a,t-1,n,r,i):st(i,a):r||(i[i.length]=a)}return i}var lr=bi(),ar=bi(!0);function ur(e,t){return e&&lr(e,t,ba)}function cr(e,t){return e&&ar(e,t,ba)}function sr(e,t){return lt(t,function(t){return Vl(e[t])})}function dr(e,t){for(var n=0,r=(t=li(t,e)).length;null!=e&&n<r;)e=e[Io(t[n++])];return n&&n==r?e:void 0}function fr(e,t,n){var r=t(e);return Pl(e)?r:st(r,n(e))}function mr(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Zt&&Zt in ve(e)?function(e){var t=Ce.call(e,Zt),n=e[Zt];try{e[Zt]=void 0;var r=!0}catch(e){}var i=we.call(e);return r&&(t?e[Zt]=n:delete e[Zt]),i}(e):function(e){return we.call(e)}(e)}function vr(e,t){return e>t}function pr(e,t){return null!=e&&Ce.call(e,t)}function gr(e,t){return null!=e&&t in ve(e)}function hr(e,t,n){for(var r=n?ut:at,i=e[0].length,o=e.length,l=o,a=Z(o),u=Infinity,c=[];l--;){var s=e[l];l&&t&&(s=ct(s,It(t))),u=an(s.length,u),a[l]=!n&&(t||i>=120&&s.length>=120)?new kn(l&&s):void 0}s=e[0];var d=-1,f=a[0];e:for(;++d<i&&c.length<u;){var m=s[d],v=t?t(m):m;if(m=n||0!==m?m:0,!(f?Tt(f,v):r(c,v,n))){for(l=o;--l;){var p=a[l];if(!(p?Tt(p,v):r(e[l],v,n)))continue e}f&&f.push(v),c.push(m)}}return c}function Er(e,t,n){var r=null==(e=po(e,t=li(t,e)))?e:e[Io(Fo(t))];return null==r?void 0:tt(r,e,n)}function yr(e){return Gl(e)&&mr(e)==o}function _r(e,t,n,r,i){return e===t||(null==e||null==t||!Gl(e)&&!Gl(t)?e!=e&&t!=t:function(e,t,n,r,i,s){var d=Pl(e),y=Pl(t),C=d?l:to(e),O=y?l:to(t),S=(C=C==o?v:C)==v,w=(O=O==o?v:O)==v,N=C==O;if(N&&Bl(e)){if(!Bl(t))return!1;d=!0,S=!1}if(N&&!S)return s||(s=new Un),d||Ql(e)?zi(e,t,n,r,i,s):function(e,t,n,r,i,o,l){switch(n){case b:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case _:return!(e.byteLength!=t.byteLength||!o(new Ve(e),new Ve(t)));case a:case u:case m:return Al(+e,+t);case c:return e.name==t.name&&e.message==t.message;case p:case h:return e==t+"";case f:var s=Ut;case g:if(s||(s=Ft),e.size!=t.size&&!(1&r))return!1;var d=l.get(e);if(d)return d==t;r|=2,l.set(e,t);var v=zi(s(e),s(t),r,i,o,l);return l.delete(e),v;case E:if(Nn)return Nn.call(e)==Nn.call(t)}return!1}(e,t,C,n,r,i,s);if(!(1&n)){var I=S&&Ce.call(e,"__wrapped__"),D=w&&Ce.call(t,"__wrapped__");if(I||D){var T=I?e.value():e,A=D?t.value():t;return s||(s=new Un),i(T,A,n,r,s)}}return!!N&&(s||(s=new Un),function(e,t,n,r,i,o){var l=1&n,a=Hi(e),u=a.length;if(u!=Hi(t).length&&!l)return!1;for(var c=u;c--;){var s=a[c];if(!(l?s in t:Ce.call(t,s)))return!1}var d=o.get(e),f=o.get(t);if(d&&f)return d==t&&f==e;var m=!0;o.set(e,t),o.set(t,e);for(var v=l;++c<u;){var p=e[s=a[c]],g=t[s];if(r)var h=l?r(g,p,s,t,e,o):r(p,g,s,e,t,o);if(!(void 0===h?p===g||i(p,g,n,r,o):h)){m=!1;break}v||(v="constructor"==s)}if(m&&!v){var E=e.constructor,y=t.constructor;E==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof E&&E instanceof E&&"function"==typeof y&&y instanceof y||(m=!1)}return o.delete(e),o.delete(t),m}(e,t,n,r,i,s))}(e,t,n,r,_r,i))}function br(e,t,n,r){var i=n.length,o=i,l=!r;if(null==e)return!o;for(e=ve(e);i--;){var a=n[i];if(l&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){var u=(a=n[i])[0],c=e[u],s=a[1];if(l&&a[2]){if(void 0===c&&!(u in e))return!1}else{var d=new Un;if(r)var f=r(c,s,u,e,t,d);if(!(void 0===f?_r(s,c,3,r,d):f))return!1}}return!0}function Cr(e){return!(!Hl(e)||(t=e,Se&&Se in t))&&(Vl(e)?Ae:ie).test(Do(e));var t}function Or(e){return"function"==typeof e?e:null==e?Za:"object"==typeof e?Pl(e)?Dr(e[0],e[1]):Ir(e):nu(e)}function Sr(e){if(!so(e))return on(e);var t=[];for(var n in ve(e))Ce.call(e,n)&&"constructor"!=n&&t.push(n);return t}function wr(e,t){return e<t}function Nr(e,t){var n=-1,r=kl(e)?Z(e.length):[];return er(e,function(e,i,o){r[++n]=t(e,i,o)}),r}function Ir(e){var t=Ki(e);return 1==t.length&&t[0][2]?mo(t[0][0],t[0][1]):function(n){return n===e||br(n,e,t)}}function Dr(e,t){return ao(e)&&fo(t)?mo(Io(e),t):function(n){var r=ga(n,e);return void 0===r&&r===t?ha(n,e):_r(t,r,3)}}function Tr(e,t,n,r,i){e!==t&&lr(t,function(o,l){if(i||(i=new Un),Hl(o))!function(e,t,n,r,i,o,l){var a=ho(e,n),u=ho(t,n),c=l.get(u);if(c)zn(e,n,c);else{var s=o?o(a,u,n+"",e,t,l):void 0,d=void 0===s;if(d){var f=Pl(u),m=!f&&Bl(u),v=!f&&!m&&Ql(u);s=u,f||m||v?Pl(a)?s=a:Ul(a)?s=gi(a):m?(d=!1,s=si(u,!0)):v?(d=!1,s=fi(u,!0)):s=[]:Xl(u)||xl(u)?(s=a,xl(a)?s=aa(a):Hl(a)&&!Vl(a)||(s=ro(u))):d=!1}d&&(l.set(u,s),i(s,u,r,o,l),l.delete(u)),zn(e,n,s)}}(e,t,l,n,Tr,r,i);else{var a=r?r(ho(e,l),o,l+"",e,t,i):void 0;void 0===a&&(a=o),zn(e,l,a)}},Ca)}function Ar(e,t){var n=e.length;if(n)return oo(t+=t<0?n:0,n)?e[t]:void 0}function Lr(e,t,n){t=t.length?ct(t,function(e){return Pl(e)?function(t){return dr(t,1===e.length?e[0]:e)}:e}):[Za];var r=-1;return t=ct(t,It($i())),function(e,t){var r=e.length;for(e.sort(function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,l=i.length,a=n.length;++r<l;){var u=mi(i[r],o[r]);if(u)return r>=a?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)});r--;)e[r]=e[r].value;return e}(Nr(e,function(e,n,i){return{criteria:ct(t,function(t){return t(e)}),index:++r,value:e}}))}function Rr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var l=t[r],a=dr(e,l);n(a,l)&&Fr(o,li(l,e),a)}return o}function xr(e,t,n,r){var i=r?Et:ht,o=-1,l=t.length,a=e;for(e===t&&(t=gi(t)),n&&(a=ct(e,It(n)));++o<l;)for(var u=0,c=t[o],s=n?n(c):c;(u=i(a,s,u,r))>-1;)a!==e&&Xe.call(a,u,1),Xe.call(e,u,1);return e}function Pr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;oo(i)?Xe.call(e,i,1):Jr(e,i)}}return e}function Mr(e,t){return e+Qt(sn()*(t-e+1))}function kr(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=Qt(t/2))&&(e+=e)}while(t);return n}function Ur(e,t){return _o(vo(e,t,Za),e+"")}function Br(e){return jn(Aa(e))}function jr(e,t){var n=Aa(e);return Oo(n,$n(t,0,n.length))}function Fr(e,t,n,r){if(!Hl(e))return e;for(var i=-1,o=(t=li(t,e)).length,l=o-1,a=e;null!=a&&++i<o;){var u=Io(t[i]),c=n;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;if(i!=l){var s=a[u];void 0===(c=r?r(s,u,a):void 0)&&(c=Hl(s)?s:oo(t[i+1])?[]:{})}Wn(a,u,c),a=a[u]}return e}var Vr=En?function(e,t){return En.set(e,t),e}:Za,zr=Xt?function(e,t){return Xt(e,"toString",{configurable:!0,enumerable:!1,value:Ha(t),writable:!0})}:Za;function Wr(e){return Oo(Aa(e))}function Hr(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Z(i);++r<i;)o[r]=e[r+t];return o}function Gr(e,t){var n;return er(e,function(e,r,i){return!(n=t(e,r,i))}),!!n}function qr(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,l=e[o];null!==l&&!Jl(l)&&(n?l<=t:l<t)?r=o+1:i=o}return i}return Zr(e,t,Za,n)}function Zr(e,t,n,r){var i=0,o=null==e?0:e.length;if(0===o)return 0;for(var l=(t=n(t))!=t,a=null===t,u=Jl(t),c=void 0===t;i<o;){var s=Qt((i+o)/2),d=n(e[s]),f=void 0!==d,m=null===d,v=d==d,p=Jl(d);if(l)var g=r||v;else g=c?v&&(r||f):a?v&&f&&(r||!m):u?v&&f&&!m&&(r||!p):!m&&!p&&(r?d<=t:d<t);g?i=s+1:o=s}return an(o,4294967294)}function Xr(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var l=e[n],a=t?t(l):l;if(!n||!Al(a,u)){var u=a;o[i++]=0===l?0:l}}return o}function $r(e){return"number"==typeof e?e:Jl(e)?NaN:+e}function Yr(e){if("string"==typeof e)return e;if(Pl(e))return ct(e,Yr)+"";if(Jl(e))return In?In.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Kr(e,t,n){var r=-1,i=at,o=e.length,l=!0,a=[],u=a;if(n)l=!1,i=ut;else if(o>=200){var c=t?null:ki(e);if(c)return Ft(c);l=!1,i=Tt,u=new kn}else u=t?[]:a;e:for(;++r<o;){var s=e[r],d=t?t(s):s;if(s=n||0!==s?s:0,l&&d==d){for(var f=u.length;f--;)if(u[f]===d)continue e;t&&u.push(d),a.push(s)}else i(u,d,n)||(u!==a&&u.push(d),a.push(s))}return a}function Jr(e,t){return null==(e=po(e,t=li(t,e)))||delete e[Io(Fo(t))]}function Qr(e,t,n,r){return Fr(e,t,n(dr(e,t)),r)}function ei(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?Hr(e,r?0:o,r?o+1:i):Hr(e,r?o+1:0,r?i:o)}function ti(e,t){var n=e;return n instanceof Rn&&(n=n.value()),dt(t,function(e,t){return t.func.apply(t.thisArg,st([e],t.args))},n)}function ni(e,t,n){var r=e.length;if(r<2)return r?Kr(e[0]):[];for(var i=-1,o=Z(r);++i<r;)for(var l=e[i],a=-1;++a<r;)a!=i&&(o[i]=Qn(o[i]||l,e[a],t,n));return Kr(or(o,1),t,n)}function ri(e,t,n){for(var r=-1,i=e.length,o=t.length,l={};++r<i;)n(l,e[r],r<o?t[r]:void 0);return l}function ii(e){return Ul(e)?e:[]}function oi(e){return"function"==typeof e?e:Za}function li(e,t){return Pl(e)?e:ao(e,t)?[e]:No(ua(e))}var ai=Ur;function ui(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:Hr(e,t,n)}var ci=$t||function(e){return We.clearTimeout(e)};function si(e,t){if(t)return e.slice();var n=e.length,r=ze?ze(n):new e.constructor(n);return e.copy(r),r}function di(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t}function fi(e,t){var n=t?di(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function mi(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=e==e,o=Jl(e),l=void 0!==t,a=null===t,u=t==t,c=Jl(t);if(!a&&!c&&!o&&e>t||o&&l&&u&&!a&&!c||r&&l&&u||!n&&u||!i)return 1;if(!r&&!o&&!c&&e<t||c&&n&&i&&!r&&!o||a&&n&&i||!l&&i||!u)return-1}return 0}function vi(e,t,n,r){for(var i=-1,o=e.length,l=n.length,a=-1,u=t.length,c=ln(o-l,0),s=Z(u+c),d=!r;++a<u;)s[a]=t[a];for(;++i<l;)(d||i<o)&&(s[n[i]]=e[i]);for(;c--;)s[a++]=e[i++];return s}function pi(e,t,n,r){for(var i=-1,o=e.length,l=-1,a=n.length,u=-1,c=t.length,s=ln(o-a,0),d=Z(s+c),f=!r;++i<s;)d[i]=e[i];for(var m=i;++u<c;)d[m+u]=t[u];for(;++l<a;)(f||i<o)&&(d[m+n[l]]=e[i++]);return d}function gi(e,t){var n=-1,r=e.length;for(t||(t=Z(r));++n<r;)t[n]=e[n];return t}function hi(e,t,n,r){var i=!n;n||(n={});for(var o=-1,l=t.length;++o<l;){var a=t[o],u=r?r(n[a],e[a],a,n,e):void 0;void 0===u&&(u=e[a]),i?Zn(n,a,u):Wn(n,a,u)}return n}function Ei(e,t){return function(n,r){var i=Pl(n)?nt:Gn,o=t?t():{};return i(n,e,$i(r,2),o)}}function yi(e){return Ur(function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,l=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,l&&lo(n[0],n[1],l)&&(o=i<3?void 0:o,i=1),t=ve(t);++r<i;){var a=n[r];a&&e(t,a,r,o)}return t})}function _i(e,t){return function(n,r){if(null==n)return n;if(!kl(n))return e(n,r);for(var i=n.length,o=t?i:-1,l=ve(n);(t?o--:++o<i)&&!1!==r(l[o],o,l););return n}}function bi(e){return function(t,n,r){for(var i=-1,o=ve(t),l=r(t),a=l.length;a--;){var u=l[e?a:++i];if(!1===n(o[u],u,o))break}return t}}function Ci(e){return function(t){var n=kt(t=ua(t))?Wt(t):void 0,r=n?n[0]:t.charAt(0),i=n?ui(n,1).join(""):t.slice(1);return r[e]()+i}}function Oi(e){return function(t){return dt(Va(xa(t).replace(De,"")),e,"")}}function Si(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Tn(e.prototype),r=e.apply(n,t);return Hl(r)?r:n}}function wi(e){return function(t,n,r){var i=ve(t);if(!kl(t)){var o=$i(n,3);t=ba(t),n=function(e){return o(i[e],e,i)}}var l=e(t,n,r);return l>-1?i[o?t[l]:l]:void 0}}function Ni(e){return Wi(function(t){var r=t.length,i=r,o=Ln.prototype.thru;for(e&&t.reverse();i--;){var l=t[i];if("function"!=typeof l)throw new he(n);if(o&&!a&&"wrapper"==Zi(l))var a=new Ln([],!0)}for(i=a?i:r;++i<r;){var u=Zi(l=t[i]),c="wrapper"==u?qi(l):void 0;a=c&&uo(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?a[Zi(c[0])].apply(a,c[3]):1==l.length&&uo(l)?a[u]():a.thru(l)}return function(){var e=arguments,n=e[0];if(a&&1==e.length&&Pl(n))return a.plant(n).value();for(var i=0,o=r?t[i].apply(this,e):n;++i<r;)o=t[i].call(this,o);return o}})}function Ii(e,t,n,r,i,o,l,a,u,c){var s=128&t,d=1&t,f=2&t,m=24&t,v=512&t,p=f?void 0:Si(e);return function g(){for(var h=arguments.length,E=Z(h),y=h;y--;)E[y]=arguments[y];if(m)var _=Xi(g),b=Rt(E,_);if(r&&(E=vi(E,r,i,m)),o&&(E=pi(E,o,l,m)),h-=b,m&&h<c){var C=jt(E,_);return Pi(e,t,Ii,g.placeholder,n,E,C,a,u,c-h)}var O=d?n:this,S=f?O[e]:e;return h=E.length,a?E=go(E,a):v&&h>1&&E.reverse(),s&&u<h&&(E.length=u),this&&this!==We&&this instanceof g&&(S=p||Si(S)),S.apply(O,E)}}function Di(e,t){return function(n,r){return function(e,t,n,r){return ur(e,function(e,i,o){t(r,n(e),i,o)}),r}(n,e,t(r),{})}}function Ti(e,t){return function(n,r){var i;if(void 0===n&&void 0===r)return t;if(void 0!==n&&(i=n),void 0!==r){if(void 0===i)return r;"string"==typeof n||"string"==typeof r?(n=Yr(n),r=Yr(r)):(n=$r(n),r=$r(r)),i=e(n,r)}return i}}function Ai(e){return Wi(function(t){return t=ct(t,It($i())),Ur(function(n){var r=this;return e(t,function(e){return tt(e,r,n)})})})}function Li(e,t){var n=(t=void 0===t?" ":Yr(t)).length;if(n<2)return n?kr(t,e):t;var r=kr(t,Jt(e/zt(t)));return kt(t)?ui(Wt(r),0,e).join(""):r.slice(0,e)}function Ri(e){return function(t,n,r){return r&&"number"!=typeof r&&lo(t,n,r)&&(n=r=void 0),t=ra(t),void 0===n?(n=t,t=0):n=ra(n),function(e,t,n,r){for(var i=-1,o=ln(Jt((t-e)/(n||1)),0),l=Z(o);o--;)l[r?o:++i]=e,e+=n;return l}(t,n,r=void 0===r?t<n?1:-1:ra(r),e)}}function xi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=la(t),n=la(n)),e(t,n)}}function Pi(e,t,n,r,i,o,l,a,u,c){var s=8&t;t|=s?32:64,4&(t&=~(s?64:32))||(t&=-4);var d=[e,t,i,s?o:void 0,s?l:void 0,s?void 0:o,s?void 0:l,a,u,c],f=n.apply(void 0,d);return uo(e)&&Eo(f,d),f.placeholder=r,bo(f,e,t)}function Mi(e){var t=me[e];return function(e,n){if(e=la(e),(n=null==n?0:an(ia(n),292))&&nn(e)){var r=(ua(e)+"e").split("e");return+((r=(ua(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var ki=pn&&1/Ft(new pn([,-0]))[1]==1/0?function(e){return new pn(e)}:Ja;function Ui(e){return function(t){var n=to(t);return n==f?Ut(t):n==g?Vt(t):function(e,t){return ct(t,function(t){return[t,e[t]]})}(t,e(t))}}function Bi(e,t,i,o,l,a,u,c){var s=2&t;if(!s&&"function"!=typeof e)throw new he(n);var d=o?o.length:0;if(d||(t&=-97,o=l=void 0),u=void 0===u?u:ln(ia(u),0),c=void 0===c?c:ia(c),d-=l?l.length:0,64&t){var f=o,m=l;o=l=void 0}var v=s?void 0:qi(e),p=[e,t,i,o,l,f,m,a,u,c];if(v&&function(e,t){var n=e[1],i=t[1],o=n|i;if(!(o<131||128==i&&8==n||128==i&&256==n&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==n))return e;1&i&&(e[2]=t[2],o|=1&n?0:4);var l=t[3];if(l){var a=e[3];e[3]=a?vi(a,l,t[4]):l,e[4]=a?jt(e[3],r):t[4]}(l=t[5])&&(e[5]=(a=e[5])?pi(a,l,t[6]):l,e[6]=a?jt(e[5],r):t[6]),(l=t[7])&&(e[7]=l),128&i&&(e[8]=null==e[8]?t[8]:an(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(p,v),e=p[0],t=p[1],i=p[2],o=p[3],l=p[4],!(c=p[9]=void 0===p[9]?s?0:e.length:ln(p[9]-d,0))&&24&t&&(t&=-25),t&&1!=t)g=8==t||16==t?function(e,t,n){var r=Si(e);return function i(){for(var o=arguments.length,l=Z(o),a=o,u=Xi(i);a--;)l[a]=arguments[a];var c=o<3&&l[0]!==u&&l[o-1]!==u?[]:jt(l,u);if((o-=c.length)<n)return Pi(e,t,Ii,i.placeholder,void 0,l,c,void 0,void 0,n-o);var s=this&&this!==We&&this instanceof i?r:e;return tt(s,this,l)}}(e,t,c):32!=t&&33!=t||l.length?Ii.apply(void 0,p):function(e,t,n,r){var i=1&t,o=Si(e);return function t(){for(var l=-1,a=arguments.length,u=-1,c=r.length,s=Z(c+a),d=this&&this!==We&&this instanceof t?o:e;++u<c;)s[u]=r[u];for(;a--;)s[u++]=arguments[++l];return tt(d,i?n:this,s)}}(e,t,i,o);else var g=function(e,t,n){var r=1&t,i=Si(e);return function t(){var o=this&&this!==We&&this instanceof t?i:e;return o.apply(r?n:this,arguments)}}(e,t,i);return bo((v?Vr:Eo)(g,p),e,t)}function ji(e,t,n,r){return void 0===e||Al(e,ye[n])&&!Ce.call(r,n)?t:e}function Fi(e,t,n,r,i,o){return Hl(e)&&Hl(t)&&(o.set(t,e),Tr(e,t,void 0,Fi,o),o.delete(t)),e}function Vi(e){return Xl(e)?void 0:e}function zi(e,t,n,r,i,o){var l=1&n,a=e.length,u=t.length;if(a!=u&&!(l&&u>a))return!1;var c=o.get(e),s=o.get(t);if(c&&s)return c==t&&s==e;var d=-1,f=!0,m=2&n?new kn:void 0;for(o.set(e,t),o.set(t,e);++d<a;){var v=e[d],p=t[d];if(r)var g=l?r(p,v,d,t,e,o):r(v,p,d,e,t,o);if(void 0!==g){if(g)continue;f=!1;break}if(m){if(!mt(t,function(e,t){if(!Tt(m,t)&&(v===e||i(v,e,n,r,o)))return m.push(t)})){f=!1;break}}else if(v!==p&&!i(v,p,n,r,o)){f=!1;break}}return o.delete(e),o.delete(t),f}function Wi(e){return _o(vo(e,void 0,Mo),e+"")}function Hi(e){return fr(e,ba,Qi)}function Gi(e){return fr(e,Ca,eo)}var qi=En?function(e){return En.get(e)}:Ja;function Zi(e){for(var t=e.name+"",n=yn[t],r=Ce.call(yn,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function Xi(e){return(Ce.call(Dn,"placeholder")?Dn:e).placeholder}function $i(){var e=Dn.iteratee||Xa;return e=e===Xa?Or:e,arguments.length?e(arguments[0],arguments[1]):e}function Yi(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Ki(e){for(var t=ba(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,fo(i)]}return t}function Ji(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Cr(n)?n:void 0}var Qi=en?function(e){return null==e?[]:(e=ve(e),lt(en(e),function(t){return Ze.call(e,t)}))}:ou,eo=en?function(e){for(var t=[];e;)st(t,Qi(e)),e=He(e);return t}:ou,to=mr;function no(e,t,n){for(var r=-1,i=(t=li(t,e)).length,o=!1;++r<i;){var l=Io(t[r]);if(!(o=null!=e&&n(e,l)))break;e=e[l]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Wl(i)&&oo(l,i)&&(Pl(e)||xl(e))}function ro(e){return"function"!=typeof e.constructor||so(e)?{}:Tn(He(e))}function io(e){return Pl(e)||xl(e)||!!(vt&&e&&e[vt])}function oo(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&le.test(e))&&e>-1&&e%1==0&&e<t}function lo(e,t,n){if(!Hl(n))return!1;var r=typeof t;return!!("number"==r?kl(n)&&oo(t,n.length):"string"==r&&t in n)&&Al(n[t],e)}function ao(e,t){if(Pl(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Jl(e))||z.test(e)||!V.test(e)||null!=t&&e in ve(t)}function uo(e){var t=Zi(e),n=Dn[t];if("function"!=typeof n||!(t in Rn.prototype))return!1;if(e===n)return!0;var r=qi(n);return!!r&&e===r[0]}(fn&&to(new fn(new ArrayBuffer(1)))!=b||mn&&to(new mn)!=f||vn&&"[object Promise]"!=to(vn.resolve())||pn&&to(new pn)!=g||gn&&to(new gn)!=y)&&(to=function(e){var t=mr(e),n=t==v?e.constructor:void 0,r=n?Do(n):"";if(r)switch(r){case _n:return b;case bn:return f;case Cn:return"[object Promise]";case On:return g;case Sn:return y}return t});var co=_e?Vl:lu;function so(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ye)}function fo(e){return e==e&&!Hl(e)}function mo(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in ve(n))}}function vo(e,t,n){return t=ln(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=ln(r.length-t,0),l=Z(o);++i<o;)l[i]=r[t+i];i=-1;for(var a=Z(t+1);++i<t;)a[i]=r[i];return a[t]=n(l),tt(e,this,a)}}function po(e,t){return t.length<2?e:dr(e,Hr(t,0,-1))}function go(e,t){for(var n=e.length,r=an(t.length,n),i=gi(e);r--;){var o=t[r];e[r]=oo(o,n)?i[o]:void 0}return e}function ho(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Eo=Co(Vr),yo=Kt||function(e,t){return We.setTimeout(e,t)},_o=Co(zr);function bo(e,t,n){var r=t+"";return _o(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(X,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return rt(i,function(n){var r="_."+n[0];t&n[1]&&!at(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match($);return t?t[1].split(Y):[]}(r),n)))}function Co(e){var t=0,n=0;return function(){var r=un(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Oo(e,t){var n=-1,r=e.length,i=r-1;for(t=void 0===t?r:t;++n<t;){var o=Mr(n,i),l=e[o];e[o]=e[n],e[n]=l}return e.length=t,e}var So,wo,No=(So=Sl(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(W,function(e,n,r,i){t.push(r?i.replace(Q,"$1"):n||e)}),t},function(e){return 500===wo.size&&wo.clear(),e}),wo=So.cache,So);function Io(e){if("string"==typeof e||Jl(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Do(e){if(null!=e){try{return be.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function To(e){if(e instanceof Rn)return e.clone();var t=new Ln(e.__wrapped__,e.__chain__);return t.__actions__=gi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Ao=Ur(function(e,t){return Ul(e)?Qn(e,or(t,1,Ul,!0)):[]}),Lo=Ur(function(e,t){var n=Fo(t);return Ul(n)&&(n=void 0),Ul(e)?Qn(e,or(t,1,Ul,!0),$i(n,2)):[]}),Ro=Ur(function(e,t){var n=Fo(t);return Ul(n)&&(n=void 0),Ul(e)?Qn(e,or(t,1,Ul,!0),void 0,n):[]});function xo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ia(n);return i<0&&(i=ln(r+i,0)),gt(e,$i(t,3),i)}function Po(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return void 0!==n&&(i=ia(n),i=n<0?ln(r+i,0):an(i,r-1)),gt(e,$i(t,3),i,!0)}function Mo(e){return null!=e&&e.length?or(e,1):[]}function ko(e){return e&&e.length?e[0]:void 0}var Uo=Ur(function(e){var t=ct(e,ii);return t.length&&t[0]===e[0]?hr(t):[]}),Bo=Ur(function(e){var t=Fo(e),n=ct(e,ii);return t===Fo(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?hr(n,$i(t,2)):[]}),jo=Ur(function(e){var t=Fo(e),n=ct(e,ii);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?hr(n,void 0,t):[]});function Fo(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Vo=Ur(zo);function zo(e,t){return e&&e.length&&t&&t.length?xr(e,t):e}var Wo=Wi(function(e,t){var n=null==e?0:e.length,r=Xn(e,t);return Pr(e,ct(t,function(e){return oo(e,n)?+e:e}).sort(mi)),r});function Ho(e){return null==e?e:dn.call(e)}var Go=Ur(function(e){return Kr(or(e,1,Ul,!0))}),qo=Ur(function(e){var t=Fo(e);return Ul(t)&&(t=void 0),Kr(or(e,1,Ul,!0),$i(t,2))}),Zo=Ur(function(e){var t=Fo(e);return t="function"==typeof t?t:void 0,Kr(or(e,1,Ul,!0),void 0,t)});function Xo(e){if(!e||!e.length)return[];var t=0;return e=lt(e,function(e){if(Ul(e))return t=ln(e.length,t),!0}),wt(t,function(t){return ct(e,bt(t))})}function $o(e,t){if(!e||!e.length)return[];var n=Xo(e);return null==t?n:ct(n,function(e){return tt(t,void 0,e)})}var Yo=Ur(function(e,t){return Ul(e)?Qn(e,t):[]}),Ko=Ur(function(e){return ni(lt(e,Ul))}),Jo=Ur(function(e){var t=Fo(e);return Ul(t)&&(t=void 0),ni(lt(e,Ul),$i(t,2))}),Qo=Ur(function(e){var t=Fo(e);return t="function"==typeof t?t:void 0,ni(lt(e,Ul),void 0,t)}),el=Ur(Xo),tl=Ur(function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,$o(e,n)});function nl(e){var t=Dn(e);return t.__chain__=!0,t}function rl(e,t){return t(e)}var il=Wi(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return Xn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Rn&&oo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:rl,args:[i],thisArg:void 0}),new Ln(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(void 0),e})):this.thru(i)}),ol=Ei(function(e,t,n){Ce.call(e,n)?++e[n]:Zn(e,n,1)}),ll=wi(xo),al=wi(Po);function ul(e,t){return(Pl(e)?rt:er)(e,$i(t,3))}function cl(e,t){return(Pl(e)?it:tr)(e,$i(t,3))}var sl=Ei(function(e,t,n){Ce.call(e,n)?e[n].push(t):Zn(e,n,[t])}),dl=Ur(function(e,t,n){var r=-1,i="function"==typeof t,o=kl(e)?Z(e.length):[];return er(e,function(e){o[++r]=i?tt(t,e,n):Er(e,t,n)}),o}),fl=Ei(function(e,t,n){Zn(e,n,t)});function ml(e,t){return(Pl(e)?ct:Nr)(e,$i(t,3))}var vl=Ei(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),pl=Ur(function(e,t){if(null==e)return[];var n=t.length;return n>1&&lo(e,t[0],t[1])?t=[]:n>2&&lo(t[0],t[1],t[2])&&(t=[t[0]]),Lr(e,or(t,1),[])}),gl=Yt||function(){return We.Date.now()};function hl(e,t,n){return t=n?void 0:t,Bi(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function El(e,t){var r;if("function"!=typeof t)throw new he(n);return e=ia(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=void 0),r}}var yl=Ur(function(e,t,n){var r=1;if(n.length){var i=jt(n,Xi(yl));r|=32}return Bi(e,r,t,n,i)}),_l=Ur(function(e,t,n){var r=3;if(n.length){var i=jt(n,Xi(_l));r|=32}return Bi(t,r,e,n,i)});function bl(e,t,r){var i,o,l,a,u,c,s=0,d=!1,f=!1,m=!0;if("function"!=typeof e)throw new he(n);function v(t){var n=i,r=o;return i=o=void 0,s=t,a=e.apply(r,n)}function p(e){return s=e,u=yo(h,t),d?v(e):a}function g(e){var n=e-c;return void 0===c||n>=t||n<0||f&&e-s>=l}function h(){var e=gl();if(g(e))return E(e);u=yo(h,function(e){var n=t-(e-c);return f?an(n,l-(e-s)):n}(e))}function E(e){return u=void 0,m&&i?v(e):(i=o=void 0,a)}function y(){var e=gl(),n=g(e);if(i=arguments,o=this,c=e,n){if(void 0===u)return p(c);if(f)return ci(u),u=yo(h,t),v(c)}return void 0===u&&(u=yo(h,t)),a}return t=la(t)||0,Hl(r)&&(d=!!r.leading,l=(f="maxWait"in r)?ln(la(r.maxWait)||0,t):l,m="trailing"in r?!!r.trailing:m),y.cancel=function(){void 0!==u&&ci(u),s=0,i=c=o=u=void 0},y.flush=function(){return void 0===u?a:E(gl())},y}var Cl=Ur(function(e,t){return Jn(e,1,t)}),Ol=Ur(function(e,t,n){return Jn(e,la(t)||0,n)});function Sl(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new he(n);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var l=e.apply(this,n);return r.cache=o.set(i,l)||o,l};return r.cache=new(Sl.Cache||Mn),r}function wl(e){if("function"!=typeof e)throw new he(n);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Sl.Cache=Mn;var Nl=ai(function(e,t){var n=(t=1==t.length&&Pl(t[0])?ct(t[0],It($i())):ct(or(t,1),It($i()))).length;return Ur(function(r){for(var i=-1,o=an(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return tt(e,this,r)})}),Il=Ur(function(e,t){return Bi(e,32,void 0,t,jt(t,Xi(Il)))}),Dl=Ur(function(e,t){return Bi(e,64,void 0,t,jt(t,Xi(Dl)))}),Tl=Wi(function(e,t){return Bi(e,256,void 0,void 0,void 0,t)});function Al(e,t){return e===t||e!=e&&t!=t}var Ll=xi(vr),Rl=xi(function(e,t){return e>=t}),xl=yr(function(){return arguments}())?yr:function(e){return Gl(e)&&Ce.call(e,"callee")&&!Ze.call(e,"callee")},Pl=Z.isArray,Ml=$e?It($e):function(e){return Gl(e)&&mr(e)==_};function kl(e){return null!=e&&Wl(e.length)&&!Vl(e)}function Ul(e){return Gl(e)&&kl(e)}var Bl=tn||lu,jl=Ye?It(Ye):function(e){return Gl(e)&&mr(e)==u};function Fl(e){if(!Gl(e))return!1;var t=mr(e);return t==c||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Xl(e)}function Vl(e){if(!Hl(e))return!1;var t=mr(e);return t==s||t==d||"[object AsyncFunction]"==t||"[object Proxy]"==t}function zl(e){return"number"==typeof e&&e==ia(e)}function Wl(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Hl(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Gl(e){return null!=e&&"object"==typeof e}var ql=Ke?It(Ke):function(e){return Gl(e)&&to(e)==f};function Zl(e){return"number"==typeof e||Gl(e)&&mr(e)==m}function Xl(e){if(!Gl(e)||mr(e)!=v)return!1;var t=He(e);if(null===t)return!0;var n=Ce.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&be.call(n)==Ne}var $l=Je?It(Je):function(e){return Gl(e)&&mr(e)==p},Yl=Qe?It(Qe):function(e){return Gl(e)&&to(e)==g};function Kl(e){return"string"==typeof e||!Pl(e)&&Gl(e)&&mr(e)==h}function Jl(e){return"symbol"==typeof e||Gl(e)&&mr(e)==E}var Ql=et?It(et):function(e){return Gl(e)&&Wl(e.length)&&!!ke[mr(e)]},ea=xi(wr),ta=xi(function(e,t){return e<=t});function na(e){if(!e)return[];if(kl(e))return Kl(e)?Wt(e):gi(e);if(Ct&&e[Ct])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ct]());var t=to(e);return(t==f?Ut:t==g?Ft:Aa)(e)}function ra(e){return e?(e=la(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ia(e){var t=ra(e),n=t%1;return t==t?n?t-n:t:0}function oa(e){return e?$n(ia(e),0,4294967295):0}function la(e){if("number"==typeof e)return e;if(Jl(e))return NaN;if(Hl(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Hl(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Nt(e);var n=re.test(e);return n||oe.test(e)?Fe(e.slice(2),n?2:8):ne.test(e)?NaN:+e}function aa(e){return hi(e,Ca(e))}function ua(e){return null==e?"":Yr(e)}var ca=yi(function(e,t){if(so(t)||kl(t))hi(t,ba(t),e);else for(var n in t)Ce.call(t,n)&&Wn(e,n,t[n])}),sa=yi(function(e,t){hi(t,Ca(t),e)}),da=yi(function(e,t,n,r){hi(t,Ca(t),e,r)}),fa=yi(function(e,t,n,r){hi(t,ba(t),e,r)}),ma=Wi(Xn),va=Ur(function(e,t){e=ve(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&lo(t[0],t[1],i)&&(r=1);++n<r;)for(var o=t[n],l=Ca(o),a=-1,u=l.length;++a<u;){var c=l[a],s=e[c];(void 0===s||Al(s,ye[c])&&!Ce.call(e,c))&&(e[c]=o[c])}return e}),pa=Ur(function(e){return e.push(void 0,Fi),tt(Sa,void 0,e)});function ga(e,t,n){var r=null==e?void 0:dr(e,t);return void 0===r?n:r}function ha(e,t){return null!=e&&no(e,t,gr)}var Ea=Di(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=we.call(t)),e[t]=n},Ha(Za)),ya=Di(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=we.call(t)),Ce.call(e,t)?e[t].push(n):e[t]=[n]},$i),_a=Ur(Er);function ba(e){return kl(e)?Bn(e):Sr(e)}function Ca(e){return kl(e)?Bn(e,!0):function(e){if(!Hl(e))return function(e){var t=[];if(null!=e)for(var n in ve(e))t.push(n);return t}(e);var t=so(e),n=[];for(var r in e)("constructor"!=r||!t&&Ce.call(e,r))&&n.push(r);return n}(e)}var Oa=yi(function(e,t,n){Tr(e,t,n)}),Sa=yi(function(e,t,n,r){Tr(e,t,n,r)}),wa=Wi(function(e,t){var n={};if(null==e)return n;var r=!1;t=ct(t,function(t){return t=li(t,e),r||(r=t.length>1),t}),hi(e,Gi(e),n),r&&(n=Yn(n,7,Vi));for(var i=t.length;i--;)Jr(n,t[i]);return n}),Na=Wi(function(e,t){return null==e?{}:function(e,t){return Rr(e,t,function(t,n){return ha(e,n)})}(e,t)});function Ia(e,t){if(null==e)return{};var n=ct(Gi(e),function(e){return[e]});return t=$i(t),Rr(e,n,function(e,n){return t(e,n[0])})}var Da=Ui(ba),Ta=Ui(Ca);function Aa(e){return null==e?[]:Dt(e,ba(e))}var La=Oi(function(e,t,n){return t=t.toLowerCase(),e+(n?Ra(t):t)});function Ra(e){return Fa(ua(e).toLowerCase())}function xa(e){return(e=ua(e))&&e.replace(ae,xt).replace(Te,"")}var Pa=Oi(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Ma=Oi(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),ka=Ci("toLowerCase"),Ua=Oi(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Ba=Oi(function(e,t,n){return e+(n?" ":"")+Fa(t)}),ja=Oi(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Fa=Ci("toUpperCase");function Va(e,t,n){return e=ua(e),void 0===(t=n?void 0:t)?function(e){return xe.test(e)}(e)?function(e){return e.match(Le)||[]}(e):function(e){return e.match(K)||[]}(e):e.match(t)||[]}var za=Ur(function(e,t){try{return tt(e,void 0,t)}catch(e){return Fl(e)?e:new de(e)}}),Wa=Wi(function(e,t){return rt(t,function(t){t=Io(t),Zn(e,t,yl(e[t],e))}),e});function Ha(e){return function(){return e}}var Ga=Ni(),qa=Ni(!0);function Za(e){return e}function Xa(e){return Or("function"==typeof e?e:Yn(e,1))}var $a=Ur(function(e,t){return function(n){return Er(n,e,t)}}),Ya=Ur(function(e,t){return function(n){return Er(e,n,t)}});function Ka(e,t,n){var r=ba(t),i=sr(t,r);null!=n||Hl(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=sr(t,ba(t)));var o=!(Hl(n)&&"chain"in n&&!n.chain),l=Vl(e);return rt(i,function(n){var r=t[n];e[n]=r,l&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=gi(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,st([this.value()],arguments))})}),e}function Ja(){}var Qa=Ai(ct),eu=Ai(ot),tu=Ai(mt);function nu(e){return ao(e)?bt(Io(e)):function(e){return function(t){return dr(t,e)}}(e)}var ru=Ri(),iu=Ri(!0);function ou(){return[]}function lu(){return!1}var au,uu=Ti(function(e,t){return e+t},0),cu=Mi("ceil"),su=Ti(function(e,t){return e/t},1),du=Mi("floor"),fu=Ti(function(e,t){return e*t},1),mu=Mi("round"),vu=Ti(function(e,t){return e-t},0);return Dn.after=function(e,t){if("function"!=typeof t)throw new he(n);return e=ia(e),function(){if(--e<1)return t.apply(this,arguments)}},Dn.ary=hl,Dn.assign=ca,Dn.assignIn=sa,Dn.assignInWith=da,Dn.assignWith=fa,Dn.at=ma,Dn.before=El,Dn.bind=yl,Dn.bindAll=Wa,Dn.bindKey=_l,Dn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Pl(e)?e:[e]},Dn.chain=nl,Dn.chunk=function(e,t,n){t=(n?lo(e,t,n):void 0===t)?1:ln(ia(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var i=0,o=0,l=Z(Jt(r/t));i<r;)l[o++]=Hr(e,i,i+=t);return l},Dn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Dn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=Z(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return st(Pl(n)?gi(n):[n],or(t,1))},Dn.cond=function(e){var t=null==e?0:e.length,r=$i();return e=t?ct(e,function(e){if("function"!=typeof e[1])throw new he(n);return[r(e[0]),e[1]]}):[],Ur(function(n){for(var r=-1;++r<t;){var i=e[r];if(tt(i[0],this,n))return tt(i[1],this,n)}})},Dn.conforms=function(e){return function(e){var t=ba(e);return function(n){return Kn(n,e,t)}}(Yn(e,1))},Dn.constant=Ha,Dn.countBy=ol,Dn.create=function(e,t){var n=Tn(e);return null==t?n:qn(n,t)},Dn.curry=function e(t,n,r){var i=Bi(t,8,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=e.placeholder,i},Dn.curryRight=function e(t,n,r){var i=Bi(t,16,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=e.placeholder,i},Dn.debounce=bl,Dn.defaults=va,Dn.defaultsDeep=pa,Dn.defer=Cl,Dn.delay=Ol,Dn.difference=Ao,Dn.differenceBy=Lo,Dn.differenceWith=Ro,Dn.drop=function(e,t,n){var r=null==e?0:e.length;return r?Hr(e,(t=n||void 0===t?1:ia(t))<0?0:t,r):[]},Dn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?Hr(e,0,(t=r-(t=n||void 0===t?1:ia(t)))<0?0:t):[]},Dn.dropRightWhile=function(e,t){return e&&e.length?ei(e,$i(t,3),!0,!0):[]},Dn.dropWhile=function(e,t){return e&&e.length?ei(e,$i(t,3),!0):[]},Dn.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&lo(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=ia(n))<0&&(n=-n>i?0:i+n),(r=void 0===r||r>i?i:ia(r))<0&&(r+=i),r=n>r?0:oa(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Dn.filter=function(e,t){return(Pl(e)?lt:ir)(e,$i(t,3))},Dn.flatMap=function(e,t){return or(ml(e,t),1)},Dn.flatMapDeep=function(e,t){return or(ml(e,t),1/0)},Dn.flatMapDepth=function(e,t,n){return n=void 0===n?1:ia(n),or(ml(e,t),n)},Dn.flatten=Mo,Dn.flattenDeep=function(e){return null!=e&&e.length?or(e,1/0):[]},Dn.flattenDepth=function(e,t){return null!=e&&e.length?or(e,t=void 0===t?1:ia(t)):[]},Dn.flip=function(e){return Bi(e,512)},Dn.flow=Ga,Dn.flowRight=qa,Dn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Dn.functions=function(e){return null==e?[]:sr(e,ba(e))},Dn.functionsIn=function(e){return null==e?[]:sr(e,Ca(e))},Dn.groupBy=sl,Dn.initial=function(e){return null!=e&&e.length?Hr(e,0,-1):[]},Dn.intersection=Uo,Dn.intersectionBy=Bo,Dn.intersectionWith=jo,Dn.invert=Ea,Dn.invertBy=ya,Dn.invokeMap=dl,Dn.iteratee=Xa,Dn.keyBy=fl,Dn.keys=ba,Dn.keysIn=Ca,Dn.map=ml,Dn.mapKeys=function(e,t){var n={};return t=$i(t,3),ur(e,function(e,r,i){Zn(n,t(e,r,i),e)}),n},Dn.mapValues=function(e,t){var n={};return t=$i(t,3),ur(e,function(e,r,i){Zn(n,r,t(e,r,i))}),n},Dn.matches=function(e){return Ir(Yn(e,1))},Dn.matchesProperty=function(e,t){return Dr(e,Yn(t,1))},Dn.memoize=Sl,Dn.merge=Oa,Dn.mergeWith=Sa,Dn.method=$a,Dn.methodOf=Ya,Dn.mixin=Ka,Dn.negate=wl,Dn.nthArg=function(e){return e=ia(e),Ur(function(t){return Ar(t,e)})},Dn.omit=wa,Dn.omitBy=function(e,t){return Ia(e,wl($i(t)))},Dn.once=function(e){return El(2,e)},Dn.orderBy=function(e,t,n,r){return null==e?[]:(Pl(t)||(t=null==t?[]:[t]),Pl(n=r?void 0:n)||(n=null==n?[]:[n]),Lr(e,t,n))},Dn.over=Qa,Dn.overArgs=Nl,Dn.overEvery=eu,Dn.overSome=tu,Dn.partial=Il,Dn.partialRight=Dl,Dn.partition=vl,Dn.pick=Na,Dn.pickBy=Ia,Dn.property=nu,Dn.propertyOf=function(e){return function(t){return null==e?void 0:dr(e,t)}},Dn.pull=Vo,Dn.pullAll=zo,Dn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?xr(e,t,$i(n,2)):e},Dn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?xr(e,t,void 0,n):e},Dn.pullAt=Wo,Dn.range=ru,Dn.rangeRight=iu,Dn.rearg=Tl,Dn.reject=function(e,t){return(Pl(e)?lt:ir)(e,wl($i(t,3)))},Dn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=$i(t,3);++r<o;){var l=e[r];t(l,r,e)&&(n.push(l),i.push(r))}return Pr(e,i),n},Dn.rest=function(e,t){if("function"!=typeof e)throw new he(n);return Ur(e,t=void 0===t?t:ia(t))},Dn.reverse=Ho,Dn.sampleSize=function(e,t,n){return t=(n?lo(e,t,n):void 0===t)?1:ia(t),(Pl(e)?Fn:jr)(e,t)},Dn.set=function(e,t,n){return null==e?e:Fr(e,t,n)},Dn.setWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:Fr(e,t,n,r)},Dn.shuffle=function(e){return(Pl(e)?Vn:Wr)(e)},Dn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&lo(e,t,n)?(t=0,n=r):(t=null==t?0:ia(t),n=void 0===n?r:ia(n)),Hr(e,t,n)):[]},Dn.sortBy=pl,Dn.sortedUniq=function(e){return e&&e.length?Xr(e):[]},Dn.sortedUniqBy=function(e,t){return e&&e.length?Xr(e,$i(t,2)):[]},Dn.split=function(e,t,n){return n&&"number"!=typeof n&&lo(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=ua(e))&&("string"==typeof t||null!=t&&!$l(t))&&!(t=Yr(t))&&kt(e)?ui(Wt(e),0,n):e.split(t,n):[]},Dn.spread=function(e,t){if("function"!=typeof e)throw new he(n);return t=null==t?0:ln(ia(t),0),Ur(function(n){var r=n[t],i=ui(n,0,t);return r&&st(i,r),tt(e,this,i)})},Dn.tail=function(e){var t=null==e?0:e.length;return t?Hr(e,1,t):[]},Dn.take=function(e,t,n){return e&&e.length?Hr(e,0,(t=n||void 0===t?1:ia(t))<0?0:t):[]},Dn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Hr(e,(t=r-(t=n||void 0===t?1:ia(t)))<0?0:t,r):[]},Dn.takeRightWhile=function(e,t){return e&&e.length?ei(e,$i(t,3),!1,!0):[]},Dn.takeWhile=function(e,t){return e&&e.length?ei(e,$i(t,3)):[]},Dn.tap=function(e,t){return t(e),e},Dn.throttle=function(e,t,r){var i=!0,o=!0;if("function"!=typeof e)throw new he(n);return Hl(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),bl(e,t,{leading:i,maxWait:t,trailing:o})},Dn.thru=rl,Dn.toArray=na,Dn.toPairs=Da,Dn.toPairsIn=Ta,Dn.toPath=function(e){return Pl(e)?ct(e,Io):Jl(e)?[e]:gi(No(ua(e)))},Dn.toPlainObject=aa,Dn.transform=function(e,t,n){var r=Pl(e),i=r||Bl(e)||Ql(e);if(t=$i(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Hl(e)&&Vl(o)?Tn(He(e)):{}}return(i?rt:ur)(e,function(e,r,i){return t(n,e,r,i)}),n},Dn.unary=function(e){return hl(e,1)},Dn.union=Go,Dn.unionBy=qo,Dn.unionWith=Zo,Dn.uniq=function(e){return e&&e.length?Kr(e):[]},Dn.uniqBy=function(e,t){return e&&e.length?Kr(e,$i(t,2)):[]},Dn.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Kr(e,void 0,t):[]},Dn.unset=function(e,t){return null==e||Jr(e,t)},Dn.unzip=Xo,Dn.unzipWith=$o,Dn.update=function(e,t,n){return null==e?e:Qr(e,t,oi(n))},Dn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:Qr(e,t,oi(n),r)},Dn.values=Aa,Dn.valuesIn=function(e){return null==e?[]:Dt(e,Ca(e))},Dn.without=Yo,Dn.words=Va,Dn.wrap=function(e,t){return Il(oi(t),e)},Dn.xor=Ko,Dn.xorBy=Jo,Dn.xorWith=Qo,Dn.zip=el,Dn.zipObject=function(e,t){return ri(e||[],t||[],Wn)},Dn.zipObjectDeep=function(e,t){return ri(e||[],t||[],Fr)},Dn.zipWith=tl,Dn.entries=Da,Dn.entriesIn=Ta,Dn.extend=sa,Dn.extendWith=da,Ka(Dn,Dn),Dn.add=uu,Dn.attempt=za,Dn.camelCase=La,Dn.capitalize=Ra,Dn.ceil=cu,Dn.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=la(n))==n?n:0),void 0!==t&&(t=(t=la(t))==t?t:0),$n(la(e),t,n)},Dn.clone=function(e){return Yn(e,4)},Dn.cloneDeep=function(e){return Yn(e,5)},Dn.cloneDeepWith=function(e,t){return Yn(e,5,t="function"==typeof t?t:void 0)},Dn.cloneWith=function(e,t){return Yn(e,4,t="function"==typeof t?t:void 0)},Dn.conformsTo=function(e,t){return null==t||Kn(e,t,ba(t))},Dn.deburr=xa,Dn.defaultTo=function(e,t){return null==e||e!=e?t:e},Dn.divide=su,Dn.endsWith=function(e,t,n){e=ua(e),t=Yr(t);var r=e.length,i=n=void 0===n?r:$n(ia(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Dn.eq=Al,Dn.escape=function(e){return(e=ua(e))&&U.test(e)?e.replace(P,Pt):e},Dn.escapeRegExp=function(e){return(e=ua(e))&&G.test(e)?e.replace(H,"\\$&"):e},Dn.every=function(e,t,n){var r=Pl(e)?ot:nr;return n&&lo(e,t,n)&&(t=void 0),r(e,$i(t,3))},Dn.find=ll,Dn.findIndex=xo,Dn.findKey=function(e,t){return pt(e,$i(t,3),ur)},Dn.findLast=al,Dn.findLastIndex=Po,Dn.findLastKey=function(e,t){return pt(e,$i(t,3),cr)},Dn.floor=du,Dn.forEach=ul,Dn.forEachRight=cl,Dn.forIn=function(e,t){return null==e?e:lr(e,$i(t,3),Ca)},Dn.forInRight=function(e,t){return null==e?e:ar(e,$i(t,3),Ca)},Dn.forOwn=function(e,t){return e&&ur(e,$i(t,3))},Dn.forOwnRight=function(e,t){return e&&cr(e,$i(t,3))},Dn.get=ga,Dn.gt=Ll,Dn.gte=Rl,Dn.has=function(e,t){return null!=e&&no(e,t,pr)},Dn.hasIn=ha,Dn.head=ko,Dn.identity=Za,Dn.includes=function(e,t,n,r){e=kl(e)?e:Aa(e),n=n&&!r?ia(n):0;var i=e.length;return n<0&&(n=ln(i+n,0)),Kl(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&ht(e,t,n)>-1},Dn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ia(n);return i<0&&(i=ln(r+i,0)),ht(e,t,i)},Dn.inRange=function(e,t,n){return t=ra(t),void 0===n?(n=t,t=0):n=ra(n),function(e,t,n){return e>=an(t,n)&&e<ln(t,n)}(e=la(e),t,n)},Dn.invoke=_a,Dn.isArguments=xl,Dn.isArray=Pl,Dn.isArrayBuffer=Ml,Dn.isArrayLike=kl,Dn.isArrayLikeObject=Ul,Dn.isBoolean=function(e){return!0===e||!1===e||Gl(e)&&mr(e)==a},Dn.isBuffer=Bl,Dn.isDate=jl,Dn.isElement=function(e){return Gl(e)&&1===e.nodeType&&!Xl(e)},Dn.isEmpty=function(e){if(null==e)return!0;if(kl(e)&&(Pl(e)||"string"==typeof e||"function"==typeof e.splice||Bl(e)||Ql(e)||xl(e)))return!e.length;var t=to(e);if(t==f||t==g)return!e.size;if(so(e))return!Sr(e).length;for(var n in e)if(Ce.call(e,n))return!1;return!0},Dn.isEqual=function(e,t){return _r(e,t)},Dn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===r?_r(e,t,void 0,n):!!r},Dn.isError=Fl,Dn.isFinite=function(e){return"number"==typeof e&&nn(e)},Dn.isFunction=Vl,Dn.isInteger=zl,Dn.isLength=Wl,Dn.isMap=ql,Dn.isMatch=function(e,t){return e===t||br(e,t,Ki(t))},Dn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:void 0,br(e,t,Ki(t),n)},Dn.isNaN=function(e){return Zl(e)&&e!=+e},Dn.isNative=function(e){if(co(e))throw new de("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Cr(e)},Dn.isNil=function(e){return null==e},Dn.isNull=function(e){return null===e},Dn.isNumber=Zl,Dn.isObject=Hl,Dn.isObjectLike=Gl,Dn.isPlainObject=Xl,Dn.isRegExp=$l,Dn.isSafeInteger=function(e){return zl(e)&&e>=-9007199254740991&&e<=9007199254740991},Dn.isSet=Yl,Dn.isString=Kl,Dn.isSymbol=Jl,Dn.isTypedArray=Ql,Dn.isUndefined=function(e){return void 0===e},Dn.isWeakMap=function(e){return Gl(e)&&to(e)==y},Dn.isWeakSet=function(e){return Gl(e)&&"[object WeakSet]"==mr(e)},Dn.join=function(e,t){return null==e?"":rn.call(e,t)},Dn.kebabCase=Pa,Dn.last=Fo,Dn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return void 0!==n&&(i=(i=ia(n))<0?ln(r+i,0):an(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):gt(e,yt,i,!0)},Dn.lowerCase=Ma,Dn.lowerFirst=ka,Dn.lt=ea,Dn.lte=ta,Dn.max=function(e){return e&&e.length?rr(e,Za,vr):void 0},Dn.maxBy=function(e,t){return e&&e.length?rr(e,$i(t,2),vr):void 0},Dn.mean=function(e){return _t(e,Za)},Dn.meanBy=function(e,t){return _t(e,$i(t,2))},Dn.min=function(e){return e&&e.length?rr(e,Za,wr):void 0},Dn.minBy=function(e,t){return e&&e.length?rr(e,$i(t,2),wr):void 0},Dn.stubArray=ou,Dn.stubFalse=lu,Dn.stubObject=function(){return{}},Dn.stubString=function(){return""},Dn.stubTrue=function(){return!0},Dn.multiply=fu,Dn.nth=function(e,t){return e&&e.length?Ar(e,ia(t)):void 0},Dn.noConflict=function(){return We._===this&&(We._=Ie),this},Dn.noop=Ja,Dn.now=gl,Dn.pad=function(e,t,n){e=ua(e);var r=(t=ia(t))?zt(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Li(Qt(i),n)+e+Li(Jt(i),n)},Dn.padEnd=function(e,t,n){e=ua(e);var r=(t=ia(t))?zt(e):0;return t&&r<t?e+Li(t-r,n):e},Dn.padStart=function(e,t,n){e=ua(e);var r=(t=ia(t))?zt(e):0;return t&&r<t?Li(t-r,n)+e:e},Dn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),cn(ua(e).replace(q,""),t||0)},Dn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&lo(e,t,n)&&(t=n=void 0),void 0===n&&("boolean"==typeof t?(n=t,t=void 0):"boolean"==typeof e&&(n=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=ra(e),void 0===t?(t=e,e=0):t=ra(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=sn();return an(e+i*(t-e+je("1e-"+((i+"").length-1))),t)}return Mr(e,t)},Dn.reduce=function(e,t,n){var r=Pl(e)?dt:Ot,i=arguments.length<3;return r(e,$i(t,4),n,i,er)},Dn.reduceRight=function(e,t,n){var r=Pl(e)?ft:Ot,i=arguments.length<3;return r(e,$i(t,4),n,i,tr)},Dn.repeat=function(e,t,n){return t=(n?lo(e,t,n):void 0===t)?1:ia(t),kr(ua(e),t)},Dn.replace=function(){var e=arguments,t=ua(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Dn.result=function(e,t,n){var r=-1,i=(t=li(t,e)).length;for(i||(i=1,e=void 0);++r<i;){var o=null==e?void 0:e[Io(t[r])];void 0===o&&(r=i,o=n),e=Vl(o)?o.call(e):o}return e},Dn.round=mu,Dn.runInContext=e,Dn.sample=function(e){return(Pl(e)?jn:Br)(e)},Dn.size=function(e){if(null==e)return 0;if(kl(e))return Kl(e)?zt(e):e.length;var t=to(e);return t==f||t==g?e.size:Sr(e).length},Dn.snakeCase=Ua,Dn.some=function(e,t,n){var r=Pl(e)?mt:Gr;return n&&lo(e,t,n)&&(t=void 0),r(e,$i(t,3))},Dn.sortedIndex=function(e,t){return qr(e,t)},Dn.sortedIndexBy=function(e,t,n){return Zr(e,t,$i(n,2))},Dn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=qr(e,t);if(r<n&&Al(e[r],t))return r}return-1},Dn.sortedLastIndex=function(e,t){return qr(e,t,!0)},Dn.sortedLastIndexBy=function(e,t,n){return Zr(e,t,$i(n,2),!0)},Dn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=qr(e,t,!0)-1;if(Al(e[n],t))return n}return-1},Dn.startCase=Ba,Dn.startsWith=function(e,t,n){return e=ua(e),n=null==n?0:$n(ia(n),0,e.length),t=Yr(t),e.slice(n,n+t.length)==t},Dn.subtract=vu,Dn.sum=function(e){return e&&e.length?St(e,Za):0},Dn.sumBy=function(e,t){return e&&e.length?St(e,$i(t,2)):0},Dn.template=function(e,t,n){var r=Dn.templateSettings;n&&lo(e,t,n)&&(t=void 0),e=ua(e),t=da({},t,r,ji);var i,o,l=da({},t.imports,r.imports,ji),a=ba(l),u=Dt(l,a),c=0,s=t.interpolate||ue,d="__p += '",f=pe((t.escape||ue).source+"|"+s.source+"|"+(s===F?ee:ue).source+"|"+(t.evaluate||ue).source+"|$","g"),m="//# sourceURL="+(Ce.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Me+"]")+"\n";e.replace(f,function(t,n,r,l,a,u){return r||(r=l),d+=e.slice(c,u).replace(ce,Mt),n&&(i=!0,d+="' +\n__e("+n+") +\n'"),a&&(o=!0,d+="';\n"+a+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+t.length,t}),d+="';\n";var v=Ce.call(t,"variable")&&t.variable;if(v){if(J.test(v))throw new de("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(o?d.replace(A,""):d).replace(L,"$1").replace(R,"$1;"),d="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var p=za(function(){return fe(a,m+"return "+d).apply(void 0,u)});if(p.source=d,Fl(p))throw p;return p},Dn.times=function(e,t){if((e=ia(e))<1||e>9007199254740991)return[];var n=4294967295,r=an(e,4294967295);e-=4294967295;for(var i=wt(r,t=$i(t));++n<e;)t(n);return i},Dn.toFinite=ra,Dn.toInteger=ia,Dn.toLength=oa,Dn.toLower=function(e){return ua(e).toLowerCase()},Dn.toNumber=la,Dn.toSafeInteger=function(e){return e?$n(ia(e),-9007199254740991,9007199254740991):0===e?e:0},Dn.toString=ua,Dn.toUpper=function(e){return ua(e).toUpperCase()},Dn.trim=function(e,t,n){if((e=ua(e))&&(n||void 0===t))return Nt(e);if(!e||!(t=Yr(t)))return e;var r=Wt(e),i=Wt(t);return ui(r,At(r,i),Lt(r,i)+1).join("")},Dn.trimEnd=function(e,t,n){if((e=ua(e))&&(n||void 0===t))return e.slice(0,Ht(e)+1);if(!e||!(t=Yr(t)))return e;var r=Wt(e);return ui(r,0,Lt(r,Wt(t))+1).join("")},Dn.trimStart=function(e,t,n){if((e=ua(e))&&(n||void 0===t))return e.replace(q,"");if(!e||!(t=Yr(t)))return e;var r=Wt(e);return ui(r,At(r,Wt(t))).join("")},Dn.truncate=function(e,t){var n=30,r="...";if(Hl(t)){var i="separator"in t?t.separator:i;n="length"in t?ia(t.length):n,r="omission"in t?Yr(t.omission):r}var o=(e=ua(e)).length;if(kt(e)){var l=Wt(e);o=l.length}if(n>=o)return e;var a=n-zt(r);if(a<1)return r;var u=l?ui(l,0,a).join(""):e.slice(0,a);if(void 0===i)return u+r;if(l&&(a+=u.length-a),$l(i)){if(e.slice(a).search(i)){var c,s=u;for(i.global||(i=pe(i.source,ua(te.exec(i))+"g")),i.lastIndex=0;c=i.exec(s);)var d=c.index;u=u.slice(0,void 0===d?a:d)}}else if(e.indexOf(Yr(i),a)!=a){var f=u.lastIndexOf(i);f>-1&&(u=u.slice(0,f))}return u+r},Dn.unescape=function(e){return(e=ua(e))&&k.test(e)?e.replace(x,Gt):e},Dn.uniqueId=function(e){var t=++Oe;return ua(e)+t},Dn.upperCase=ja,Dn.upperFirst=Fa,Dn.each=ul,Dn.eachRight=cl,Dn.first=ko,Ka(Dn,(au={},ur(Dn,function(e,t){Ce.call(Dn.prototype,t)||(au[t]=e)}),au),{chain:!1}),Dn.VERSION="4.17.21",rt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Dn[e].placeholder=Dn}),rt(["drop","take"],function(e,t){Rn.prototype[e]=function(n){n=void 0===n?1:ln(ia(n),0);var r=this.__filtered__&&!t?new Rn(this):this.clone();return r.__filtered__?r.__takeCount__=an(n,r.__takeCount__):r.__views__.push({size:an(n,4294967295),type:e+(r.__dir__<0?"Right":"")}),r},Rn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),rt(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;Rn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:$i(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),rt(["head","last"],function(e,t){var n="take"+(t?"Right":"");Rn.prototype[e]=function(){return this[n](1).value()[0]}}),rt(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Rn.prototype[e]=function(){return this.__filtered__?new Rn(this):this[n](1)}}),Rn.prototype.compact=function(){return this.filter(Za)},Rn.prototype.find=function(e){return this.filter(e).head()},Rn.prototype.findLast=function(e){return this.reverse().find(e)},Rn.prototype.invokeMap=Ur(function(e,t){return"function"==typeof e?new Rn(this):this.map(function(n){return Er(n,e,t)})}),Rn.prototype.reject=function(e){return this.filter(wl($i(e)))},Rn.prototype.slice=function(e,t){e=ia(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Rn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=ia(t))<0?n.dropRight(-t):n.take(t-e)),n)},Rn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Rn.prototype.toArray=function(){return this.take(4294967295)},ur(Rn.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Dn[r?"take"+("last"==t?"Right":""):t],o=r||/^find/.test(t);i&&(Dn.prototype[t]=function(){var t=this.__wrapped__,l=r?[1]:arguments,a=t instanceof Rn,u=l[0],c=a||Pl(t),s=function(e){var t=i.apply(Dn,st([e],l));return r&&d?t[0]:t};c&&n&&"function"==typeof u&&1!=u.length&&(a=c=!1);var d=this.__chain__,f=!!this.__actions__.length,m=o&&!d,v=a&&!f;if(!o&&c){t=v?t:new Rn(this);var p=e.apply(t,l);return p.__actions__.push({func:rl,args:[s],thisArg:void 0}),new Ln(p,d)}return m&&v?e.apply(this,l):(p=this.thru(s),m?r?p.value()[0]:p.value():p)})}),rt(["pop","push","shift","sort","splice","unshift"],function(e){var t=Ee[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Dn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Pl(i)?i:[],e)}return this[n](function(n){return t.apply(Pl(n)?n:[],e)})}}),ur(Rn.prototype,function(e,t){var n=Dn[t];if(n){var r=n.name+"";Ce.call(yn,r)||(yn[r]=[]),yn[r].push({name:t,func:n})}}),yn[Ii(void 0,2).name]=[{name:"wrapper",func:void 0}],Rn.prototype.clone=function(){var e=new Rn(this.__wrapped__);return e.__actions__=gi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=gi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=gi(this.__views__),e},Rn.prototype.reverse=function(){if(this.__filtered__){var e=new Rn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Rn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Pl(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],l=o.size;switch(o.type){case"drop":e+=l;break;case"dropRight":t-=l;break;case"take":t=an(t,e+l);break;case"takeRight":e=ln(e,t-l)}}return{start:e,end:t}}(0,i,this.__views__),l=o.start,a=o.end,u=a-l,c=r?a:l-1,s=this.__iteratees__,d=s.length,f=0,m=an(u,this.__takeCount__);if(!n||!r&&i==u&&m==u)return ti(e,this.__actions__);var v=[];e:for(;u--&&f<m;){for(var p=-1,g=e[c+=t];++p<d;){var h=s[p],E=h.type,y=(0,h.iteratee)(g);if(2==E)g=y;else if(!y){if(1==E)continue e;break e}}v[f++]=g}return v},Dn.prototype.at=il,Dn.prototype.chain=function(){return nl(this)},Dn.prototype.commit=function(){return new Ln(this.value(),this.__chain__)},Dn.prototype.next=function(){void 0===this.__values__&&(this.__values__=na(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},Dn.prototype.plant=function(e){for(var t,n=this;n instanceof An;){var r=To(n);r.__index__=0,r.__values__=void 0,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Dn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Rn){var t=e;return this.__actions__.length&&(t=new Rn(this)),(t=t.reverse()).__actions__.push({func:rl,args:[Ho],thisArg:void 0}),new Ln(t,this.__chain__)}return this.thru(Ho)},Dn.prototype.toJSON=Dn.prototype.valueOf=Dn.prototype.value=function(){return ti(this.__wrapped__,this.__actions__)},Dn.prototype.first=Dn.prototype.head,Ct&&(Dn.prototype[Ct]=function(){return this}),Dn}();Ge?((Ge.exports=qt)._=qt,He._=qt):We._=qt}).call(M)});const U=["digit-ui","works-ui","workbench-ui","health-ui","sanitation-ui","core-ui","mgramseva-web"],B=(e,t)=>{if("object"!=typeof e||null===e)return null;const n=Object.keys(e).map(n=>{var r,i,o,l,a;return"string"==typeof(null===(r=e[n])||void 0===r||null===(i=r.item)||void 0===i?void 0:i.path)?(null===(o=e[n])||void 0===o||null===(l=o.item)||void 0===l||null===(a=l.path)||void 0===a?void 0:a.split(t?t+"."+n:"."+n))||B(e[n],n):null});return null==n?void 0:n[0]},j=function(e){var t,n,r;void 0===e&&(e="");const i=null===(t=e)||void 0===t?void 0:t.split(".");return null!==(n=e)&&void 0!==n&&null!==(r=n.endsWith)&&void 0!==r&&r.call(n,".")?i[0]:i[(null==i?void 0:i.length)-1]},F=e=>{let{data:o}=e;const{t:l}=i.useTranslation(),u=a.useHistory(),[s,d]=n.useState({}),[f,m]=n.useState(null),[v,p]=n.useState(null),[g,h]=n.useState(null),[E,y]=n.useState(!1),_={home:r.createElement(t.HomeIcon,null),announcement:r.createElement(t.ComplaintIcon,null),business:r.createElement(t.BPAHomeIcon,null),store:r.createElement(t.PropertyHouse,null),assignment:r.createElement(t.CaseIcon,null),receipt:r.createElement(t.ReceiptIcon,null),"business-center":r.createElement(t.PersonIcon,null),description:r.createElement(t.DocumentIconSolid,null),"water-tap":r.createElement(t.DropIcon,null),"collections-bookmark":r.createElement(t.CollectionsBookmarIcons,null),"insert-chart":r.createElement(t.FinanceChartIcon,null),edcr:r.createElement(t.CollectionIcon,null),collections:r.createElement(t.CollectionIcon,null)};function b(e){void 0===e&&(e={});for(const o in e){const l=e[o];var t,n,r,i;if("item"===o&&""!==(null==l?void 0:l.leftIcon))return{iconKey:null==l||null===(t=l.leftIcon)||void 0===t||null===(n=t.split(":"))||void 0===n?void 0:n[0],iconName:null==l||null===(r=l.leftIcon)||void 0===r||null===(i=r.split(":"))||void 0===i?void 0:i[1]};if("object"==typeof e[o]&&!Array.isArray(e[o])){const t=b(e[o]);if(t)return t}}return null}const C=function(e,n,i,o){void 0===n&&(n=null),void 0===i&&(i=!0),void 0===o&&(o=0);const a=Object.values(e).sort((e,t)=>{var n,r;return null!=e&&e.item&&null!=t&&t.item?(null==e||null===(n=e.item)||void 0===n?void 0:n.orderNumber)-(null==t||null===(r=t.item)||void 0===r?void 0:r.orderNumber):(null==e?void 0:e[0])<(null==t?void 0:t[0])?-1:(null==e?void 0:e[0])>(null==t?void 0:t[0])?1:0}).map(e=>{var t,n,r;return(null==e||null===(t=e.item)||void 0===t?void 0:t.path)&&j(null==e||null===(n=e.item)||void 0===n?void 0:n.path)||j(null===(r=B(e))||void 0===r?void 0:r[0])});return r.createElement("div",{className:"submenu-container level-"+o},a.map((a,y)=>{const O=e[a],S=O?"item"===Object.keys(O)[0]:null,w=s[a]||!1;var N=n?""+n:a;const I=null==a?void 0:a.replace(/[ -]/g,"_"),D=l(Digit.Utils.locale.getTransformedLocale("ACTION_TEST_"+I)),T=l((null==D?void 0:D.length)>20?D.substring(0,20)+"...":D);if(!S&&O&&Object.keys(O).length>0){const{iconKey:e,iconName:n}=b(O)||{};let u=_[n]||_.collections;var A,L,R;"dynamic"===e&&(u=(k=null===(A=require("@egovernments/digit-ui-react-components"))||void 0===A?void 0:A[n])?r.createElement(k,null):u),"svg"===e&&(u=(k=null===(L=require("@egovernments/digit-ui-react-components"))||void 0===L||null===(R=L.SVG)||void 0===R?void 0:R[n])?r.createElement(k,{fill:"white"}):u);const s=f===N,v=g===T;return r.createElement("div",{key:y,className:"sidebar-link level-"+o+" "+(s?"select-level":""),style:{display:"flex",flexDirection:"column",alignItems:"flex-start"}},r.createElement("div",{className:"actions "+(v&&1===o?"selected-action-level-1":s?"default-"+o+" active":"default-"+o),onClick:e=>{(e=>{d(t=>({...t,[e]:!t[e]}))})(a),m(e=>e===N?null:N);const t=e.target.innerText;h(e=>e===t||w?null:t),p(null)},style:{display:"flex",flexDirection:"row",width:"100%"}},i&&r.createElement("div",{className:"link-icon"},u),r.createElement("div",{"data-tip":"React-tooltip","data-for":"jk-side-"+a},r.createElement("span",null," ",T," "),(null==T?void 0:T.includes("..."))&&r.createElement(c,{textColor:"white",backgroundColor:"grey",place:"right",type:"info",effect:"solid",id:"jk-side-"+a},l(Digit.Utils.locale.getTransformedLocale("ACTION_TEST_"+a)))),r.createElement("div",{style:{position:"relative",marginLeft:"auto"},className:"arrow "+(v&&1===o?"selected-arrow":"")+" "},w?r.createElement(t.ArrowVectorDown,{height:"28px",width:"28px"}):r.createElement(t.ArrowForward,null))),E&&r.createElement("div",{style:{width:"100%"}},w&&C(O,N,!1,o+1)))}if(S){const{iconName:e,iconKey:t}=b(O)||{};let s=_[e]||_.collections;var x,P,M,k;return"dynamic"===t&&(s=(k=null===(x=require("@egovernments/digit-ui-react-components"))||void 0===x?void 0:x[e])?r.createElement(k,null):s),"svg"===t&&(s=(k=null===(P=require("@egovernments/digit-ui-react-components"))||void 0===P||null===(M=P.SVG)||void 0===M?void 0:M[e])?r.createElement(k,{fill:"white"}):s),r.createElement("a",{key:y,className:"dropdown-link new-dropdown-link "+(v===O.item.path?"active":"")+" level-"+o,onClick:()=>{var e;const t=O.item.path;m(n),p(t),h(null),function(e,t){var n,r;if(void 0===e&&(e={}),void 0===t&&(t=""),-1===(null===(n=t)||void 0===n?void 0:n.indexOf("/"+(null===(r=window)||void 0===r?void 0:r.contextPath)))){const e=window.location.origin,n=null!=U&&U.every(e=>{var n;return-1===(null===(n=t)||void 0===n?void 0:n.indexOf("/"+e))})?e+"/employee/"+t:e+t;window.location.href=n}else e.push(t)}(u,""+(null==O||null===(e=O.item)||void 0===e?void 0:e.navigationURL))}},r.createElement("div",{className:"actions level-"+o+" "+("Home"===T?"custom":""),"data-tip":"React-tooltip","data-for":"jk-side-"+a},i&&r.createElement("div",{className:"link-icon"},s),r.createElement("span",null," ",T," "),(null==T?void 0:T.includes("..."))&&r.createElement(c,{textColor:"white",backgroundColor:"grey",place:"right",type:"info",effect:"solid",id:"jk-side-"+a},l(Digit.Utils.locale.getTransformedLocale("ACTION_TEST_"+a)))))}}))};return r.createElement("div",{className:"new-sidebar "+(s?"show":""),onMouseEnter:()=>{y(!0)},onMouseLeave:()=>{y(!1),d({}),m(null),p(null),h(null)}},C(o))},V=function(e,t){return void 0===e&&(e=""),void 0===t&&(t=""),e.toLowerCase().includes(t.toLowerCase())},z=()=>{const e=n.useRef(null),{isLoading:o,data:l}=Digit.Hooks.useAccessControl(),[a,u]=n.useState(""),{t:c}=i.useTranslation(),[s,d]=n.useState(!1);n.useEffect(()=>{if(o)return r.createElement(t.Loader,null);e.current.style.cursor="pointer",f()},[o]);const f=()=>{e.current.style.width="60px",e.current.style.overflow="hidden",d(!1)};function m(e,t){for(const n in t)t.hasOwnProperty(n)&&("object"!=typeof t[n]||Array.isArray(t[n])?e[n]||(e[n]=t[n]):(e[n]||(e[n]={}),m(e[n],t[n])))}const v={};return null==l||l.actions.filter(e=>"url"===e.url).forEach(e=>{var t,n,r;let i=(null==e||null===(t=e.path)||void 0===t||null===(n=t.split("."))||void 0===n?void 0:n[0])||"";if(""==a&&""!==e.path){const t=e.path.split(".");let n={};t.reduce((n,r,i)=>{if(i!==t.length-1)return n[r]={},n[r];n[r]={item:e}},n),m(v,n)}else if(V(c("ACTION_TEST_"+(null==i||null===(r=i.toUpperCase())||void 0===r?void 0:r.replace(/[ -]/g,"_"))),a)||V(c(Digit.Utils.locale.getTransformedLocale("ACTION_TEST_"+(null==e?void 0:e.displayName))),a)){const t=e.path.split(".");let n={};t.reduce((n,r,i)=>{if(i!==t.length-1)return n[r]={},n[r];n[r]={item:e}},n),m(v,n)}}),o?r.createElement(t.Loader,null):v?r.createElement("div",{className:"sidebar",ref:e,onMouseOver:()=>{e.current.style.width="260px",d(!0)},onMouseLeave:f},r.createElement("div",{className:""},r.createElement("div",{className:"sidebar-link"},s?r.createElement("div",{className:"actions search-icon-wrapper"},r.createElement("input",{className:"employee-search-input nav-bar",type:"text",placeholder:c("ACTION_TEST_SEARCH"),name:"search",value:a,onChange:e=>u(e.target.value)}),r.createElement(t.SearchIcon,{className:"search-icon"})):r.createElement("div",{className:"actions search-icon-wrapper-new"},r.createElement(t.SearchIcon,{className:"search-icon"})))),(e=>{const t=Object.entries(e);t.sort((e,t)=>e[0]<t[0]?-1:e[0]>t[0]?1:0);const n=Object.fromEntries(t);return r.createElement(F,{data:e=n})})(v)):""},W=e=>{let{CITIZEN:t,isSidebarOpen:n,toggleSidebar:i,handleLogout:o,mobileView:l,userDetails:a,modules:u,linkData:c,islinkDataLoading:s}=e;return t?r.createElement(P,{isOpen:n,isMobile:!0,toggleSidebar:i,onLogout:o,linkData:c,islinkDataLoading:s}):!n&&null!=a&&a.access_token?r.createElement("div",{className:"digit-employeeSidebar"},r.createElement(z,{mobileView:l,userDetails:a,modules:u})):r.createElement("div",{className:"digit-citizenSidebar"},r.createElement(P,{isOpen:n,isMobile:!0,toggleSidebar:i,onLogout:o,isEmployee:!0}))},H=e=>{let{t:t,stateInfo:i,userDetails:o,CITIZEN:l,cityDetails:u,mobileView:c,handleUserDropdownSelection:s,logoUrl:d,showSidebar:f=!0,showLanguageChange:m,linkData:v,islinkDataLoading:p}=e;const[g,h]=n.useState(!1),E=a.useHistory(),[y,_]=n.useState(!1),b=()=>{h(!1),_(!0)},C=()=>{_(!1)},O=()=>{h(!g)},w=[{name:t("EDIT_PROFILE"),icon:"Edit",func:()=>{var e;E.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/user/profile")}},{name:t("CORE_COMMON_LOGOUT"),icon:"Logout",func:b}];return r.createElement(r.Fragment,null,r.createElement(S,{t:t,stateInfo:i,toggleSidebar:O,isSidebarOpen:g,handleLogout:b,userDetails:o,CITIZEN:l,cityDetails:u,mobileView:c,userOptions:w,handleUserDropdownSelection:s,logoUrl:d,showLanguageChange:m}),y&&r.createElement(D,{onSelect:()=>{Digit.UserService.logout(),_(!1)},onCancel:C,onDismiss:C}),f&&r.createElement(W,{t:t,CITIZEN:l,isSidebarOpen:g,toggleSidebar:O,handleLogout:b,mobileView:c,userDetails:o,linkData:v,islinkDataLoading:p}))},G=e=>{const{question:o,answer:l,lastIndex:a}=e,[u,c]=n.useState(!1),{t:s}=i.useTranslation();return r.createElement("div",{className:"faqs border-none",onClick:()=>c(!u)},r.createElement("div",{className:"faq-question",style:{justifyContent:"space-between",display:"flex"}},r.createElement("span",null,s(o)),r.createElement("span",{className:u?"faqicon rotate":"faqicon",style:{float:"right"}},r.createElement(t.ArrowForward,null))),r.createElement("div",{className:"faq-answer",style:u?{display:"block"}:{display:"none"}},r.createElement("span",null,s(l))),a?null:r.createElement("div",{className:"cs-box-border"}))},q=e=>{var o,l,a;let{module:u}=e;const c=Digit.UserService.getUser(),{t:s}=((null==c||null===(o=c.info)||void 0===o?void 0:o.tenantId)||Digit.ULBService.getCurrentTenantId(),i.useTranslation()),{isLoading:d,data:f}=Digit.Hooks.useGetFAQsJSON(Digit.ULBService.getStateId()),m=null==f||null===(l=f.MdmsRes["common-masters"])||void 0===l||null===(a=l.faqs[0])||void 0===a?void 0:a[""+u].faqs;return d?r.createElement(t.Loader,null):r.createElement(n.Fragment,null,r.createElement("div",{className:"faq-page"},r.createElement(t.BackButton,{style:{marginLeft:"unset"}}),r.createElement("div",{style:{marginBottom:"15px"}},r.createElement(t.Header,{styles:{marginLeft:"0px",paddingTop:"10px",fontSize:"32px"}},s("FAQ_S"))),r.createElement("div",{className:"faq-list"},m.map((e,t)=>r.createElement(G,{key:"faq_"+t,question:e.question,answer:e.answer,lastIndex:t===(null==m?void 0:m.length)-1})))))},Z=()=>{var e,n,o,l,u,c,s,d,f,m,v,p,g,h,E,y,_,b,C,O,S,w,N;const{t:D}=i.useTranslation(),T=a.useHistory(),A=Digit.ULBService.getCitizenCurrentTenant(!0),{data:{uiHomePage:L}={},isLoading:R}=Digit.Hooks.useStore.getInitData();let x=window.Digit.Utils.browser.isMobile();const P=()=>{var e,t,n,r,i;return"EMPLOYEE"!==(null===(e=Digit.UserService)||void 0===e||null===(t=e.getUser())||void 0===t||null===(n=t.info)||void 0===n?void 0:n.type)&&!(null===(r=Digit.UserService)||void 0===r||null===(i=r.getUser())||void 0===i||!i.access_token)},{data:M,isLoading:k}=Digit.Hooks.useEvents({tenantId:A,variant:"whats-new",config:{enabled:P()}});var U;A||T.push("/"+(null===(U=window)||void 0===U?void 0:U.contextPath)+"/citizen/select-language");const B=null==L?void 0:L.appBannerDesktop,j=null==L?void 0:L.appBannerMobile,F=null==L?void 0:L.citizenServicesCard,V=null==L?void 0:L.informationAndUpdatesCard,z=null==L?void 0:L.whatsAppBannerDesktop,W=null==L?void 0:L.whatsAppBannerMobile,H=null==L?void 0:L.whatsNewSection,G=null==L?void 0:L.redirectURL;var q,Z;G&&T.push("/"+(null===(q=window)||void 0===q?void 0:q.contextPath)+"/citizen/"+G),null!==(e=window)&&void 0!==e&&null!==(n=e.location)&&void 0!==n&&null!==(o=n.href)&&void 0!==o&&null!==(l=o.includes)&&void 0!==l&&l.call(o,"sanitation-ui")&&T.push("/"+(null===(Z=window)||void 0===Z?void 0:Z.contextPath)+"/citizen/all-services");const X=e=>{window.open(null==e?void 0:e.navigationUrl)},$={header:D(null==F?void 0:F.headerLabel),sideOption:{name:D(null==F||null===(u=F.sideOption)||void 0===u?void 0:u.name),onClick:()=>{var e;return T.push(null==F||null===(e=F.sideOption)||void 0===e?void 0:e.navigationUrl)}},options:[{name:D(null==F||null===(c=F.props)||void 0===c||null===(s=c[0])||void 0===s?void 0:s.label),Icon:r.createElement(t.ComplaintIcon,null),onClick:()=>{var e,t;return T.push(null==F||null===(e=F.props)||void 0===e||null===(t=e[0])||void 0===t?void 0:t.navigationUrl)}},{name:D(null==F||null===(d=F.props)||void 0===d||null===(f=d[1])||void 0===f?void 0:f.label),Icon:r.createElement(t.PTIcon,{className:"fill-path-primary-main"}),onClick:()=>{var e,t;return T.push(null==F||null===(e=F.props)||void 0===e||null===(t=e[1])||void 0===t?void 0:t.navigationUrl)}},{name:D(null==F||null===(m=F.props)||void 0===m||null===(v=m[2])||void 0===v?void 0:v.label),Icon:r.createElement(t.CaseIcon,{className:"fill-path-primary-main"}),onClick:()=>{var e,t;return T.push(null==F||null===(e=F.props)||void 0===e||null===(t=e[2])||void 0===t?void 0:t.navigationUrl)}},{name:D(null==F||null===(p=F.props)||void 0===p||null===(g=p[3])||void 0===g?void 0:g.label),Icon:r.createElement(t.OBPSIcon,null),onClick:()=>{var e,t;return T.push(null==F||null===(e=F.props)||void 0===e||null===(t=e[3])||void 0===t?void 0:t.navigationUrl)}}],styles:{display:"flex",flexWrap:"wrap",justifyContent:"flex-start",width:"100%"}},Y={header:D(null==V?void 0:V.headerLabel),sideOption:{name:D(null==V||null===(h=V.sideOption)||void 0===h?void 0:h.name),onClick:()=>{var e;return T.push(null==V||null===(e=V.sideOption)||void 0===e?void 0:e.navigationUrl)}},options:[{name:D(null==V||null===(E=V.props)||void 0===E||null===(y=E[0])||void 0===y?void 0:y.label),Icon:r.createElement(t.HomeIcon,null),onClick:()=>{var e,t;return T.push(null==V||null===(e=V.props)||void 0===e||null===(t=e[0])||void 0===t?void 0:t.navigationUrl)}},{name:D(null==V||null===(_=V.props)||void 0===_||null===(b=_[1])||void 0===b?void 0:b.label),Icon:r.createElement(t.Calender,null),onClick:()=>{var e,t;return T.push(null==V||null===(e=V.props)||void 0===e||null===(t=e[1])||void 0===t?void 0:t.navigationUrl)}},{name:D(null==V||null===(C=V.props)||void 0===C||null===(O=C[2])||void 0===O?void 0:O.label),Icon:r.createElement(t.DocumentIcon,null),onClick:()=>{var e,t;return T.push(null==V||null===(e=V.props)||void 0===e||null===(t=e[2])||void 0===t?void 0:t.navigationUrl)}},{name:D(null==V||null===(S=V.props)||void 0===S||null===(w=S[3])||void 0===w?void 0:w.label),Icon:r.createElement(t.DocumentIcon,null),onClick:()=>{var e,t;return T.push(null==V||null===(e=V.props)||void 0===e||null===(t=e[3])||void 0===t?void 0:t.navigationUrl)}}],styles:{display:"flex",flexWrap:"wrap",justifyContent:"flex-start",width:"100%"}};return R?r.createElement(t.Loader,null):r.createElement("div",{className:"HomePageContainer"},r.createElement("div",{className:"HomePageWrapper"},r.createElement("div",{className:"BannerWithSearch"},r.createElement("img",x?{src:null==j?void 0:j.bannerUrl}:{src:null==B?void 0:B.bannerUrl}),r.createElement("div",{className:"ServicesSection"},r.createElement(t.CardBasedOptions,I({style:{marginTop:"-30px"}},$)),r.createElement(t.CardBasedOptions,I({style:x?{}:{marginTop:"-30px"}},Y)))),(W||z)&&r.createElement("div",{className:"WhatsAppBanner"},r.createElement("img",x?{src:null==W?void 0:W.bannerUrl,onClick:()=>X(W)}:{src:null==z?void 0:z.bannerUrl,onClick:()=>X(z)})),P()?k?r.createElement(t.Loader,null):r.createElement("div",{className:"WhatsNewSection"},r.createElement("div",{className:"headSection"},r.createElement("h2",null,D(null==H?void 0:H.headerLabel)),r.createElement("p",{onClick:()=>{var e;return T.push(null==H||null===(e=H.sideOption)||void 0===e?void 0:e.navigationUrl)}},D(null==H||null===(N=H.sideOption)||void 0===N?void 0:N.name))),r.createElement(t.WhatsNewCard,null==M?void 0:M[0])):null))},X=()=>{const{t:e}=i.useTranslation(),o=a.useHistory(),{data:{languages:l,stateInfo:u}={},isLoading:c}=Digit.Hooks.useStore.getInitData(),s=Digit.StoreData.getCurrentLanguage(),d=n.useMemo(()=>({header:e("CS_COMMON_CHOOSE_LANGUAGE"),submitBarLabel:e("CORE_COMMON_CONTINUE")}),[e]),f=n.useMemo(()=>({options:l,optionsKey:"label",additionalWrapperClass:"digit-reverse-radio-selection-wrapper",onSelect:e=>Digit.LocalizationService.changeLanguage(e.value,u.code),selectedOption:null==l?void 0:l.filter(e=>e.value===s)[0]}),[s,l]);return c?r.createElement(t.Loader,null):r.createElement("div",{className:"selection-card-wrapper"},r.createElement(t.PageBasedInput,{texts:d,onSubmit:function(){var e;o.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/citizen/select-location")}},r.createElement(t.CardHeader,null,e("CS_COMMON_CHOOSE_LANGUAGE")),r.createElement(t.RadioButtons,f)))},$=()=>{const{t:e}=i.useTranslation(),o=a.useHistory(),l=a.useLocation(),{data:u,isLoading:c}=Digit.Hooks.useTenants(),[s,d]=n.useState(()=>({code:Digit.ULBService.getCitizenCurrentTenant(!0)})),[f,m]=n.useState(!1),v=n.useMemo(()=>({header:e("CS_COMMON_CHOOSE_LOCATION"),submitBarLabel:e("CORE_COMMON_CONTINUE")}),[e]);function p(e){d(e),m(!1)}const g=n.useMemo(()=>({options:u,optionsKey:"i18nKey",additionalWrapperClass:"digit-reverse-radio-selection-wrapper",onSelect:p,selectedOption:s}),[u,e,s]);return c?r.createElement("loader",null):r.createElement("div",{className:"selection-card-wrapper"},r.createElement(t.BackButton,null),r.createElement(t.PageBasedInput,{texts:v,onSubmit:function(){if(s){var e,t;Digit.SessionStorage.set("CITIZEN.COMMON.HOME.CITY",s);const n=null===(e=l.state)||void 0===e?void 0:e.redirectBackTo;n?o.replace(n):o.push("/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/citizen")}else m(!0)},className:"location-selection-container"},r.createElement(t.CardHeader,null,e("CS_COMMON_CHOOSE_LOCATION")),r.createElement(t.SearchOnRadioButtons,I({},g,{placeholder:e("COMMON_TABLE_SEARCH")})),f?r.createElement(t.CardLabelError,null,e("CS_COMMON_LOCATION_SELECTION_ERROR")):null))},Y=function(){function e(){}return e.prototype.then=function(t,n){const r=new e,i=this.s;if(i){const e=1&i?t:n;if(e){try{K(r,1,e(this.v))}catch(e){K(r,2,e)}return r}return this}return this.o=function(e){try{const i=e.v;1&e.s?K(r,1,t?t(i):i):n?K(r,1,n(i)):K(r,2,i)}catch(e){K(r,2,e)}},r},e}();function K(e,t,n){if(!e.s){if(n instanceof Y){if(!n.s)return void(n.o=K.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(K.bind(null,e,t),K.bind(null,e,2));e.s=t,e.v=n;const r=e.o;r&&r(e)}}function J(e){return e instanceof Y&&1&e.s}const Q="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function ee(e,t,n){if("function"==typeof e[Q]){var r,i,o,l=e[Q]();if(function e(a){try{for(;!((r=l.next()).done||n&&n());)if((a=t(r.value))&&a.then){if(!J(a))return void a.then(e,o||(o=K.bind(null,i=new Y,2)));a=a.v}i?K(i,1,a):i=a}catch(e){K(i||(i=new Y),2,e)}}(),l.return){var a=function(e){try{r.done||l.return()}catch(e){}return e};if(i&&i.then)return i.then(a,function(e){throw a(e)});a()}return i}if(!("length"in e))throw new TypeError("Object is not iterable");for(var u=[],c=0;c<e.length;c++)u.push(e[c]);return function(e,t,n){var r,i,o=-1;return function l(a){try{for(;++o<e.length&&(!n||!n());)if((a=t(o))&&a.then){if(!J(a))return void a.then(l,i||(i=K.bind(null,r=new Y,2)));a=a.v}r?K(r,1,a):r=a}catch(e){K(r||(r=new Y),2,e)}}(),r}(u,function(e){return t(u[e])},n)}function te(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}function ne(e){let{setProfilePic:o,closeDrawer:l,userType:a,removeProfilePic:u,showToast:c}=e;const[s,d]=n.useState(null),[f,m]=n.useState(""),[v,p]=n.useState(null),{t:g}=i.useTranslation();return n.useEffect(()=>{!function(){try{p(null);const e=function(){if(f){const e=function(){if(f.size>=1e6)c("error",g("CORE_COMMON_PROFILE_MAXIMUM_UPLOAD_SIZE_EXCEEDED")),p(g("CORE_COMMON_PROFILE_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else{const e=te(function(){return Promise.resolve(Digit.UploadServices.Filestorage(a+"-profile",f,Digit.ULBService.getStateId())).then(function(e){var t,n;if((null==e||null===(t=e.data)||void 0===t||null===(n=t.files)||void 0===n?void 0:n.length)>0){var r,i;const t=null==e||null===(r=e.data)||void 0===r||null===(i=r.files[0])||void 0===i?void 0:i.fileStoreId;d(t),o(t)}else c("error",g("CORE_COMMON_PROFILE_FILE_UPLOAD_ERROR")),p(g("CORE_COMMON_PROFILE_FILE_UPLOAD_ERROR"))})},function(){c("error",g("CORE_COMMON_PROFILE_INVALID_FILE_INPUT"))});if(e&&e.then)return e.then(function(){})}}();if(e&&e.then)return e.then(function(){})}}();e&&e.then&&e.then(function(){})}catch(e){Promise.reject(e)}}()},[f]),r.createElement(r.Fragment,null,r.createElement("div",{style:{position:"fixed",top:"0",left:"0",right:"0",bottom:"0",width:"100%",height:"100vh",backgroundColor:"rgba(0,0,0,.5)"},onClick:()=>l()}),r.createElement("div",{style:{width:"100%",justifyContent:"space-between",display:"flex",backgroundColor:"white",alignItems:"center",position:"fixed",left:"0",right:"0",height:"20%",bottom:"citizen"===a?"2.5rem":"0",zIndex:"1000"}},r.createElement("div",{style:{display:"flex",flex:"1",flexDirection:"column",width:"100%",justifyContent:"center",alignItems:"center",gap:"8px 0"}},r.createElement("label",{for:"file",style:{cursor:"pointer"}}," ",r.createElement(t.GalleryIcon,null)),r.createElement("label",{style:{cursor:"pointer"}}," Gallery"),r.createElement("input",{type:"file",id:"file",accept:"image/*, .png, .jpeg, .jpg",onChange:e=>m(e.target.files[0]),style:{display:"none"}})),r.createElement("div",{style:{display:"flex",flex:"1",width:"100%",justifyContent:"center",alignItems:"center",flexDirection:"column",gap:"8px 0"}},r.createElement("button",{onClick:()=>{u(),l()}},r.createElement(t.RemoveIcon,null)),r.createElement("label",{style:{cursor:"pointer"}},"Remove"))))}"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));const re=e=>{var o,l,u,c,s,d,f,m,v,p,g;let{stateCode:h,userType:E,cityDetails:y}=e;a.useHistory();const{t:_}=i.useTranslation(),b=window.location.href,C=Digit.ULBService.getStateId(),O=Digit.ULBService.getCurrentTenantId(),S=(null===(o=Digit.UserService.getUser())||void 0===o?void 0:o.info)||{},[w,N]=n.useState(null),[D,T]=n.useState(null!=S&&S.name?S.name:""),[A,L]=n.useState(null!=S&&S.emailId?S.emailId:""),[R,x]=n.useState(null==w?void 0:w.gender),[P,M]=n.useState(null!=S&&S.permanentCity?S.permanentCity:y.name),[k,U]=n.useState(null!=S&&S.mobileNumber?S.mobileNumber:""),[B,j]=n.useState(null),[F,V]=n.useState(""),[z,W]=n.useState(!1),[H,G]=n.useState(!1),[q,Z]=n.useState(""),[X,$]=n.useState(""),[Y,K]=n.useState(""),[J,Q]=n.useState(null),[ee,re]=n.useState(!1),[ie,oe]=r.useState(window.innerWidth),[le,ae]=r.useState({}),ue=window.Digit.Utils.browser.isMobile();r.useEffect(()=>(window.addEventListener("resize",()=>oe(window.innerWidth)),()=>{window.removeEventListener("resize",()=>oe(window.innerWidth))})),n.useEffect(()=>{var e;re(!0),function(){try{const e=null==S?void 0:S.uuid,t=function(){if(e)return Promise.resolve(Digit.UserService.userSearch(O,{uuid:[e]},{})).then(function(e){e&&e.user&&e.user.length&&N(e.user[0])})}();Promise.resolve(t&&t.then?t.then(function(){}):void 0)}catch(e){return Promise.reject(e)}}(),x({i18nKey:void 0,code:null==w?void 0:w.gender,value:null==w?void 0:w.gender});const t=null==w||null===(e=w.photo)||void 0===e?void 0:e.split(",");V(null==t?void 0:t.at(0)),re(!1)},[null!==w]);let ce={};const se=e=>x(e),de=()=>W(!1),fe=e=>{T(e),!new RegExp(/^[a-zA-Z ]+$/i).test(e)||0===e.length||e.length>50?ae({...le,userName:{type:"pattern",message:"CORE_COMMON_PROFILE_NAME_INVALID"}}):ae({...le,userName:null})},me=e=>{(null==S?void 0:S.userName)!==e?(L(e),!e.length||e.includes("@")&&e.includes(".")?ae({...le,emailAddress:null}):ae({...le,emailAddress:{type:"pattern",message:"CORE_COMMON_PROFILE_EMAIL_INVALID"}})):ae({...le,emailAddress:null})},ve=function(e,t,n){void 0===n&&(n=5e3),Q({key:e,action:t}),setTimeout(()=>{Q(null)},n)},pe=function(){try{let t=!1;function e(e){if(t)return e;re(!1)}re(!0);const n=te(function(){const e={...S,name:D,gender:null==R?void 0:R.value,emailId:A,photo:B};if(!new RegExp(/^([a-zA-Z ])*$/).test(D)||""===D||D.length>50||D.length<1)throw JSON.stringify({type:"error",message:_("CORE_COMMON_PROFILE_NAME_INVALID")});if("employee"===E&&!new RegExp(/^[6-9]{1}[0-9]{9}$/).test(k))throw JSON.stringify({type:"error",message:_("CORE_COMMON_PROFILE_MOBILE_NUMBER_INVALID")});if(A.length&&(!A.includes("@")||!A.includes(".")))throw JSON.stringify({type:"error",message:_("CORE_COMMON_PROFILE_EMAIL_INVALID")});if(H&&(q.length||X.length||Y.length)){if(X!==Y)throw JSON.stringify({type:"error",message:_("CORE_COMMON_PROFILE_PASSWORD_MISMATCH")});if(!(q.length&&X.length&&Y.length))throw JSON.stringify({type:"error",message:_("CORE_COMMON_PROFILE_PASSWORD_INVALID")});if(!new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(X)&&!new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(Y))throw JSON.stringify({type:"error",message:_("CORE_COMMON_PROFILE_PASSWORD_INVALID")})}return Promise.resolve(Digit.UserService.updateUser(e,h)).then(function(e){let{responseInfo:t}=e;if(t&&"200"===t.status){const e=Digit.UserService.getUser();e&&Digit.UserService.setUser({...e,info:{...e.info,name:D,mobileNumber:k,emailId:A,permanentCity:P}})}return function(){if(q.length&&X.length&&Y.length){const e={existingPassword:q,newPassword:X,tenantId:O,type:"EMPLOYEE",username:null==S?void 0:S.userName,confirmPassword:Y};return function(){if(X===Y)return te(function(){return Promise.resolve(Digit.UserService.changePassword(e,O)).then(function(e){const{responseInfo:t}=e;if(null==t||!t.status||"200"!==t.status)throw"";ve("success",_("CORE_COMMON_PROFILE_UPDATE_SUCCESS_WITH_PASSWORD"),5e3),setTimeout(()=>Digit.UserService.logout(),2e3)})},function(e){var t,n;throw JSON.stringify({type:"error",message:null!==(t=e.Errors)&&void 0!==t&&null!==(n=t.at(0))&&void 0!==n&&n.description?e.Errors.at(0).description:"CORE_COMMON_PROFILE_UPDATE_ERROR_WITH_PASSWORD"})});throw JSON.stringify({type:"error",message:"CORE_COMMON_PROFILE_ERROR_PASSWORD_NOT_MATCH"})}()}null!=t&&t.status&&"200"===t.status&&ve("success",_("CORE_COMMON_PROFILE_UPDATE_SUCCESS"),5e3)}()})},function(e){const t=JSON.parse(e);ve(t.type,_(t.message),5e3)});return Promise.resolve(n&&n.then?n.then(e):e(n))}catch(e){return Promise.reject(e)}};let ge=[];const{data:he}=Digit.Hooks.useGenderMDMS(C,"common-masters","GenderType");return he&&he.map(e=>{ge.push({i18nKey:"PT_COMMON_GENDER_"+e.code,code:""+e.code,value:""+e.code})}),ee?r.createElement(t.Loader,null):r.createElement("div",{className:"user-profile"},r.createElement("section",{style:{margin:"citizen"===E||ue?"8px":"24px"}},"citizen"===E||ue?r.createElement(t.BackButton,null):r.createElement(t.BreadCrumb,{crumbs:[{path:"/"+(null===(l=window)||void 0===l?void 0:l.contextPath)+"/employee",content:_("ES_COMMON_HOME"),show:!0},{path:"/"+(null===(u=window)||void 0===u?void 0:u.contextPath)+"/employee/user/profile",content:_("ES_COMMON_PAGE_1"),show:b.includes("/user/profile")}]})),r.createElement("div",{style:{display:"flex",flex:1,flexDirection:ie<768||"citizen"===E?"column":"row",margin:"citizen"===E?"8px":"16px",gap:"citizen"===E?"":"0 24px",boxShadow:"citizen"===E?"1px 1px 4px 0px rgba(0,0,0,0.2)":"",background:"citizen"===E?"white":"",borderRadius:"citizen"===E?"4px":"",maxWidth:"citizen"===E?"960px":""}},r.createElement("section",{style:{position:"relative",display:"flex",flex:"citizen"===E?1:2.5,justifyContent:"center",alignItems:"center",maxWidth:"100%",height:"376px",borderRadius:"4px",boxShadow:"citizen"===E?"":"1px 1px 4px 0px rgba(0,0,0,0.2)",border:("citizen"===E?"8px":"24px")+" solid #fff",background:"#EEEEEE",padding:"citizen"===E?"8px":"16px"}},r.createElement("div",{style:{position:"relative",height:"citizen"===E?"114px":"150px",width:"citizen"===E?"114px":"150px",margin:"16px"}},r.createElement("img",{style:{margin:"auto",borderRadius:"300px",justifyContent:"center",height:"100%",width:"100%"},src:F&&""!==F?F:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAO4AAADUCAMAAACs0e/bAAAAM1BMVEXK0eL////Dy97GzuD4+fvL0uPg5O7T2efb4OvR1+Xr7vTk5/Df4+37/P3v8fbO1eTt8PUsnq5FAAAGqElEQVR4nO2d25ajIBBFCajgvf//a0eMyZgEjcI5xgt7Hmatme507UaxuJXidiDqjmSgeVIMlB1ZR1WZAf2gbdu0QwixSYzjOJPmHurfEGEfY9XzjNGG9whQCeVAuv5xQEySLtR9hPuIcwj0EeroN5m3D1IbsbgHK0esiQ9MKsqXVr8Hm/a/Pulk6wihpCIXBw3dh7bTvRBt9+dC5NfS1VH3xETdM3MxXRN1T0zUPTNR98xcS1dlV9NNfx3DhkTdM6PKqHteVBF1z0vU5f0sKdpc2zWLKutXrjJjdLvpesRmukqYonauPhXpdsLb6CppmpnltsYIuY2yavi6Mi2/rzAWm1zUfF0limVLqkZyA+mDYevKBS37aGC+L1lX5e7uyU1Cv565uiua9k5LFqbqqrnu2I3m+jJ11ZoLeRtfmdB0Uw/ZDsP0VTxdn7a1VERfmq7XlXyn5D2QWLoq8bZlPoBJumphJjVBw/Ll6CoTZGsTDs4NrGqKbqBth8ZHJUi6cn168QmleSm6GmB7Kxm+6obXlf7PoDHosCwM3QpiS2legi6ocSl3L0G3BdneDDgwQdENfeY+SfDJBkF37ZB+GvwzA6/rMaafAn8143VhPZWdjMWG1oHXhdnemgPoAvLlB/iZyRTfVeF06wPoQhJmlm4bdcOAZRlRN5gcPc5SoPEQR1fDdbOo6wn+uYvXxY0QCLom6gYROKH+Aj5nvphuFXWDiLpRdxl/19LFT95k6CHCrnW7pCDqBn1i1PUFvii2c11oZOJ6usWeH0RRNzC4Zs+6FTi2nevCVwCjbugnXklX5fkfTldL8PEilUB1kfNyN1u9MME2sATr4lbuB7AjfLAuvsRm1A0g6gYRdcPAjvBlje2Z8brI8OC68AcRdlCkwLohx2mcZMjw9q+LzarQurjtnwPYAydX08WecECO/u6Ad0GBdYG7jO5gB4Ap+PwKcA9ZT43dn4/W9TyiPAn4OAJaF7h3uwe8StSCddFdM3jqFa2LvnnB5zzhuuBBAjY4gi50cg694gnXhTYvfMdrjtcFZhrwE9r41gUem8IXWMC3LrBzxh+a0gRd1N1LOK7M0IUUGuggvEmHoStA2/MJh7MpupiDU4TzjhxdzLAoO4ouZvqVURbFMHQlZD6SUeWHoguZsSLUGegrehA+FZFowPdUWTi6iMoZlIpGGUUXkDbjj/9ZOLqAQS/+GIKl5BQOCn/ycqpzkXSDm5dU7ZWkG7wUyGlcmm7g5Ux56AqirgoaJ7BeokPTDbp9CbVunjFxPrl7+HqnkrSq1Da7JX20f3dV8yJi6voO81mX8vV0mx3qUsZCPRfTlVRdz2EvdufYGDvNQvvwqHtmXd+a1ITinwNcXc+lT6JuzdT1XDyBn/x7wtX1HCQQdW9MXc8xArGrirowfLeUEbMqqq6f7TF1lfRdOuGNiGi6SpT+WxY06xUfNN2wBfyE9I4tlm7w5hvOPDNJN3yNiLMipji6gE3chKhouoCtN5x3QlF0EZt8OW/8ougitqJQlk1aii7iFC9l0MvRReyao7xNjKML2Z/PuHlzhi5mFxljiZeiC9rPTEisNEMX9KYAwo5Xhi7qaA3hamboYm7dG+NVrXhdaYDv5zFaQZsYrCtbbAGnjkQDX2+J1FXCwOsqWOpKoIQNTFdqYBWydxqNqUoG0pVpCS+H8kaJaGKErlIaXj7CRRE+gRWuKwW9YZ80oVOUgbpdT0zpnSZJTIiwCtJVelvXntr4P5j6BWfPb5Wcx84C4cq3hb11lco2u2Mdwp6XdJ/Ne3wb8DWdfiRenZaXrhLwOj4e+GQeHroy3YOspS7TlU28Wle2m2QUS0mqdcbrdNW+ZHsSsyK7tBfm0q/dWcv+Z3mytVx3t7KWulqUe6ilunu8jF8pFwgv1FXp3mUt35OtRbr7eM4u4Gs6vUBXgeuHc5kfE/cbvWZtkROLm1DMtLCy80tzsu2PRj0hTI8fvrQuvsjlJkyutszq+m423wHaLTyniy/XuiGZ84LuT+m5ZfNfRxyGs7LXZOvia7VujatUwVTrIt+Q/Csc7Tuhe+BOakT10b4TuoiiJjvgU9emTO42PwEfBa+cuodKkuf42DXr1D3JpXz73Hnn0j10evHKe+nufgfUm+7B84sX9FfdEzXux2DBpWuKokkCqN/5pa/8pmvnL+RGKCddCGmatiPyPB/+ekO/M/q/7uvbt22kTt3zEnXPzCV13T3Gel4/6NduDu66xRvlPNkM1RjjxUdv+4WhGx6TftD19Q/dfzpwcHO+rE3fAAAAAElFTkSuQmCC"}),r.createElement("button",{style:{position:"absolute",left:"50%",bottom:"-24px",transform:"translateX(-50%)"},onClick:()=>W(!z)},r.createElement(t.CameraIcon,null)))),r.createElement("section",{style:{display:"flex",flexDirection:"column",flex:"citizen"===E?1:7.5,width:"100%",borderRadius:"4px",height:"fit-content",boxShadow:"citizen"===E?"":"1px 1px 4px 0px rgba(0,0,0,0.2)",background:"white",padding:"citizen"===E?"8px":"24px",paddingBottom:"20px"}},"citizen"===E?r.createElement(r.Fragment,null,r.createElement(t.LabelFieldPair,null,r.createElement(t.CardLabel,{style:{}},""+_("CORE_COMMON_PROFILE_NAME"),"*"),r.createElement("div",{style:{width:"100%",maxWidth:"960px"}},r.createElement(t.TextInput,I({t:_,style:{width:"100%"},type:"text",isMandatory:!1,name:"name",value:D,onChange:e=>fe(e.target.value)},ce={isRequired:!0,pattern:"^[a-zA-Z-.`' ]*$",type:"tel",title:_("CORE_COMMON_PROFILE_NAME_ERROR_MESSAGE")},{disable:!1})),(null==le?void 0:le.userName)&&r.createElement(t.CardLabelError,null," ",_(null==le||null===(c=le.userName)||void 0===c?void 0:c.message)," "))),r.createElement(t.LabelFieldPair,null,r.createElement(t.CardLabel,{style:{}},""+_("CORE_COMMON_PROFILE_GENDER")),r.createElement(t.Dropdown,{style:{width:"100%"},className:"form-field",selected:1===(null==R?void 0:R.length)?R[0]:R,disable:1===(null==R?void 0:R.length)||!1,option:ge,select:se,value:R,optionKey:"code",t:_,name:"gender"})),r.createElement(t.LabelFieldPair,null,r.createElement(t.CardLabel,{style:{}},""+_("CORE_COMMON_PROFILE_EMAIL")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,{t:_,style:{width:"100%"},type:"email",isMandatory:!1,optionKey:"i18nKey",name:"email",value:A,onChange:e=>me(e.target.value),disabled:!1}),(null==le?void 0:le.emailAddress)&&r.createElement(t.CardLabelError,null," ",_(null==le||null===(s=le.emailAddress)||void 0===s?void 0:s.message)," "))),r.createElement("button",{onClick:pe,style:{marginTop:"24px",backgroundColor:"#F47738",width:"100%",height:"40px",color:"white",maxWidth:ue?"100%":"240px",borderBottom:"1px solid black"}},_("CORE_COMMON_SAVE"))):r.createElement(r.Fragment,null,r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+_("CORE_COMMON_PROFILE_NAME"),"*"),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,I({t:_,type:"text",isMandatory:!1,name:"name",value:D,onChange:e=>fe(e.target.value),placeholder:"Enter Your Name"},ce={isRequired:!0,pattern:"^[a-zA-Z-.`' ]*$",type:"text",title:_("CORE_COMMON_PROFILE_NAME_ERROR_MESSAGE")},{disabled:!1})),(null==le?void 0:le.userName)&&r.createElement(t.CardLabelError,{style:{margin:0,padding:0}}," ",_(null==le||null===(d=le.userName)||void 0===d?void 0:d.message)," "))),r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+_("CORE_COMMON_PROFILE_GENDER")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.Dropdown,{selected:1===(null==R?void 0:R.length)?R[0]:R,disable:1===(null==R?void 0:R.length)||!1,option:ge,select:se,value:R,optionKey:"code",t:_,name:"gender"}))),r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+_("CORE_COMMON_PROFILE_CITY")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,I({t:_,type:"text",isMandatory:!1,name:"city",value:_(Digit.Utils.locale.getTransformedLocale("TENANT_TENANTS_"+O)),onChange:e=>M(e.target.value),placeholder:"Enter Your City Name"},ce={isRequired:!0,type:"text",title:_("CORE_COMMON_PROFILE_CITY_ERROR_MESSAGE")},{disabled:!0})),r.createElement(t.CardLabelError,null))),r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},_("CORE_COMMON_PROFILE_MOBILE_NUMBER")+"*"),r.createElement("div",{style:{width:"100%"}},r.createElement(t.MobileNumber,{value:k,style:{width:"100%"},name:"mobileNumber",placeholder:"Enter a valid Mobile No.",onChange:e=>(e=>{U(e),"employee"!==E||new RegExp(/^[6-9]{1}[0-9]{9}$/).test(e)?ae({...le,mobileNumber:null}):ae({...le,mobileNumber:{type:"pattern",message:"CORE_COMMON_PROFILE_MOBILE_NUMBER_INVALID"}})})(e),disable:!0,required:!0,pattern:"[6-9]{1}[0-9]{9}",type:"tel",title:_("CORE_COMMON_PROFILE_MOBILE_NUMBER_INVALID")}),(null==le?void 0:le.mobileNumber)&&r.createElement(t.CardLabelError,{style:{margin:0,padding:0}}," ",_(null==le||null===(f=le.mobileNumber)||void 0===f?void 0:f.message)," "))),r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+_("CORE_COMMON_PROFILE_EMAIL")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,{t:_,type:"email",isMandatory:!1,placeholder:_("EMAIL_VALIDATION"),optionKey:"i18nKey",name:"email",value:A,onChange:e=>me(e.target.value),disabled:!1}),(null==le?void 0:le.emailAddress)&&r.createElement(t.CardLabelError,null," ",_(null==le||null===(m=le.emailAddress)||void 0===m?void 0:m.message)," "))),r.createElement(t.LabelFieldPair,null,r.createElement("div",{style:{width:"100%"}},0==H?r.createElement("a",{style:{color:"orange",cursor:"default",marginBottom:"5",cursor:"pointer"},onClick:()=>G(!H)},_("CORE_COMMON_CHANGE_PASSWORD")):null,H?r.createElement("div",{style:{marginTop:"10px"}},r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+_("CORE_COMMON_PROFILE_CURRENT_PASSWORD")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,{t:_,type:"password",isMandatory:!1,name:"name",pattern:"^([a-zA-Z0-9@#$%])+$",onChange:e=>{return Z(t=e.target.value),void(new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(t)?ae({...le,currentPassword:null}):ae({...le,currentPassword:{type:"pattern",message:"CORE_COMMON_PROFILE_PASSWORD_INVALID"}}));var t},disabled:!1}),(null==le?void 0:le.currentPassword)&&r.createElement(t.CardLabelError,null,_(null==le||null===(v=le.currentPassword)||void 0===v?void 0:v.message)))),r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+_("CORE_COMMON_PROFILE_NEW_PASSWORD")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,{t:_,type:"password",isMandatory:!1,name:"name",pattern:"^([a-zA-Z0-9@#$%])+$",onChange:e=>{return $(t=e.target.value),void(new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(t)?ae({...le,newPassword:null}):ae({...le,newPassword:{type:"pattern",message:"CORE_COMMON_PROFILE_PASSWORD_INVALID"}}));var t},disabled:!1}),(null==le?void 0:le.newPassword)&&r.createElement(t.CardLabelError,null,_(null==le||null===(p=le.newPassword)||void 0===p?void 0:p.message)))),r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+_("CORE_COMMON_PROFILE_CONFIRM_PASSWORD")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,{t:_,type:"password",isMandatory:!1,name:"name",pattern:"^([a-zA-Z0-9@#$%])+$",onChange:e=>{return K(t=e.target.value),void(new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(t)?ae({...le,confirmPassword:null}):ae({...le,confirmPassword:{type:"pattern",message:"CORE_COMMON_PROFILE_PASSWORD_INVALID"}}));var t},disabled:!1}),(null==le?void 0:le.confirmPassword)&&r.createElement(t.CardLabelError,null,_(null==le||null===(g=le.confirmPassword)||void 0===g?void 0:g.message))))):"")),"employee"===E&&ue?r.createElement("button",{onClick:pe,style:{marginTop:"24px",backgroundColor:"#F47738",width:"100%",height:"40px",color:"white",maxWidth:ue?"100%":"240px",borderBottom:"1px solid black",fontWeight:"700",fontSize:"17px"}},_("CORE_COMMON_SAVE")):null))),"employee"!==E||ue?null:r.createElement("div",{className:"action-bar-wrap"},r.createElement(t.SubmitBar,{t:_,label:_("CORE_COMMON_SAVE"),onSubmit:pe})),J&&r.createElement(t.Toast,{type:J.key,label:_("success"===J.key?"CORE_COMMON_PROFILE_UPDATE_SUCCESS":J.action),onClose:()=>Q(null),style:{maxWidth:"670px"}}),1==z?r.createElement(ne,{setProfilePic:function(e){try{function t(e){V(null==e?void 0:e.thumbs[0]),de()}return j(e),Promise.resolve(e?Promise.resolve(function(e,t){try{return Promise.resolve(Digit.UploadServices.Filefetch(e,t)).then(function(e){return e.data.fileStoreIds&&0!==e.data.fileStoreIds.length?{thumbs:e.data.fileStoreIds.map(e=>e.url.split(",")[3]),images:e.data.fileStoreIds.map(e=>Digit.Utils.getFileUrl(e.url))}:null})}catch(e){return Promise.reject(e)}}([e],C)).then(t):t(null))}catch(e){return Promise.reject(e)}},closeDrawer:de,userType:E,removeProfilePic:()=>{j(null),V(null)},showToast:ve}):"")},ie=e=>{var o,l,a;let{module:c}=e;const s=Digit.UserService.getUser(),{t:d}=((null==s||null===(o=s.info)||void 0===o?void 0:o.tenantId)||Digit.ULBService.getCurrentTenantId(),i.useTranslation()),f=Digit.SessionStorage.get("initData").stateInfo,m=Digit.StoreData.getCurrentLanguage(),[v,p]=n.useState(m),[g,h]=n.useState(!1),[E,y]=n.useState(""),_=()=>r.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.createElement("path",{d:"M12 24C5.38053 24 0 18.6143 0 12C0 5.38054 5.38053 1.90735e-06 12 1.90735e-06C18.6143 1.90735e-06 24 5.38054 24 12C24 18.6143 18.6143 24 12 24ZM16.3488 10.7852L11.3855 7.25251C11.1263 7.0701 10.8238 6.97889 10.5214 6.97889C10.291 6.97889 10.0557 7.03172 9.83976 7.14202C9.34054 7.40118 9.02857 7.91006 9.02857 8.46694L9.02877 15.5323C9.02877 16.0892 9.34076 16.5979 9.83996 16.8572C10.3344 17.1116 10.9296 17.0732 11.3857 16.7467L16.349 13.214C16.7426 12.9356 16.9778 12.4795 16.9778 11.9996C16.9776 11.5197 16.7426 11.0636 16.3489 10.7852L16.3488 10.7852Z",fill:"white"})),{isLoading:b,data:C}=Digit.Hooks.useGetHowItWorksJSON(Digit.ULBService.getStateId()),O=null==C||null===(l=C.MdmsRes["common-masters"])||void 0===l||null===(a=l.howItWorks[0])||void 0===a?void 0:a[""+c];return b?r.createElement(t.Loader,null):r.createElement(n.Fragment,null,r.createElement("div",{className:"how-it-works-page"},r.createElement(t.BackButton,null),r.createElement("div",{className:"how-it-works-page-header"},r.createElement(t.Header,null,d(O.screenHeader?O.screenHeader:"HOW_IT_WORKS"))),r.createElement("div",{className:"language-selector",style:{margin:"10px"}},[{label:"ENGLISH",value:"en_IN"},{label:"हिंदी",value:"hi_IN"}].map((e,t)=>r.createElement("div",{className:"language-button-container",key:t},r.createElement(u.CustomButton,{selected:e.value===v,text:e.label,onClick:()=>(e=>{p(e.value),Digit.LocalizationService.changeLanguage(e.value,f.code)})(e)})))),O.videosJson.map((e,t)=>r.createElement("div",null,r.createElement("div",{className:"WhatsNewCard",style:{float:"left",position:"relative",width:"100%",marginBottom:10}},r.createElement("div",{className:"video-icon",onClick:()=>{return t=e,y("hi_IN"===v?t.hi_IN:t.en_IN),void h(!0);var t}},r.createElement("div",{className:"vid-svg"},r.createElement(_,null))),r.createElement("div",{className:"how-it-works-header-description"},r.createElement("h2",null,d(e.headerLabel)),r.createElement("p",null,d(e.description)))))),O.pdfHeader&&O.pdfDesc&&r.createElement("div",{className:"WhatsNewCard",style:{position:"relative",width:"100%",marginBottom:10,display:"inline-block"}},r.createElement("div",{className:"how-it-works-pdf-section"},r.createElement("div",{className:"pdf-icon-header-desc"},r.createElement("div",{className:"pdf-icon"},r.createElement(t.PDFSvg,null)),r.createElement("div",{className:"pdf-header-desc"},r.createElement("h2",null,d(O.pdfHeader)),r.createElement("p",null,d(O.pdfDesc)))),r.createElement("div",{className:"download-icon"},r.createElement(t.DownloadImgIcon,null)))),g&&r.createElement("div",{className:"how-it-works-video-play"},r.createElement("div",{className:"close-button"},r.createElement(t.CloseSvg,{onClick:()=>{h(!1)}})),r.createElement("video",{width:500,height:500,controls:!0,autoPlay:!0},r.createElement("source",{src:E,type:"video/mp4"})))))},oe=[{texts:{header:"CS_LOGIN_PROVIDE_MOBILE_NUMBER",cardText:"CS_LOGIN_TEXT",nextText:"CS_COMMONS_NEXT",submitBarLabel:"CS_COMMONS_NEXT"},inputs:[{label:"CORE_COMMON_MOBILE_NUMBER",type:"text",name:"mobileNumber",error:"ERR_HRMS_INVALID_MOB_NO",validation:{required:!0,minLength:10,maxLength:10}}]},{texts:{header:"CS_LOGIN_OTP",cardText:"CS_LOGIN_OTP_TEXT",nextText:"CS_COMMONS_NEXT",submitBarLabel:"CS_COMMONS_NEXT"}},{texts:{header:"CS_LOGIN_PROVIDE_NAME",cardText:"CS_LOGIN_NAME_TEXT",nextText:"CS_COMMONS_NEXT",submitBarLabel:"CS_COMMONS_NEXT"},inputs:[{label:"CORE_COMMON_NAME",type:"text",name:"name",error:"CORE_COMMON_NAME_VALIDMSG",validation:{required:!0,minLength:1,pattern:/^[^{0-9}^\$\"<>?\\\\~!@#$%^()+={}\[\]*,/_:;“”‘’]{1,50}$/i}}]}],le=e=>{let{t:n,onSelect:i,mobileNumber:o,onMobileChange:l,config:a,canSubmit:u}=e;return r.createElement(t.FormStep,{isDisabled:!(10===o.length&&u),onSelect:i,config:a,t:n,componentInFront:"+91",onChange:l,value:o})},ae=e=>{let{config:n,onSelect:i,t:o,isDisabled:l}=e;return r.createElement(t.FormStep,{config:n,onSelect:i,t:o,isDisabled:l})},ue=e=>{let{config:i,otp:o,onOtpChange:l,onResend:a,onSelect:u,t:c,error:s,userType:d="citizen",canSubmit:f}=e;const[m,v]=n.useState(30);!function(e,t){const r=n.useRef();n.useEffect(()=>{r.current=e},[e]),n.useEffect(()=>{if(null!==t){const e=setInterval(function(){r.current()},t);return()=>clearInterval(e)}},[t])}(()=>{v(m-1)},m>0?1e3:null);const p=()=>{a(),v(2)};return"employee"===d?r.createElement(n.Fragment,null,r.createElement(t.OTPInput,{length:6,onChange:l,value:o}),m>0?r.createElement(t.CardText,null,c("CS_RESEND_ANOTHER_OTP")+" "+m+" "+c("CS_RESEND_SECONDS")):r.createElement("p",{className:"card-text-button resend-otp",onClick:p},c("CS_RESEND_OTP")),!s&&r.createElement(t.CardLabelError,null,c("CS_INVALID_OTP"))):r.createElement(t.FormStep,{onSelect:u,config:i,t:c,isDisabled:!(6===(null==o?void 0:o.length)&&f)},r.createElement(t.OTPInput,{length:6,onChange:l,value:o}),m>0?r.createElement(t.CardText,null,c("CS_RESEND_ANOTHER_OTP")+" "+m+" "+c("CS_RESEND_SECONDS")):r.createElement("p",{className:"card-text-button",onClick:p},c("CS_RESEND_OTP")),!s&&r.createElement(t.CardLabelError,null,c("CS_INVALID_OTP")))};var ce;const se={type:"register"},de={type:"login"},fe="/"+(null===(ce=window)||void 0===ce?void 0:ce.contextPath)+"/citizen",me=(e,t)=>(null==e?void 0:e.from)||(null==t?void 0:t.from)||fe,ve=e=>{var o,l;let{stateCode:u,isUserRegistered:c=!0}=e;const{t:s}=i.useTranslation(),d=a.useLocation(),{path:f}=a.useRouteMatch(),m=a.useHistory(),[v,p]=n.useState(null),[g,h]=n.useState(null),[E,y]=n.useState(!0),[_,b]=n.useState(null),[C,O]=n.useState(c?{}:null==d||null===(o=d.state)||void 0===o?void 0:o.data),[S,w]=n.useState(null),N=Digit.Hooks.useQueryParams(),[I,D]=n.useState(!1),[T,A]=n.useState(!0),[L,R]=n.useState(!0);n.useEffect(()=>{let e;return g&&(S&&(clearTimeout(S),w(null)),e=setTimeout(()=>{h("")},5e3),w(e)),()=>{e&&clearTimeout(e)}},[g]),n.useEffect(()=>{var e;if(!v)return;Digit.SessionStorage.set("citizen.userRequestObject",v),Digit.UserService.setUser(v),((e,t,n)=>{var r,i;let o=null===(r=JSON.parse(sessionStorage.getItem("Digit.initData")))||void 0===r||null===(i=r.value)||void 0===i?void 0:i.selectedLanguage;localStorage.setItem("Citizen.tenant-id",n),localStorage.setItem("tenant-id",n),localStorage.setItem("citizen.userRequestObject",JSON.stringify(e)),localStorage.setItem("locale",o),localStorage.setItem("Citizen.locale",o),localStorage.setItem("token",t),localStorage.setItem("Citizen.token",t),localStorage.setItem("user-info",JSON.stringify(e)),localStorage.setItem("Citizen.user-info",JSON.stringify(e))})(null==v?void 0:v.info,null==v?void 0:v.access_token,u);const t=(null===(e=d.state)||void 0===e?void 0:e.from)||fe;var n;Digit.ULBService.getCitizenCurrentTenant(!0)?m.replace(t):m.replace("/"+(null===(n=window)||void 0===n?void 0:n.contextPath)+"/citizen/select-location",{redirectBackTo:t})},[v]);const x=n.useMemo(()=>oe.map(e=>{const t={};for(const n in e.texts)t[n]=s(e.texts[n]);return{...e,texts:t}},[oe])),P=()=>Digit.UserService.getType(),M=function(e){return Promise.resolve(te(function(){return Promise.resolve(Digit.UserService.sendOtp(e,u)).then(function(e){return[e,null]})},function(e){return[null,e]}))};return r.createElement("div",{className:"citizen-form-wrapper"},r.createElement(a.Switch,null,r.createElement(t.AppContainer,null,r.createElement(t.BackButton,null),r.createElement(a.Route,{path:""+f,exact:!0},r.createElement(le,{onSelect:function(e){try{R(!1),O({...C,...e});const t={...e,tenantId:u,userType:P()};return Promise.resolve(c?Promise.resolve(M({otp:{...t,...de}})).then(function(e){var n;let[r,i]=e;var o,l,a;if(!i)return R(!0),void m.replace(f+"/otp",{from:me(d.state,N),role:null===(o=d.state)||void 0===o?void 0:o.role});R(!0),d.state&&"FSM_DSO"===d.state.role||m.push("/"+(null===(l=window)||void 0===l?void 0:l.contextPath)+"/citizen/register/name",{from:me(d.state,N),data:t}),null!==(n=d.state)&&void 0!==n&&n.role&&(R(!0),h("FSM_DSO"===(null===(a=d.state)||void 0===a?void 0:a.role)?s("ES_ERROR_DSO_LOGIN"):"User not registered."))}):Promise.resolve(M({otp:{...t,...se}})).then(function(e){let[t,n]=e;if(!n)return R(!0),void m.replace(f+"/otp",{from:me(d.state,N)});R(!0)}))}catch(e){return Promise.reject(e)}},config:x[0],mobileNumber:C.mobileNumber||"",onMobileChange:e=>{const{value:t}=e.target;O({...C,mobileNumber:t})},canSubmit:L,showRegisterLink:c&&!(null!==(l=d.state)&&void 0!==l&&l.role),t:s})),r.createElement(a.Route,{path:f+"/otp"},r.createElement(ue,{config:{...x[1],texts:{...x[1].texts,cardText:x[1].texts.cardText+" "+(C.mobileNumber||"")}},onOtpChange:e=>{O({...C,otp:e})},onResend:function(){try{const{mobileNumber:e}=C,t={mobileNumber:e,tenantId:u,userType:P()},n=function(){if(!c)return Promise.resolve(M({otp:{...t,...se}})).then(function(){});{const e=function(){if(c)return Promise.resolve(M({otp:{...t,...de}})).then(function(){})}();if(e&&e.then)return e.then(function(){})}}();return Promise.resolve(n&&n.then?n.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},onSelect:function(){try{return Promise.resolve(te(function(){y(!0),A(!1);const{mobileNumber:e,otp:t,name:n}=C;return function(){if(c){const n={username:e,password:t,tenantId:u,userType:P()};return Promise.resolve(Digit.UserService.authenticate(n)).then(function(e){var t,n,r;let{UserRequest:i,...o}=e;if(null!==(t=d.state)&&void 0!==t&&t.role){const e=i.roles.find(e=>e.code===d.state.role);if(!e||!e.code)return h(s("ES_ERROR_USER_NOT_PERMITTED")),void setTimeout(()=>m.replace(fe),5e3)}null!==(n=window)&&void 0!==n&&null!==(r=n.globalConfigs)&&void 0!==r&&r.getConfig("ENABLE_SINGLEINSTANCE")&&(i.tenantId=Digit.ULBService.getStateId()),p({info:i,...o})})}{const r=function(){if(!c)return Promise.resolve(Digit.UserService.registerUser({name:n,username:e,otpReference:t,tenantId:u},u)).then(function(e){var t,n;let{UserRequest:r,...i}=e;null!==(t=window)&&void 0!==t&&null!==(n=t.globalConfigs)&&void 0!==n&&n.getConfig("ENABLE_SINGLEINSTANCE")&&(r.tenantId=Digit.ULBService.getStateId()),p({info:r,...i})})}();if(r&&r.then)return r.then(function(){})}}()},function(){A(!0),y(!1)}))}catch(e){return Promise.reject(e)}},otp:C.otp,error:E,canSubmit:T,t:s})),r.createElement(a.Route,{path:f+"/name"},r.createElement(ae,{config:x[2],onSelect:function(e){try{const t={...C,tenantId:u,userType:P(),...e};return O({...C,...e}),D(!0),Promise.resolve(M({otp:{...t,...se}})).then(function(e){let[t,n]=e;t?(D(!1),m.replace(f+"/otp",{from:me(d.state,N)})):D(!1)})}catch(e){return Promise.reject(e)}},t:s,isDisabled:I})),g&&r.createElement(t.Toast,{type:"error",label:g,onClose:()=>h(null)}))))};var pe=e=>e instanceof HTMLElement;const ge={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"};var he=e=>null==e;const Ee=e=>"object"==typeof e;var ye=e=>!he(e)&&!Array.isArray(e)&&Ee(e)&&!(e instanceof Date),_e=e=>/^\w*$/.test(e),be=e=>e.filter(Boolean),Ce=e=>be(e.replace(/["|']/g,"").replace(/\[/g,".").replace(/\]/g,"").split("."));function Oe(e,t,n){let r=-1;const i=_e(t)?[t]:Ce(t),o=i.length,l=o-1;for(;++r<o;){const t=i[r];let o=n;if(r!==l){const n=e[t];o=ye(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}e[t]=o,e=e[t]}return e}var Se=function(e,t){void 0===t&&(t={});for(const n in e)_e(n)?t[n]=e[n]:Oe(t,n,e[n]);return t},we=e=>void 0===e,Ne=function(e,t,n){void 0===e&&(e={});const r=be(t.split(/[,[\].]+?/)).reduce((e,t)=>he(e)?e:e[t],e);return we(r)||r===e?we(e[t])?n:e[t]:r},Ie=(e,t)=>{pe(e)&&e.removeEventListener&&(e.removeEventListener("input",t),e.removeEventListener("change",t),e.removeEventListener("blur",t))};const De={isValid:!1,value:null};var Te=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.ref.checked?{isValid:!0,value:t.ref.value}:e,De):De,Ae=e=>"radio"===e.type,Le=e=>"file"===e.type,Re=e=>"checkbox"===e.type,xe=e=>"select-multiple"===e.type;const Pe={value:!1,isValid:!1},Me={value:!0,isValid:!0};var ke=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(e=>e&&e.ref.checked).map(e=>{let{ref:{value:t}}=e;return t});return{value:t,isValid:!!t.length}}const{checked:t,value:n,attributes:r}=e[0].ref;return t?r&&!we(r.value)?we(n)||""===n?Me:{value:n,isValid:!0}:Me:Pe}return Pe};function Ue(e,t,n,r,i){const o=e.current[t];if(o){const{ref:{value:e,disabled:t},ref:n,valueAsNumber:a,valueAsDate:u,setValueAs:c}=o;if(t&&r)return;return Le(n)?n.files:Ae(n)?Te(o.options).value:xe(n)?(l=n.options,[...l].filter(e=>{let{selected:t}=e;return t}).map(e=>{let{value:t}=e;return t})):Re(n)?ke(o.options).value:i?e:a?""===e?NaN:+e:u?n.valueAsDate:c?c(e):e}var l;if(n)return Ne(n.current,t)}function Be(e){return!e||e instanceof HTMLElement&&e.nodeType!==Node.DOCUMENT_NODE&&Be(e.parentNode)}var je=e=>ye(e)&&!Object.keys(e).length,Fe=e=>"boolean"==typeof e;function Ve(e,t){const n=_e(t)?[t]:Ce(t),r=1==n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=we(e)?r++:e[t[r++]];return e}(e,n);let i;r&&delete r[n[n.length-1]];for(let t=0;t<n.slice(0,-1).length;t++){let r,o=-1;const l=n.slice(0,-(t+1)),a=l.length-1;for(t>0&&(i=e);++o<l.length;){const t=l[o];r=r?r[t]:e[t],a===o&&(ye(r)&&je(r)||Array.isArray(r)&&!r.filter(e=>ye(e)&&!je(e)||Fe(e)).length)&&(i?delete i[t]:delete e[t]),i=r}}return e}const ze=(e,t)=>e&&e.ref===t;var We=e=>he(e)||!Ee(e);function He(e,t){if(We(e)||We(t))return t;for(const n in t){const r=e[n],i=t[n];try{e[n]=ye(r)&&ye(i)||Array.isArray(r)&&Array.isArray(i)?He(r,i):i}catch(e){}}return e}function Ge(e,t,r){if(We(e)||We(t)||e instanceof Date||t instanceof Date)return e===t;if(!n.isValidElement(e)){const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(const i of n){const n=e[i];if(!r||"ref"!==i){const e=t[i];if((ye(n)||Array.isArray(n))&&(ye(e)||Array.isArray(e))?!Ge(n,e,r):n!==e)return!1}}}return!0}function qe(e,t,n,r,i){let o=-1;for(;++o<e.length;){for(const r in e[o])Array.isArray(e[o][r])?(!n[o]&&(n[o]={}),n[o][r]=[],qe(e[o][r],Ne(t[o]||{},r,[]),n[o][r],n[o],r)):Ge(Ne(t[o]||{},r),e[o][r])?Oe(n[o]||{},r):n[o]=Object.assign(Object.assign({},n[o]),{[r]:!0});r&&!n.length&&delete r[i]}return n}var Ze=e=>"string"==typeof e,Xe=(e,t,n,r,i)=>{const o={};for(const t in e.current)(we(i)||(Ze(i)?t.startsWith(i):Array.isArray(i)&&i.find(e=>t.startsWith(e))))&&(o[t]=Ue(e,t,void 0,r));return n?Se(o):He(t,Se(o))},$e=e=>e instanceof RegExp,Ye=e=>ye(e)&&!$e(e)?e:{value:e,message:""},Ke=e=>"function"==typeof e,Je=e=>Ze(e)||n.isValidElement(e);function Qe(e,t,n){if(void 0===n&&(n="validate"),Je(e)||Fe(e)&&!e)return{type:n,message:Je(e)?e:"",ref:t}}var et=(e,t,n,r,i)=>t?Object.assign(Object.assign({},n[e]),{types:Object.assign(Object.assign({},n[e]&&n[e].types?n[e].types:{}),{[r]:i||!0})}):{},tt=function(e,t,n,r){let{ref:i,ref:{value:o},options:l,required:a,maxLength:u,minLength:c,min:s,max:d,pattern:f,validate:m}=n;try{let n=!1;const v=i.name,p={},g=Ae(i),h=Re(i),E=g||h,y=""===o,_=et.bind(null,v,t,p),b=function(e,t,n,r,o){void 0===r&&(r="maxLength"),void 0===o&&(o="minLength");const l=e?t:n;p[v]=Object.assign({type:e?r:o,message:l,ref:i},_(e?r:o,l))};if(a&&(!g&&!h&&(y||he(o))||Fe(o)&&!o||h&&!ke(l).isValid||g&&!Te(l).isValid)){const{value:n,message:r}=Je(a)?{value:!!a,message:a}:Ye(a);if(n&&(p[v]=Object.assign({type:"required",message:r,ref:E?((e.current[v].options||[])[0]||{}).ref:i},_("required",r)),!t))return Promise.resolve(p)}if(!(he(s)&&he(d)||""===o)){let e,n;const r=Ye(d),l=Ye(s);if(isNaN(o)){const t=i.valueAsDate||new Date(o);Ze(r.value)&&(e=t>new Date(r.value)),Ze(l.value)&&(n=t<new Date(l.value))}else{const t=i.valueAsNumber||parseFloat(o);he(r.value)||(e=t>r.value),he(l.value)||(n=t<l.value)}if((e||n)&&(b(!!e,r.message,l.message,"max","min"),!t))return Promise.resolve(p)}if(Ze(o)&&!y&&(u||c)){const e=Ye(u),n=Ye(c),r=!he(e.value)&&o.length>e.value,i=!he(n.value)&&o.length<n.value;if((r||i)&&(b(r,e.message,n.message),!t))return Promise.resolve(p)}if(Ze(o)&&f&&!y){const{value:e,message:n}=Ye(f);if($e(e)&&!e.test(o)&&(p[v]=Object.assign({type:"pattern",message:n,ref:i},_("pattern",n)),!t))return Promise.resolve(p)}const C=function(){if(m){const o=Ue(e,v,r,!1,!0),a=E&&l?l[0].ref:i;return Ke(m)?Promise.resolve(m(o)).then(function(e){const r=Qe(e,a);if(r&&(p[v]=Object.assign(Object.assign({},r),_("validate",r.message)),!t))return n=!0,p}):function(){if(ye(m)){let r=!1;function e(){if(!je(i)&&(p[v]=Object.assign({ref:a},i),!t))return n=!0,p}let i={};const l=ee(Object.entries(m),function(e){let[n,l]=e;if(je(i)||t)return Promise.resolve(l(o)).then(function(e){const r=Qe(e,a,n);r&&(i=Object.assign(Object.assign({},r),_(n,r.message)),t&&(p[v]=i))});r=!0},function(){return r});return l&&l.then?l.then(e):e()}}()}}();return Promise.resolve(C&&C.then?C.then(function(e){return n?e:p}):n?C:p)}catch(e){return Promise.reject(e)}};const nt=function(e,t,n){void 0===n&&(n=[]);for(const r in t){const i=e+(ye(t)?"."+r:"["+r+"]");We(t[r])?n.push(i):nt(i,t[r],n)}return n};var rt=(e,t,n,r,i)=>{let o=void 0;return n.add(t),je(e)||(o=Ne(e,t),(ye(o)||Array.isArray(o))&&nt(t,o).forEach(e=>n.add(e))),we(o)?i?r:Ne(r,t):o},it=e=>{let{isOnBlur:t,isOnChange:n,isOnTouch:r,isTouched:i,isReValidateOnBlur:o,isReValidateOnChange:l,isBlurEvent:a,isSubmitted:u,isOnAll:c}=e;return!c&&(!u&&r?!(i||a):(u?o:t)?!a:!(u?l:n)||a)},ot=e=>e.substring(0,e.indexOf("[")),lt=(e,t)=>[...e].some(e=>((e,t)=>RegExp(("^"+t+"([|.)\\d+").replace(/\[/g,"\\[").replace(/\]/g,"\\]")).test(e))(t,e)),at="undefined"!=typeof window&&"undefined"!=typeof document;function ut(e){var t;let n;if(We(e)||at&&(e instanceof File||pe(e)))return e;if(!["Set","Map","Object","Date","Array"].includes(null===(t=e.constructor)||void 0===t?void 0:t.name))return e;if(e instanceof Date)return n=new Date(e.getTime()),n;if(e instanceof Set){n=new Set;for(const t of e)n.add(t);return n}if(e instanceof Map){n=new Map;for(const t of e.keys())n.set(t,ut(e.get(t)));return n}n=Array.isArray(e)?[]:{};for(const t in e)n[t]=ut(e[t]);return n}var ct=e=>({isOnSubmit:!e||e===ge.onSubmit,isOnBlur:e===ge.onBlur,isOnChange:e===ge.onChange,isOnAll:e===ge.all,isOnTouch:e===ge.onTouched}),st=e=>Ae(e)||Re(e);const dt="undefined"==typeof window,ft=at?"Proxy"in window:"undefined"!=typeof Proxy,mt=n.createContext(null);mt.displayName="RHFContext";const vt=e=>{const{as:t,render:r}=e,i=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["rules","as","render","defaultValue","control","onFocus"]),{field:o,meta:l}=function(e){let{name:t,rules:r,defaultValue:i,control:o,onFocus:l}=e;const a=n.useContext(mt);if("production"!==process.env.NODE_ENV&&!o&&!a)throw new Error("📋 Controller is missing `control` prop. https://react-hook-form.com/api#Controller");const{defaultValuesRef:u,setValue:c,register:s,unregister:d,trigger:f,mode:m,reValidateMode:{isReValidateOnBlur:v,isReValidateOnChange:p},formState:g,formStateRef:{current:{isSubmitted:h,touched:E,errors:y}},updateFormState:_,readFormStateRef:b,fieldsRef:C,fieldArrayNamesRef:O,shallowFieldsStateRef:S}=o||a.control,w=!lt(O.current,t),N=()=>!we(Ne(S.current,t))&&w?Ne(S.current,t):we(i)?Ne(u.current,t):i,[I,D]=n.useState(N()),T=n.useRef(I),A=n.useRef({focus:()=>null}),L=n.useRef(l||(()=>{Ke(A.current.focus)&&A.current.focus(),"production"!==process.env.NODE_ENV&&(Ke(A.current.focus)||console.warn("📋 'ref' from Controller render prop must be attached to a React component or a DOM Element whose ref provides a 'focus()' method"))})),R=n.useCallback(e=>!it(Object.assign({isBlurEvent:e,isReValidateOnBlur:v,isReValidateOnChange:p,isSubmitted:h,isTouched:!!Ne(E,t)},m)),[v,p,h,E,t,m]),x=n.useCallback(e=>{let[t]=e;const n=(e=>We(e)||!ye(e.target)||ye(e.target)&&!e.type?e:we(e.target.value)?e.target.checked:e.target.value)(t);return D(n),T.current=n,n},[]),P=n.useCallback(e=>{if("production"!==process.env.NODE_ENV&&!t)return console.warn("📋 Field is missing `name` prop. https://react-hook-form.com/api#Controller");C.current[t]?C.current[t]=Object.assign({ref:C.current[t].ref},r):(s(Object.defineProperties({name:t,focus:L.current},{value:{set(e){D(e),T.current=e},get:()=>T.current}}),r),e=we(Ne(u.current,t))),e&&w&&D(N())},[r,t,s]);n.useEffect(()=>()=>d(t),[t]),n.useEffect(()=>{"production"!==process.env.NODE_ENV&&(we(I)&&console.warn("📋 "+t+" is missing in the 'defaultValue' prop of either its Controller (https://react-hook-form.com/api#Controller) or useForm (https://react-hook-form.com/api#useForm)"),!w&&we(i)&&console.warn("📋 Controller is missing `defaultValue` prop when using `useFieldArray`. https://react-hook-form.com/api#Controller")),P()},[P]),n.useEffect(()=>{!C.current[t]&&P(!0)});const M=n.useCallback(()=>{b.current.touched&&!Ne(E,t)&&(Oe(E,t,!0),_({touched:E})),R(!0)&&f(t)},[t,_,R,f,b]);return{field:{onChange:n.useCallback(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return c(t,x(n),{shouldValidate:R(),shouldDirty:!0})},[c,t,R]),onBlur:M,name:t,value:I,ref:A},meta:Object.defineProperties({invalid:!!Ne(y,t)},{isDirty:{get:()=>!!Ne(g.dirtyFields,t)},isTouched:{get:()=>!!Ne(g.touched,t)}})}}(e),a=Object.assign(Object.assign({},i),o);return t?n.isValidElement(t)?n.cloneElement(t,a):n.createElement(t,a):r?r(o,l):null},pt=e=>{let{control:n,t:i}=e;const o=window.Digit.Utils.browser.isMobile();return r.createElement(Fragment,null,r.createElement(t.SearchField,{className:"pt-form-field"},r.createElement("label",null,i("AUDIT_FROM_DATE_LABEL")),r.createElement(vt,{render:e=>r.createElement(t.DatePicker,{date:e.value,onChange:e.onChange}),name:"fromDate",control:n})),r.createElement(t.SearchField,{className:"pt-form-field"},r.createElement("label",null,i("AUDIT_TO_DATE_LABEL")),r.createElement(vt,{render:e=>r.createElement(t.DatePicker,{date:e.value,onChange:e.onChange}),name:"toDate",control:n})),r.createElement(t.SearchField,{className:"pt-search-action-submit"},r.createElement(t.Button,{style:{marginTop:o?"510px":"25px",marginLeft:o?"0":"-30px",maxWidth:o?"100%":"240px"},label:i("ES_COMMON_APPLY"),submit:!0})))},gt=e=>{var i;let{Controller:o,register:l,control:a,t:u,reset:c,previousPage:s,handleSubmit:d,tenantId:f,data:m,onSubmit:v,isLoading:p}=e;const[g,h]=n.useState([]),E=e=>r.createElement("div",{onClick:e.onClick},r.createElement(t.DownloadBtnCommon,null));n.useEffect(()=>{(null==m?void 0:m.length)>0&&h([null==m?void 0:m.map(e=>{let t={};return t[u("AUDIT_DATE_LABEL")]=y(null==e?void 0:e.timestamp),t[u("AUDIT_TIME_LABEL")]=_(null==e?void 0:e.timestamp),t[u("AUDIT_DATAVIEWED_LABEL")]=(null==e?void 0:e.dataView[0])+","+(null==e?void 0:e.dataView[1]),t[u("AUDIT_DATAVIEWED_BY_LABEL")]=null==e?void 0:e.dataViewedBy,t[u("AUDIT_ROLE_LABEL")]=null==e?void 0:e.roles.map(e=>e.name).join(","),{...t}})])},[m]);const y=e=>{if(null==e||null==e||""==e)return"NA";const t=new Date(e);let n=t.getMonth()+1,r=t.getDate();return n=(n>9?"":"0")+n,r=(r>9?"":"0")+r,r+"/"+n+"/"+t.getFullYear()},_=e=>{if(null==e||null==e||""==e)return"NA";const t=new Date(e);let n=t.getHours(),r=t.getMinutes(),i=n>12?"PM":"AM";return n=n>12?n-12:n,n=(n>9?"":"0")+n,r=(r>9?"":"0")+r,n+":"+r+" "+i},[b,C]=n.useReducer(function(e,t){switch(t.type){case"set":return t.payload;case"remove":return!1}},!1),O=()=>{C({type:"remove"})},S=()=>r.createElement("div",{className:"InboxMobilePopupCloseButtonWrapper",onClick:O},r.createElement(t.CloseSvg,null)),w={Controller:o,register:l,control:a,t:u,reset:c,previousPage:s},N=n.useCallback(e=>{let{currentlyActiveMobileModal:n,searchFormFieldsComponentProps:i,tenantId:o,...l}=e;return(e=>{let{currentlyActiveMobileModal:n,searchFormFieldsComponentProps:i,tenantId:o,...l}=e;const{closeMobilePopupModal:a}=l;switch(n){case"SearchFormComponent":return r.createElement(t.SearchForm,l,r.createElement(S,null),r.createElement("div",{className:"MobilePopupHeadingWrapper"},r.createElement("h2",null,u("PRIVACY_AUDIT_REPORT"),":")),r.createElement(pt,I({},i,{closeMobilePopupModal:a,tenantId:o,t:u})));default:return r.createElement("span",null)}})({currentlyActiveMobileModal:n,searchFormFieldsComponentProps:i,tenantId:o,...l})},[b]);null==m||null===(i=m.roles)||void 0===i||i.forEach(e=>{});const D=n.useMemo(()=>null!=m&&m.display||""===m?[]:null==m?void 0:m.map(e=>{var t;return{[u("AUDIT_DATE_LABEL")]:y(e.timestamp),[u("AUDIT_TIME_LABEL")]:_(e.timestamp),[u("AUDIT_DATAVIEWED_LABEL")]:e.dataView[0]+","+e.dataView[1],[u("AUDIT_DATAVIEWED_BY_LABEL")]:e.dataViewedBy,[u("AUDIT_ROLE_LABEL")]:null===(t=e.roles.slice(0,3))||void 0===t?void 0:t.map(e=>e.name).join(",")}}),[m]);return r.createElement(r.Fragment,null,r.createElement(t.BackButton,null),r.createElement("div",{className:"sideContent",style:{marginLeft:"70%",marginTop:"-12%"}},r.createElement(E,{className:"mrlg cursorPointer",onClick:()=>(e=>{if(void 0!==(null==e?void 0:e[0]))return Digit.Download.Excel(null==e?void 0:e[0],"AuditReport")})(g)})),r.createElement(t.Header,null,u("PRIVACY_AUDIT_REPORT"),":"),r.createElement("div",{className:"digit-search-box"},r.createElement(t.SearchAction,{text:u("ES_COMMON_SEARCH"),handleActionClick:()=>C({type:"set",payload:"SearchFormComponent"}),tenantId:f,t:u})),b?r.createElement(t.PopUp,null,r.createElement(N,{onSubmit:e=>{C({type:"remove"}),v(e)},handleSubmit:d,id:"search-form",className:"rm-mb form-field-flex-one inboxPopupMobileWrapper",searchFormFieldsComponentProps:w,currentlyActiveMobileModal:b,closeMobilePopupModal:O,tenantId:f})):null,p&&r.createElement(t.Loader,null),r.createElement(t.DetailsCard,{data:D}))},ht=e=>{let{tenantId:i,t:o,onSubmit:l,data:a,count:c}=e;const s=Digit.SessionStorage.get("AUDIT_APPLICATION_DETAIL")||{offset:0,limit:5,sortOrder:"DESC"},{register:d,control:f,handleSubmit:m,setValue:v,getValues:p,reset:g}=function(e){let{mode:t=ge.onSubmit,reValidateMode:r=ge.onChange,resolver:i,context:o,defaultValues:l={},shouldFocusError:a=!0,shouldUnregister:u=!0,criteriaMode:c}=void 0===e?{}:e;const s=n.useRef({}),d=n.useRef({}),f=n.useRef({}),m=n.useRef(new Set),v=n.useRef({}),p=n.useRef({}),g=n.useRef({}),h=n.useRef({}),E=n.useRef(l),y=n.useRef(!1),_=n.useRef(!1),b=n.useRef(),C=n.useRef({}),O=n.useRef({}),S=n.useRef(o),w=n.useRef(i),N=n.useRef(new Set),I=n.useRef(ct(t)),{isOnSubmit:D,isOnTouch:T}=I.current,A=c===ge.all,[L,R]=n.useState({isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touched:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!D,errors:{}}),x=n.useRef({isDirty:!ft,dirtyFields:!ft,touched:!ft||T,isValidating:!ft,isSubmitting:!ft,isValid:!ft}),P=n.useRef(L),M=n.useRef(),{isOnBlur:k,isOnChange:U}=n.useRef(ct(r)).current;S.current=o,w.current=i,P.current=L,C.current=u?{}:je(C.current)?ut(l):C.current;const B=n.useCallback(function(e){void 0===e&&(e={}),y.current||(P.current=Object.assign(Object.assign({},P.current),e),R(P.current))},[]),j=()=>x.current.isValidating&&B({isValidating:!0}),F=n.useCallback(function(e,t,n,r,i){void 0===n&&(n=!1),void 0===r&&(r={});let o=n||(e=>{let{errors:t,name:n,error:r,validFields:i,fieldsWithValidation:o}=e;const l=we(r),a=Ne(t,n);return l&&!!a||!l&&!Ge(a,r,!0)||l&&Ne(o,n)&&!Ne(i,n)})({errors:P.current.errors,error:t,name:e,validFields:h.current,fieldsWithValidation:g.current});const l=Ne(P.current.errors,e);t?(Ve(h.current,e),o=o||!l||!Ge(l,t,!0),Oe(P.current.errors,e,t)):((Ne(g.current,e)||w.current)&&(Oe(h.current,e,!0),o=o||l),Ve(P.current.errors,e)),(o&&!he(n)||!je(r)||x.current.isValidating)&&B(Object.assign(Object.assign(Object.assign({},r),w.current?{isValid:!!i}:{}),{isValidating:!1}))},[]),V=n.useCallback((e,t)=>{const{ref:n,options:r}=s.current[e],i=at&&pe(n)&&he(t)?"":t;Ae(n)?(r||[]).forEach(e=>{let{ref:t}=e;return t.checked=t.value===i}):Le(n)&&!Ze(i)?n.files=i:xe(n)?[...n.options].forEach(e=>e.selected=i.includes(e.value)):Re(n)&&r?r.length>1?r.forEach(e=>{let{ref:t}=e;return t.checked=Array.isArray(i)?!!i.find(e=>e===t.value):i===t.value}):r[0].ref.checked=!!i:n.value=i},[]),z=n.useCallback((e,t)=>{if(x.current.isDirty){const n=J();return e&&t&&Oe(n,e,t),!Ge(n,E.current)}return!1},[]),W=n.useCallback(function(e,t){if(void 0===t&&(t=!0),x.current.isDirty||x.current.dirtyFields){const n=!Ge(Ne(E.current,e),Ue(s,e,C)),r=Ne(P.current.dirtyFields,e),i=P.current.isDirty;n?Oe(P.current.dirtyFields,e,!0):Ve(P.current.dirtyFields,e);const o={isDirty:z(),dirtyFields:P.current.dirtyFields},l=x.current.isDirty&&i!==o.isDirty||x.current.dirtyFields&&r!==Ne(P.current.dirtyFields,e);return l&&t&&B(o),l?o:{}}return{}},[]),H=n.useCallback(function(e,t){try{return"production"===process.env.NODE_ENV||s.current[e]?Promise.resolve(tt(s,A,s.current[e],C)).then(function(n){const r=n[e];return F(e,r,t),we(r)}):(console.warn("📋 Field is missing with `name` attribute: ",e),Promise.resolve(!1))}catch(e){return Promise.reject(e)}},[F,A]),G=n.useCallback(function(e){try{return Promise.resolve(w.current(J(),S.current,A)).then(function(t){let{errors:n}=t;const r=P.current.isValid;if(Array.isArray(e)){const t=e.map(e=>{const t=Ne(n,e);return t?Oe(P.current.errors,e,t):Ve(P.current.errors,e),!t}).every(Boolean);return B({isValid:je(n),isValidating:!1}),t}{const t=Ne(n,e);return F(e,t,r!==je(n),{},je(n)),!t}})}catch(e){return Promise.reject(e)}},[F,A]),q=n.useCallback(function(e){try{let n=!1;function t(e){return n?e:Promise.resolve(H(r))}const r=e||Object.keys(s.current);if(j(),w.current)return Promise.resolve(G(r));const i=function(){if(Array.isArray(r))return!e&&(P.current.errors={}),Promise.resolve(Promise.all(r.map(function(e){try{return Promise.resolve(H(e,null))}catch(e){return Promise.reject(e)}}))).then(function(e){B({isValidating:!1});const t=e.every(Boolean);return n=!0,t})}();return Promise.resolve(i&&i.then?i.then(t):t(i))}catch(e){return Promise.reject(e)}},[G,H]),Z=n.useCallback((e,t,n)=>{let{shouldDirty:r,shouldValidate:i}=n;const o={};Oe(o,e,t);for(const n of nt(e,t))s.current[n]&&(V(n,Ne(o,n)),r&&W(n),i&&q(n))},[q,V,W]),X=n.useCallback((e,t,n)=>{if(!u&&!We(t)&&Oe(C.current,e,Array.isArray(t)?[...t]:Object.assign({},t)),s.current[e])V(e,t),n.shouldDirty&&W(e),n.shouldValidate&&q(e);else if(!We(t)&&(Z(e,t,n),N.current.has(e))){const r=ot(e)||e;Oe(d.current,e,t),O.current[r]({[r]:Ne(d.current,r)}),(x.current.isDirty||x.current.dirtyFields)&&n.shouldDirty&&(Oe(P.current.dirtyFields,e,((e,t,n)=>He(qe(e,t,n.slice(0,e.length)),qe(t,e,n.slice(0,e.length))))(t,Ne(E.current,e,[]),Ne(P.current.dirtyFields,e,[]))),B({isDirty:!Ge(Object.assign(Object.assign({},J()),{[e]:t}),E.current)}))}!u&&Oe(C.current,e,t)},[W,V,Z]),$=e=>_.current||m.current.has(e)||m.current.has((e.match(/\w+/)||[])[0]),Y=e=>{let t=!0;if(!je(v.current))for(const n in v.current)e&&v.current[n].size&&!v.current[n].has(e)&&!v.current[n].has(ot(e))||(p.current[n](),t=!1);return t};function K(e){if(!u){let t=ut(e);for(const e of N.current)_e(e)&&!t[e]&&(t=Object.assign(Object.assign({},t),{[e]:[]}));return t}return e}function J(e){if(Ze(e))return Ue(s,e,C);if(Array.isArray(e)){const t={};for(const n of e)Oe(t,n,Ue(s,n,C));return t}return K(Xe(s,ut(C.current),u))}b.current=b.current?b.current:function(e){let{type:t,target:n}=e;try{let e=n.name;const r=s.current[e];let i,o;return Promise.resolve(function(){if(r){function l(){!a&&Y(e),F(e,i,f,d,o)}const a="blur"===t,c=it(Object.assign({isBlurEvent:a,isReValidateOnChange:U,isReValidateOnBlur:k,isTouched:!!Ne(P.current.touched,e),isSubmitted:P.current.isSubmitted},I.current));let d=W(e,!1),f=!je(d)||!a&&$(e);if(a&&!Ne(P.current.touched,e)&&x.current.touched&&(Oe(P.current.touched,e,!0),d=Object.assign(Object.assign({},d),{touched:P.current.touched})),!u&&Re(n)&&Oe(C.current,e,Ue(s,e)),c)return!a&&Y(e),(!je(d)||f&&je(d))&&B(d);j();const m=w.current?Promise.resolve(w.current(J(),S.current,A)).then(function(t){let{errors:r}=t;const l=P.current.isValid;if(i=Ne(r,e),Re(n)&&!i&&w.current){const t=ot(e),n=Ne(r,t,{});n.type&&n.message&&(i=n),t&&(n||Ne(P.current.errors,t))&&(e=t)}o=je(r),l!==o&&(f=!0)}):Promise.resolve(tt(s,A,r,C)).then(function(t){i=t[e]});return m&&m.then?m.then(l):l()}}())}catch(e){return Promise.reject(e)}};const Q=n.useCallback(function(e){void 0===e&&(e={});try{const t=je(s.current)?E.current:{};return Promise.resolve(w.current(Object.assign(Object.assign(Object.assign({},t),J()),e),S.current,A)).then(function(e){let{errors:t}=e;const n=je(t);P.current.isValid!==n&&B({isValid:n})})}catch(e){return Promise.reject(e)}},[A]),te=n.useCallback((e,t)=>{!function(e,t,n,r,i,o){const{ref:l,ref:{name:a}}=n,u=e.current[a];if(!i){const t=Ue(e,a,r);!we(t)&&Oe(r.current,a,t)}l.type&&u?Ae(l)||Re(l)?Array.isArray(u.options)&&u.options.length?(be(u.options).forEach(function(e,n){void 0===e&&(e={}),(Be(e.ref)&&ze(e,e.ref)||o)&&(Ie(e.ref,t),Ve(u.options,"["+n+"]"))}),u.options&&!be(u.options).length&&delete e.current[a]):delete e.current[a]:(Be(l)&&ze(u,l)||o)&&(Ie(l,t),delete e.current[a]):delete e.current[a]}(s,b.current,e,C,u,t),u&&(Ve(h.current,e.ref.name),Ve(g.current,e.ref.name))},[u]),ne=n.useCallback(e=>{if(_.current)B();else{for(const t of m.current)if(t.startsWith(e)){B();break}Y(e)}},[]),re=n.useCallback((e,t)=>{e&&(te(e,t),u&&!be(e.options||[]).length&&(Ve(P.current.errors,e.ref.name),Oe(P.current.dirtyFields,e.ref.name,!0),B({isDirty:z()}),x.current.isValid&&w.current&&Q(),ne(e.ref.name)))},[Q,te]),ie=n.useCallback((e,t,n)=>{const r=n?v.current[n]:m.current;let i=Xe(s,ut(C.current),u,!1,e);if(Ze(e)){const n=ot(e)||e;return N.current.has(n)&&(i=Object.assign(Object.assign({},f.current),i)),rt(i,e,r,we(Ne(E.current,e))?t:Ne(E.current,e),!0)}const o=we(t)?E.current:t;return Array.isArray(e)?e.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:rt(i,t,r,o)}),{}):(_.current=we(n),Se(!je(i)&&i||o))},[]);function oe(e,t){if(void 0===t&&(t={}),"production"!==process.env.NODE_ENV){if(!e.name)return console.warn("📋 Field is missing `name` attribute",e,"https://react-hook-form.com/api#useForm");if(N.current.has(e.name.split(/\[\d+\]$/)[0])&&!RegExp(("^"+e.name.split(/\[\d+\]$/)[0]+"[\\d+].\\w+").replace(/\[/g,"\\[").replace(/\]/g,"\\]")).test(e.name))return console.warn('📋 `name` prop should be in object shape: name="test[index].name"',e,"https://react-hook-form.com/api#useFieldArray")}const{name:n,type:r,value:i}=e,o=Object.assign({ref:e},t),l=s.current,a=st(e),c=lt(N.current,n),d=t=>at&&(!pe(e)||t===e);let f,m=l[n],v=!0;if(m&&(a?Array.isArray(m.options)&&be(m.options).find(e=>i===e.ref.value&&d(e.ref)):d(m.ref)))return void(l[n]=Object.assign(Object.assign({},m),t));m=r?a?Object.assign({options:[...be(m&&m.options||[]),{ref:e}],ref:{type:r,name:n}},t):Object.assign({},o):o,l[n]=m;const p=we(Ne(C.current,n));je(E.current)&&p||(f=Ne(p?E.current:C.current,n),v=we(f),v||c||V(n,f)),je(t)||(Oe(g.current,n,!0),!D&&x.current.isValid&&tt(s,A,m,C).then(e=>{const t=P.current.isValid;je(e)?Oe(h.current,n,!0):Ve(h.current,n),t!==je(e)&&B()})),!u||c&&v||!c&&Ve(P.current.dirtyFields,n),r&&function(e,t,n){let{ref:r}=e;pe(r)&&n&&(r.addEventListener(t?"change":"input",n),r.addEventListener("blur",n))}(a&&m.options?m.options[m.options.length-1]:m,a||"select-one"===e.type,b.current)}const le=n.useCallback((e,t)=>function(n){try{n&&n.preventDefault&&(n.preventDefault(),n.persist());let r={},i=K(Xe(s,ut(C.current),u,!0));return x.current.isSubmitting&&B({isSubmitting:!0}),Promise.resolve(function(o,l){try{var u=function(){function o(){const o=function(){if(je(r)&&Object.keys(P.current.errors).every(e=>e in s.current))return B({errors:{},isSubmitting:!0}),Promise.resolve(e(i,n)).then(function(){});{function o(e){a&&((e,t)=>{for(const n in e)if(Ne(t,n)){const t=e[n];if(t){if(t.ref.focus&&we(t.ref.focus()))break;if(t.options){t.options[0].ref.focus();break}}}})(s.current,P.current.errors)}return P.current.errors=Object.assign(Object.assign({},P.current.errors),r),t?Promise.resolve(t(P.current.errors,n)).then(o):o()}}();if(o&&o.then)return o.then(function(){})}const l=w.current?Promise.resolve(w.current(i,S.current,A)).then(function(e){let{errors:t,values:n}=e;P.current.errors=r=t,i=n}):ee(Object.values(s.current),function(e){const t=function(){if(e){const{name:t}=e.ref;return Promise.resolve(tt(s,A,e,C)).then(function(e){e[t]?(Oe(r,t,e[t]),Ve(h.current,t)):Ne(g.current,t)&&(Ve(P.current.errors,t),Oe(h.current,t,!0))})}}();if(t&&t.then)return t.then(function(){})});return l&&l.then?l.then(o):o()}()}catch(e){return l(!0,e)}return u&&u.then?u.then(l.bind(null,!1),l.bind(null,!0)):l(!1,u)}(0,function(e,t){if(P.current.isSubmitting=!1,B({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:je(P.current.errors),submitCount:P.current.submitCount+1}),e)throw t;return t}))}catch(n){return Promise.reject(n)}},[a,A]);n.useEffect(()=>{i&&x.current.isValid&&Q(),M.current=M.current||!at?M.current:function(e,t){const n=new MutationObserver(()=>{for(const n of Object.values(e.current))if(n&&n.options)for(const e of n.options)e&&e.ref&&Be(e.ref)&&t(n);else n&&Be(n.ref)&&t(n)});return n.observe(window.document,{childList:!0,subtree:!0}),n}(s,re)},[re,E.current]),n.useEffect(()=>()=>{M.current&&M.current.disconnect(),y.current=!0,"production"===process.env.NODE_ENV&&Object.values(s.current).forEach(e=>re(e,!0))},[]),!i&&x.current.isValid&&(L.isValid=Ge(h.current,g.current)&&je(P.current.errors));const ae={trigger:q,setValue:n.useCallback(function(e,t,n){X(e,t,n||{}),$(e)&&B(),Y(e)},[X,q]),getValues:n.useCallback(J,[]),register:n.useCallback(function(e,t){if(!dt)if(Ze(e))oe({name:e},t);else{if(!ye(e)||!("name"in e))return t=>t&&oe(t,e);oe(e,t)}},[E.current]),unregister:n.useCallback(function(e){for(const t of Array.isArray(e)?e:[e])re(s.current[t],!0)},[]),formState:ft?new Proxy(L,{get:(e,t)=>{if("production"!==process.env.NODE_ENV&&"isValid"===t&&D&&console.warn("📋 `formState.isValid` is applicable with `onTouched`, `onChange` or `onBlur` mode. https://react-hook-form.com/api#formState"),t in e)return x.current[t]=!0,e[t]}}):L},ue=n.useMemo(()=>Object.assign({isFormDirty:z,updateWatchedValue:ne,shouldUnregister:u,updateFormState:B,removeFieldEventListener:te,watchInternal:ie,mode:I.current,reValidateMode:{isReValidateOnBlur:k,isReValidateOnChange:U},validateResolver:i?Q:void 0,fieldsRef:s,resetFieldArrayFunctionRef:O,useWatchFieldsRef:v,useWatchRenderFunctionsRef:p,fieldArrayDefaultValuesRef:d,validFieldsRef:h,fieldsWithValidationRef:g,fieldArrayNamesRef:N,readFormStateRef:x,formStateRef:P,defaultValuesRef:E,shallowFieldsStateRef:C,fieldArrayValuesRef:f},ae),[E.current,ne,u,te,ie]);return Object.assign({watch:function(e,t){return ie(e,t)},control:ue,handleSubmit:le,reset:n.useCallback(function(e,t){if(void 0===t&&(t={}),at)for(const e of Object.values(s.current))if(e){const{ref:t,options:n}=e,r=st(t)&&Array.isArray(n)?n[0].ref:t;if(pe(r))try{r.closest("form").reset();break}catch(e){}}s.current={},E.current=Object.assign({},e||E.current),e&&Y(""),Object.values(O.current).forEach(e=>Ke(e)&&e()),C.current=u?{}:ut(e||E.current),(e=>{let{errors:t,isDirty:n,isSubmitted:r,touched:i,isValid:o,submitCount:l,dirtyFields:a}=e;o||(h.current={},g.current={}),d.current={},m.current=new Set,_.current=!1,B({submitCount:l?P.current.submitCount:0,isDirty:!!n&&P.current.isDirty,isSubmitted:!!r&&P.current.isSubmitted,isValid:!!o&&P.current.isValid,dirtyFields:a?P.current.dirtyFields:{},touched:i?P.current.touched:{},errors:t?P.current.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})})(t)},[]),clearErrors:n.useCallback(function(e){e&&(Array.isArray(e)?e:[e]).forEach(e=>s.current[e]&&_e(e)?delete P.current.errors[e]:Ve(P.current.errors,e)),B({errors:e?P.current.errors:{}})},[]),setError:n.useCallback(function(e,t){const n=(s.current[e]||{}).ref;Oe(P.current.errors,e,Object.assign(Object.assign({},t),{ref:n})),B({isValid:!1}),t.shouldFocus&&n&&n.focus&&n.focus()},[]),errors:L.errors},ae)}({defaultValues:s}),h=e=>{if(null==e||null==e||""==e)return"NA";const t=new Date(e);let n=t.getMonth()+1,r=t.getDate();return n=(n>9?"":"0")+n,r=(r>9?"":"0")+r,r+"/"+n+"/"+t.getFullYear()},E=e=>{if(null==e||null==e||""==e)return"NA";const t=new Date(e);let n=t.getHours(),r=t.getMinutes(),i=n>12?"PM":"AM";return n=n>12?n-12:n,n=(n>9?"":"0")+n,r=(r>9?"":"0")+r,n+":"+r+" "+i},[y,_]=n.useState([]),b=e=>r.createElement("div",{onClick:e.onClick},r.createElement(u.DownloadBtnCommon,null));n.useEffect(()=>{d("offset",0),d("limit",5),d("sortOrder","DESC")},[d]),n.useEffect(()=>{(null==a?void 0:a.length)>0&&_([null==a?void 0:a.map(e=>{let t={};return t[o("AUDIT_DATE_LABEL")]=h(null==e?void 0:e.timestamp),t[o("AUDIT_TIME_LABEL")]=E(null==e?void 0:e.timestamp),t[o("AUDIT_DATAVIEWED_LABEL")]=(null==e?void 0:e.dataView[0])+","+(null==e?void 0:e.dataView[1]),t[o("AUDIT_DATAVIEWED_BY_LABEL")]=null==e?void 0:e.dataViewedBy,t[o("AUDIT_ROLE_LABEL")]=null==e?void 0:e.roles.map(e=>e.name).join(","),{...t}})])},[a]);const C=n.useCallback(e=>{0!==e.length&&(v("sortBy",e.id),v("sortOrder",e.desc?"DESC":"ASC"))},[]);function O(){v("offset",p("offset")-p("limit")),m(l)()}const S=window.Digit.Utils.browser.isMobile();if(S)return r.createElement(gt,{Controller:vt,register:d,control:f,t:o,reset:g,previousPage:O,handleSubmit:m,tenantId:i,data:a,onSubmit:l});const w=e=>r.createElement("span",{className:"cell-text"},e),N=n.useMemo(()=>[{Header:o("AUDIT_DATE_LABEL"),disableSortBy:!0,accessor:e=>{const t="NA"===e.timestamp?o("WS_NA"):h(e.timestamp);return w(""+t)}},{Header:o("AUDIT_TIME_LABEL"),disableSortBy:!0,accessor:e=>{const t="NA"===e.timestamp?o("WS_NA"):E(e.timestamp);return w(""+t)}},{Header:o(S?"AUDIT_DATAVIEWED_LABEL":"AUDIT_DATAVIEWED_PRIVACY"),disableSortBy:!0,accessor:e=>w(""+(null==e?void 0:e.dataView))},{Header:o(S?"AUDIT_DATAVIEWED_BY_LABEL":"AUDIT_DATAVIEWED_BY_PRIVACY"),disableSortBy:!0,accessor:e=>w(""+(null==e?void 0:e.dataViewedBy))},{Header:o("AUDIT_ROLE_LABEL"),disableSortBy:!0,accessor:e=>{var t;return w(""+(null==e||null===(t=e.roles.slice(0,3))||void 0===t?void 0:t.map(e=>e.name)))}}],[]);return r.createElement(r.Fragment,null,r.createElement("div",{style:{marginRight:"-70px"}}," ",r.createElement(t.BackButton,null)," "),r.createElement("div",{style:{marginTop:"30px",marginLeft:"30px"}}," ",r.createElement(t.Header,null,o("PRIVACY_AUDIT_REPORT"))," "),r.createElement(t.SearchForm,{className:"audit-card",onSubmit:l,handleSubmit:m},r.createElement(pt,{register:d,control:f,reset:g,tenantId:i,t:o,previousPage:O})),r.createElement("div",{style:{marginTop:"240px",marginLeft:"-55%",maxWidth:"80%",marginRight:"52px"}},null!=a&&a.display?r.createElement("div",{style:{marginTop:"20x",width:"1025px",marginLeft:"25px",backgroundColor:"white",height:"60px"}},o(a.display).split("\\n").map((e,t)=>r.createElement("p",{key:t,style:{textAlign:"center"}},e))):""!==a?r.createElement("div",{style:{backgroundColor:"white",marginRight:"-30px",marginLeft:"30px"}},r.createElement("div",{className:"sideContent",style:{float:"right",padding:"10px 30px"}},r.createElement(b,{className:"mrlg cursorPointer",onClick:()=>(e=>{if(void 0!==(null==e?void 0:e[0]))return Digit.Download.Excel(null==e?void 0:e[0],"AuditReport")})(y)})),r.createElement(u.Table,{t:o,data:a,totalRecords:c,columns:N,getCellProps:e=>({style:{minWidth:e.column.Header===o("ES_INBOX_APPLICATION_NO")?"240px":"",padding:"20px 18px",fontSize:"16px"}}),onPageSizeChange:function(e){v("limit",Number(e.target.value)),m(l)()},currentPage:p("offset")/p("limit"),onNextPage:function(){v("offset",p("offset")+p("limit")),m(l)()},onPrevPage:O,manualPagination:!1,pageSizeLimit:p("limit"),onSort:C,disableSort:!1,sortParams:[{id:p("sortBy"),desc:"DESC"===p("sortOrder")}]})):r.createElement(t.Loader,null)))},Et=e=>{var t,o;const{t:l}=i.useTranslation(),a=Digit.ULBService.getCitizenCurrentTenant(),[u,c]=n.useState({}),s=function(e,t){void 0===t&&(t="dayend");try{const n=e.match(/(\d{4})-(\d{1,2})-(\d{1,2})/),r=new Date(Date.UTC(n[1],n[2]-1,n[3]));return r.setMinutes(r.getMinutes()+r.getTimezoneOffset()),"dayend"===t&&(r.setHours(r.getHours()+24),r.setSeconds(r.getSeconds()-1)),r.getTime()}catch(t){return e}};n.useEffect(()=>{const e=Digit.SessionStorage.get("AUDIT_APPLICATION_DETAIL")||{};if(e){const t={...e};c(Object.keys(t).filter(e=>t[e]).reduce((e,n)=>({...e,[n]:"object"==typeof t[n]?t[n].code:t[n]}),{}))}},[]);const d={enabled:!!(u&&Object.keys(u).length>0)},f={...u},{isLoading:m,data:v}=Digit.Hooks.useAudit({tenantId:a,filters:{...f},config:d});return r.createElement(ht,{t:l,tenantId:a,onSubmit:function(e){Digit.SessionStorage.set("AUDIT_APPLICATION_DETAIL",{offset:0,limit:5,sortBy:"commencementDate",sortOrder:"DESC"});const t={...e,fromDate:s(null==e?void 0:e.fromDate),toDate:s(null==e?void 0:e.toDate)};c(Object.keys(t).filter(e=>t[e]).reduce((e,n)=>({...e,[n]:t[n]}),{}))},data:m?"":(null==v||null===(t=v.ElasticSearchData)||void 0===t?void 0:t.length)>0?null==v?void 0:v.ElasticSearchData:{display:"ES_COMMON_NO_DATA"},count:null==v||null===(o=v.ElasticSearchData)||void 0===o?void 0:o.length})},yt=e=>{var n,o,l,a,u,c,s,d,f,m,v,p,g,h,E,y;let{moduleCode:_}=e;const{t:b}=i.useTranslation(),C=Digit.ULBService.getCitizenCurrentTenant(),{isLoading:O,data:S}=Digit.Hooks.useStaticData(Digit.ULBService.getStateId()),{isLoading:w,error:N,data:I}=Digit.Hooks.useDynamicData({moduleCode:_,tenantId:C,filters:{},t:b}),D=e=>{let{module:n,styles:i}=e;switch(n){case"TL":return r.createElement(t.CaseIcon,{className:"fill-path-primary-main",styles:i});case"PT":return r.createElement(t.PTIcon,{className:"fill-path-primary-main",styles:i});case"MCOLLECT":return r.createElement(t.MCollectIcon,{className:"fill-path-primary-main",styles:i});case"PGR":return r.createElement(t.ComplaintIcon,{className:"fill-path-primary-main",styles:i});default:return r.createElement(t.CaseIcon,{className:"fill-path-primary-main",styles:i})}},T=null==S||null===(n=S.MdmsRes["common-masters"])||void 0===n||null===(o=n.StaticData[0])||void 0===o?void 0:o[""+_],A=e=>{let{module:n}=e;switch(n){case"PT":case"WS":return r.createElement("span",{className:"timerIcon"},r.createElement(t.TimerIcon,null));default:return null}},L=e=>{let{module:n}=e;switch(n){case"PT":return r.createElement("span",{className:"rupeeSymbol"},r.createElement(t.RupeeSymbol,null));case"WS":return r.createElement("span",{className:"timerIcon"},r.createElement(t.TimerIcon,null));default:return null}},R=e=>{switch(e){case"TL":case"PT":case"MCOLLECT":return{staticCommonContent:b("COMMON_VALIDITY"),validity:(null==T?void 0:T.validity)+b("1"===(null==T?void 0:T.validity)?"COMMON_DAY":"COMMON_DAYS")};case"PGR":return{staticCommonContent:b("ACTION_TEST_COMPLAINT_TYPES")};case"OBPS":return{staticCommonContent:b("BUILDING_PLAN_PERMIT_VALIDITY"),validity:(null==T?void 0:T.validity)+" "+b("1"===(null==T?void 0:T.validity)?"COMMON_DAY":"COMMON_DAYS")};default:return{staticCommonContent:""}}},x=e=>{switch(e){case"PT":return{staticDataOne:(null==T?void 0:T.staticDataOne)+" "+b("COMMON_DAYS"),staticDataOneHeader:b("APPLICATION_PROCESSING_TIME"),staticDataTwo:null==T?void 0:T.staticDataTwo,staticDataTwoHeader:b("APPLICATION_PROCESSING_FEE")};case"WS":return{staticDataOne:"",staticDataOneHeader:b("PAY_WATER_CHARGES_BY")+" "+(null==T?void 0:T.staticDataOne)+" "+b("COMMON_DAYS")+" "+b("OF_BILL_GEN_TO_AVOID_LATE_FEE"),staticDataTwo:(null==T?void 0:T.staticDataTwo)+" "+b("COMMON_DAYS"),staticDataTwoHeader:b("APPLICATION_PROCESSING_TIME")};default:return{}}};return O||w?r.createElement(t.Loader,null):T?r.createElement(r.Fragment,null,T&&null!=T&&T.payViaWhatsApp?r.createElement(t.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"}},r.createElement("div",{className:"pay-whatsapp-card",onClick:()=>{window.open(null==T?void 0:T.payViaWhatsApp)}},r.createElement("div",{className:"pay-whatsapp-text"},b("PAY_VIA_WHATSAPP")),r.createElement("div",{className:"whatsAppIconG"},r.createElement(t.WhatsappIconGreen,null)))):null,T&&null!=T&&T.helpline?r.createElement(t.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"}},r.createElement("div",{className:"static-home-Card"},r.createElement("div",{className:"static-home-Card-header"},b("CALL_CENTER_HELPLINE")),r.createElement("div",{className:"helplineIcon"},r.createElement(t.HelpLineIcon,null))),r.createElement("div",{className:"call-center-card-text"},null!=T&&null!==(l=T.helpline)&&void 0!==l&&l.contactOne?r.createElement("div",{className:"call-center-card-content"},r.createElement("a",{href:"tel:"+(null==T||null===(a=T.helpline)||void 0===a?void 0:a.contactOne)},null==T||null===(u=T.helpline)||void 0===u?void 0:u.contactOne)):null,null!=T&&null!==(c=T.helpline)&&void 0!==c&&c.contactTwo?r.createElement("div",{className:"call-center-card-content"},r.createElement("a",{href:"tel:"+(null==T||null===(s=T.helpline)||void 0===s?void 0:s.contactTwo)},null==T||null===(d=T.helpline)||void 0===d?void 0:d.contactTwo)):null)):null,T&&null!=T&&T.serviceCenter?r.createElement(t.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"}},r.createElement("div",{className:"static-home-Card"},r.createElement("div",{className:"static-home-Card-header"},b("CITIZEN_SERVICE_CENTER")),r.createElement("div",{className:"serviceCentrIcon"},r.createElement(t.ServiceCenterIcon,null))),r.createElement("div",{className:"service-center-details-card"},r.createElement("div",{className:"service-center-details-text"},null==T?void 0:T.serviceCenter)),null!=T&&T.viewMapLocation?r.createElement("div",{className:"link"},r.createElement("a",{href:null==T?void 0:T.viewMapLocation},b("VIEW_ON_MAP"))):null):r.createElement("div",null),r.createElement(t.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"}},N||null==I||null===(null==I?void 0:I.dynamicDataOne)?r.createElement("div",null):r.createElement("div",{className:"dynamicDataCard"},r.createElement("div",{className:"dynamicData"},r.createElement(D,{module:_,styles:{width:"24px",height:"24px"}}),r.createElement("span",{className:"dynamicData-content"},null==I?void 0:I.dynamicDataOne))),N||null==I||null===(null==I?void 0:I.dynamicDataTwo)?r.createElement("div",null):r.createElement("div",{className:"dynamicDataCard"},r.createElement("div",{className:"dynamicData"},r.createElement(D,{module:_,styles:{width:"24px",height:"24px"}}),r.createElement("span",{className:"dynamicData-content"},null==I?void 0:I.dynamicDataTwo))),T&&null!=T&&T.staticDataOne?r.createElement("div",{className:"staticDataCard"},r.createElement("div",{className:"staticData"},r.createElement(A,{module:_}),r.createElement("span",{className:"static-data-content"},r.createElement("span",{className:"static-data-content-first",style:{marginTop:""===(null===(f=x(_))||void 0===f?void 0:f.staticDataOne)?"8px":"unset"}},null===(m=x(_))||void 0===m?void 0:m.staticDataOneHeader),r.createElement("span",{className:"static-data-content-second"},""+(null===(v=x(_))||void 0===v?void 0:v.staticDataOne))))):r.createElement("div",null),T&&null!=T&&T.staticDataTwo?r.createElement("div",{className:"staticDataCard"},r.createElement("div",{className:"staticData"},r.createElement(L,{module:_}),r.createElement("span",{className:"static-data-content"},r.createElement("span",{className:"static-data-content-first"},null===(p=x(_))||void 0===p?void 0:p.staticDataTwoHeader),r.createElement("span",{className:"static-data-content-second"},null===(g=x(_))||void 0===g?void 0:g.staticDataTwo)))):r.createElement("div",null),T&&null!=T&&T.validity?r.createElement("div",{className:"staticDataCard"},r.createElement("div",{className:"staticData"},r.createElement("span",{className:"validityIcon"},r.createElement(t.ValidityTimeIcon,null)),r.createElement("span",{className:"static-data-content"},r.createElement("span",{className:"static-data-content-first"},null===(h=R(_))||void 0===h?void 0:h.staticCommonContent),r.createElement("span",{className:"static-data-content-second"},null===(E=R(_))||void 0===E?void 0:E.validity)))):r.createElement("div",null),N||null==I||null==I||!I.staticData||null===(null==I?void 0:I.staticData)?r.createElement("div",null):r.createElement("div",{className:"staticDataCard"},r.createElement("div",{className:"staticData"},"PGR"===_?r.createElement(D,{module:_,styles:{width:"24px",height:"24px",marginLeft:"13px",marginTop:"12px"}}):r.createElement("span",{className:"validityIcon"},r.createElement(t.ValidityTimeIcon,null)),r.createElement("span",{className:"static-data-content"},r.createElement("span",{className:"static-data-content-first"},null===(y=R(_))||void 0===y?void 0:y.staticCommonContent),r.createElement("span",{className:"static-data-content-second"},null==I?void 0:I.staticData)))))):r.createElement(r.Fragment,null)};var _t,bt,Ct,Ot,St;const wt=[(null===(_t=window)||void 0===_t?void 0:_t.contextPath)+"/citizen/register/name","/"+(null===(bt=window)||void 0===bt?void 0:bt.contextPath)+"/citizen/select-language","/"+(null===(Ct=window)||void 0===Ct?void 0:Ct.contextPath)+"/citizen/select-location","/"+(null===(Ot=window)||void 0===Ot?void 0:Ot.contextPath)+"/citizen/login","/"+(null===(St=window)||void 0===St?void 0:St.contextPath)+"/citizen/register/otp"],Nt=(e,t)=>t.filter(t=>e.map(e=>e.code).includes(t.code)),It=e=>{var n,o,l;let{stateInfo:u,userDetails:c,CITIZEN:s,cityDetails:d,mobileView:f,handleUserDropdownSelection:v,logoUrl:h,stateCode:E,modules:_,appTenants:b,pathname:C,initData:O}=e;const{isLoading:S,data:w,isFetched:N}=Digit.Hooks.useCustomMDMS(Digit.ULBService.getStateId(),"ACCESSCONTROL-ACTIONS-TEST",[{name:"actions-test",filter:"[?(@.url == '"+window.contextPath+"-card')]"}],{select:e=>{var t,n;return null==e||null===(t=e["ACCESSCONTROL-ACTIONS-TEST"])||void 0===t||null===(n=t["actions-test"])||void 0===n?void 0:n.filter(e=>!0===e.enabled).reduce((e,t)=>{var n;return e[t.parentModule]=(null===(n=e[t.parentModule])||void 0===n?void 0:n.length)>0?[t,...e[t.parentModule]]:[t],e},{})}}),I=Digit.Hooks.useRouteSubscription(C),{t:D}=i.useTranslation(),{path:T}=a.useRouteMatch(),A=a.useHistory(),R=wt.some(e=>window.location.href.includes(e)),x=_.map((e,t)=>{let{code:n,tenants:i}=e;const o=Digit.ComponentRegistryService.getComponent(n+"Module");return o?r.createElement(a.Route,{key:t,path:T+"/"+n.toLowerCase()},r.createElement(o,{stateCode:E,moduleCode:n,userType:"citizen",tenants:Nt(i,b)})):null}),P=_.map((e,n)=>{let{code:i,bannerImage:o}=e,l=(Digit.ComponentRegistryService.getComponent(i+"Links"),N?g(w,i,D):void 0);return"ACTION_TEST_WS"===(null==l?void 0:l.header)&&(null==l||l.links.sort((e,t)=>t.orderNumber-e.orderNumber)),r.createElement(r.Fragment,null,r.createElement(a.Route,{key:n,path:T+"/"+i.toLowerCase()+"-home"},r.createElement("div",{className:"moduleLinkHomePage"},r.createElement("img",{src:o||(null==u?void 0:u.bannerUrl),alt:"noimagefound"}),r.createElement(t.BackButton,{className:"moduleLinkHomePageBackButton"}),r.createElement("h1",null,D("MODULE_"+i.toUpperCase())),r.createElement("div",{className:"moduleLinkHomePageModuleLinks"},l&&r.createElement(t.CitizenHomeCard,{header:D(null==l?void 0:l.header),links:null==l?void 0:l.links,Icon:()=>r.createElement("span",null),Info:"OBPS"===i?()=>r.createElement(t.CitizenInfoLabel,{style:{margin:"0px",padding:"10px"},info:D("CS_FILE_APPLICATION_INFO_LABEL"),text:D("BPA_CITIZEN_HOME_STAKEHOLDER_INCLUDES_INFO_LABEL")}):null,isInfo:"OBPS"===i})),r.createElement(yt,{moduleCode:null==i?void 0:i.toUpperCase()}))),r.createElement(a.Route,{key:"faq"+n,path:T+"/"+i.toLowerCase()+"-faq"},r.createElement(q,{module:null==i?void 0:i.toUpperCase()})),r.createElement(a.Route,{key:"hiw"+n,path:T+"/"+i.toLowerCase()+"-how-it-works"},r.createElement(ie,{module:null==i?void 0:i.toUpperCase()})))});return r.createElement("div",{className:I},r.createElement(H,{t:D,stateInfo:u,userDetails:c,CITIZEN:s,cityDetails:d,mobileView:f,handleUserDropdownSelection:v,logoUrl:h,showSidebar:!0,linkData:w,islinkDataLoading:S}),r.createElement("div",{className:"main center-container citizen-home-container mb-25"},R?null:r.createElement("div",{className:"SideBarStatic"},r.createElement(L,{linkData:w,islinkDataLoading:S})),r.createElement(a.Switch,null,r.createElement(a.Route,{exact:!0,path:T},r.createElement(Z,null)),r.createElement(a.Route,{exact:!0,path:T+"/select-language"},r.createElement(X,null)),r.createElement(a.Route,{exact:!0,path:T+"/select-location"},r.createElement($,null)),r.createElement(a.Route,{path:T+"/error"},r.createElement(m,{initData:O,goToHome:()=>{var e,t,n,r;A.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/"+(null===(t=Digit)||void 0===t||null===(n=t.UserService)||void 0===n||null===(r=n.getType)||void 0===r?void 0:r.call(n)))}})),r.createElement(a.Route,{path:T+"/all-services"},r.createElement(y,{userType:"citizen",modules:_,getCitizenMenu:w,fetchedCitizen:N,isLoading:S})),r.createElement(a.Route,{path:T+"/login"},r.createElement(ve,{stateCode:E})),r.createElement(a.Route,{path:T+"/register"},r.createElement(ve,{stateCode:E,isUserRegistered:!1})),r.createElement(a.Route,{path:T+"/user/profile"},r.createElement(re,{stateCode:E,userType:"citizen",cityDetails:d})),r.createElement(a.Route,{path:T+"/Audit"},r.createElement(Et,null)),r.createElement(p,{initData:O},x,P))),r.createElement("div",{className:"citizen-home-footer",style:window.location.href.includes("citizen/obps")?{zIndex:"-1"}:{}},r.createElement("img",{alt:"Powered by DIGIT",src:null===(n=window)||void 0===n||null===(o=n.globalConfigs)||void 0===o||null===(l=o.getConfig)||void 0===l?void 0:l.call(o,"DIGIT_FOOTER"),style:{height:"1.2em",cursor:"pointer"},onClick:()=>{var e,t,n;window.open(null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_HOME_URL"),"_blank").focus()}})))};var Dt="function"==typeof Symbol&&Symbol.for,Tt=Dt?Symbol.for("react.element"):60103,At=Dt?Symbol.for("react.portal"):60106,Lt=Dt?Symbol.for("react.fragment"):60107,Rt=Dt?Symbol.for("react.strict_mode"):60108,xt=Dt?Symbol.for("react.profiler"):60114,Pt=Dt?Symbol.for("react.provider"):60109,Mt=Dt?Symbol.for("react.context"):60110,kt=Dt?Symbol.for("react.async_mode"):60111,Ut=Dt?Symbol.for("react.concurrent_mode"):60111,Bt=Dt?Symbol.for("react.forward_ref"):60112,jt=Dt?Symbol.for("react.suspense"):60113,Ft=Dt?Symbol.for("react.suspense_list"):60120,Vt=Dt?Symbol.for("react.memo"):60115,zt=Dt?Symbol.for("react.lazy"):60116,Wt=Dt?Symbol.for("react.block"):60121,Ht=Dt?Symbol.for("react.fundamental"):60117,Gt=Dt?Symbol.for("react.responder"):60118,qt=Dt?Symbol.for("react.scope"):60119;function Zt(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case Tt:switch(e=e.type){case kt:case Ut:case Lt:case xt:case Rt:case jt:return e;default:switch(e=e&&e.$$typeof){case Mt:case Bt:case zt:case Vt:case Pt:return e;default:return t}}case At:return t}}}function Xt(e){return Zt(e)===Ut}var $t={AsyncMode:kt,ConcurrentMode:Ut,ContextConsumer:Mt,ContextProvider:Pt,Element:Tt,ForwardRef:Bt,Fragment:Lt,Lazy:zt,Memo:Vt,Portal:At,Profiler:xt,StrictMode:Rt,Suspense:jt,isAsyncMode:function(e){return Xt(e)||Zt(e)===kt},isConcurrentMode:Xt,isContextConsumer:function(e){return Zt(e)===Mt},isContextProvider:function(e){return Zt(e)===Pt},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===Tt},isForwardRef:function(e){return Zt(e)===Bt},isFragment:function(e){return Zt(e)===Lt},isLazy:function(e){return Zt(e)===zt},isMemo:function(e){return Zt(e)===Vt},isPortal:function(e){return Zt(e)===At},isProfiler:function(e){return Zt(e)===xt},isStrictMode:function(e){return Zt(e)===Rt},isSuspense:function(e){return Zt(e)===jt},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===Lt||e===Ut||e===xt||e===Rt||e===jt||e===Ft||"object"==typeof e&&null!==e&&(e.$$typeof===zt||e.$$typeof===Vt||e.$$typeof===Pt||e.$$typeof===Mt||e.$$typeof===Bt||e.$$typeof===Ht||e.$$typeof===Gt||e.$$typeof===qt||e.$$typeof===Wt)},typeOf:Zt},Yt=k(function(e,t){"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,n=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,l=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function _(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:var m=e.type;switch(m){case c:case s:case i:case l:case o:case f:return m;default:var g=m&&m.$$typeof;switch(g){case u:case d:case p:case v:case a:return g;default:return t}}case r:return t}}}var b=s,C=u,O=a,S=n,w=d,N=i,I=p,D=v,T=r,A=l,L=o,R=f,x=!1;function P(e){return _(e)===s}t.AsyncMode=c,t.ConcurrentMode=b,t.ContextConsumer=C,t.ContextProvider=O,t.Element=S,t.ForwardRef=w,t.Fragment=N,t.Lazy=I,t.Memo=D,t.Portal=T,t.Profiler=A,t.StrictMode=L,t.Suspense=R,t.isAsyncMode=function(e){return x||(x=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),P(e)||_(e)===c},t.isConcurrentMode=P,t.isContextConsumer=function(e){return _(e)===u},t.isContextProvider=function(e){return _(e)===a},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return _(e)===d},t.isFragment=function(e){return _(e)===i},t.isLazy=function(e){return _(e)===p},t.isMemo=function(e){return _(e)===v},t.isPortal=function(e){return _(e)===r},t.isProfiler=function(e){return _(e)===l},t.isStrictMode=function(e){return _(e)===o},t.isSuspense=function(e){return _(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===s||e===l||e===o||e===f||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===v||e.$$typeof===a||e.$$typeof===u||e.$$typeof===d||e.$$typeof===h||e.$$typeof===E||e.$$typeof===y||e.$$typeof===g)},t.typeOf=_}()}),Kt=k(function(e){e.exports="production"===process.env.NODE_ENV?$t:Yt}),Jt=Object.getOwnPropertySymbols,Qt=Object.prototype.hasOwnProperty,en=Object.prototype.propertyIsEnumerable;function tn(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var nn=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,i=tn(e),o=1;o<arguments.length;o++){for(var l in n=Object(arguments[o]))Qt.call(n,l)&&(i[l]=n[l]);if(Jt){r=Jt(n);for(var a=0;a<r.length;a++)en.call(n,r[a])&&(i[r[a]]=n[r[a]])}}return i},rn="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",on=Function.call.bind(Object.prototype.hasOwnProperty),ln=function(){};if("production"!==process.env.NODE_ENV){var an=rn,un={},cn=on;ln=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function sn(e,t,n,r,i){if("production"!==process.env.NODE_ENV)for(var o in e)if(cn(e,o)){var l;try{if("function"!=typeof e[o]){var a=Error((r||"React class")+": "+n+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw a.name="Invariant Violation",a}l=e[o](t,o,r,n,null,an)}catch(e){l=e}if(!l||l instanceof Error||ln((r||"React class")+": type specification of "+n+" `"+o+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof l+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),l instanceof Error&&!(l.message in un)){un[l.message]=!0;var u=i?i():"";ln("Failed "+n+" type: "+l.message+(null!=u?u:""))}}}sn.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(un={})};var dn=sn,fn=function(){};function mn(){return null}function vn(){}function pn(){}"production"!==process.env.NODE_ENV&&(fn=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),pn.resetWarningCache=vn;var gn=k(function(e){e.exports="production"!==process.env.NODE_ENV?function(e,t){var n="function"==typeof Symbol&&Symbol.iterator,r={array:a("array"),bigint:a("bigint"),bool:a("boolean"),func:a("function"),number:a("number"),object:a("object"),string:a("string"),symbol:a("symbol"),any:l(mn),arrayOf:function(e){return l(function(t,n,r,i,l){if("function"!=typeof e)return new o("Property `"+l+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a))return new o("Invalid "+i+" `"+l+"` of type `"+s(a)+"` supplied to `"+r+"`, expected an array.");for(var u=0;u<a.length;u++){var c=e(a,u,r,i,l+"["+u+"]",rn);if(c instanceof Error)return c}return null})},element:l(function(t,n,r,i,l){var a=t[n];return e(a)?null:new o("Invalid "+i+" `"+l+"` of type `"+s(a)+"` supplied to `"+r+"`, expected a single ReactElement.")}),elementType:l(function(e,t,n,r,i){var l=e[t];return Kt.isValidElementType(l)?null:new o("Invalid "+r+" `"+i+"` of type `"+s(l)+"` supplied to `"+n+"`, expected a single ReactElement type.")}),instanceOf:function(e){return l(function(t,n,r,i,l){var a;return t[n]instanceof e?null:new o("Invalid "+i+" `"+l+"` of type `"+((a=t[n]).constructor&&a.constructor.name?a.constructor.name:"<<anonymous>>")+"` supplied to `"+r+"`, expected instance of `"+(e.name||"<<anonymous>>")+"`.")})},node:l(function(e,t,n,r,i){return c(e[t])?null:new o("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(e){return l(function(t,n,r,i,l){if("function"!=typeof e)return new o("Property `"+l+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var a=t[n],u=s(a);if("object"!==u)return new o("Invalid "+i+" `"+l+"` of type `"+u+"` supplied to `"+r+"`, expected an object.");for(var c in a)if(on(a,c)){var d=e(a,c,r,i,l+"."+c,rn);if(d instanceof Error)return d}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&fn(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),mn;function t(t,n,r,l,a){for(var u=t[n],c=0;c<e.length;c++)if(i(u,e[c]))return null;var s=JSON.stringify(e,function(e,t){return"symbol"===d(t)?String(t):t});return new o("Invalid "+l+" `"+a+"` of value `"+String(u)+"` supplied to `"+r+"`, expected one of "+s+".")}return l(t)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&fn("Invalid argument supplied to oneOfType, expected an instance of array."),mn;for(var t=0;t<e.length;t++){var n=e[t];if("function"!=typeof n)return fn("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+f(n)+" at index "+t+"."),mn}return l(function(t,n,r,i,l){for(var a=[],u=0;u<e.length;u++){var c=(0,e[u])(t,n,r,i,l,rn);if(null==c)return null;c.data&&on(c.data,"expectedType")&&a.push(c.data.expectedType)}return new o("Invalid "+i+" `"+l+"` supplied to `"+r+"`"+(a.length>0?", expected one of type ["+a.join(", ")+"]":"")+".")})},shape:function(e){return l(function(t,n,r,i,l){var a=t[n],c=s(a);if("object"!==c)return new o("Invalid "+i+" `"+l+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");for(var f in e){var m=e[f];if("function"!=typeof m)return u(r,i,l,f,d(m));var v=m(a,f,r,i,l+"."+f,rn);if(v)return v}return null})},exact:function(e){return l(function(t,n,r,i,l){var a=t[n],c=s(a);if("object"!==c)return new o("Invalid "+i+" `"+l+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var f=nn({},t[n],e);for(var m in f){var v=e[m];if(on(e,m)&&"function"!=typeof v)return u(r,i,l,m,d(v));if(!v)return new o("Invalid "+i+" `"+l+"` key `"+m+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var p=v(a,m,r,i,l+"."+m,rn);if(p)return p}return null})}};function i(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function o(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function l(e){function t(t,n,r,i,l,a,u){if(i=i||"<<anonymous>>",a=a||r,u!==rn){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}return null==n[r]?t?new o(null===n[r]?"The "+l+" `"+a+"` is marked as required in `"+i+"`, but its value is `null`.":"The "+l+" `"+a+"` is marked as required in `"+i+"`, but its value is `undefined`."):null:e(n,r,i,l,a)}process;var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function a(e){return l(function(t,n,r,i,l,a){var u=t[n];return s(u)!==e?new o("Invalid "+i+" `"+l+"` of type `"+d(u)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null})}function u(e,t,n,r,i){return new o((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function c(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(c);if(null===t||e(t))return!0;var r=function(e){var t=e&&(n&&e[n]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(!r)return!1;var i,o=r.call(t);if(r!==t.entries){for(;!(i=o.next()).done;)if(!c(i.value))return!1}else for(;!(i=o.next()).done;){var l=i.value;if(l&&!c(l[1]))return!1}return!0;default:return!1}}function s(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function d(e){if(null==e)return""+e;var t=s(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function f(e){var t=d(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return o.prototype=Error.prototype,r.checkPropTypes=dn,r.resetWarningCache=dn.resetWarningCache,r.PropTypes=r,r}(Kt.isElement):function(){function e(e,t,n,r,i,o){if(o!==rn){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:pn,resetWarningCache:vn};return n.PropTypes=n,n}()});const hn=e=>{let{children:t}=e;return r.createElement("div",{className:"banner banner-container"},t)},En=()=>{var e;const{data:n,isLoading:o}=Digit.Hooks.useStore.getInitData(),{stateInfo:l}=n||{},{t:a}=i.useTranslation();return o?r.createElement(t.Loader,null):r.createElement("div",{className:"bannerHeader"},r.createElement("img",{className:"bannerLogo",src:null==l?void 0:l.logoUrl}),r.createElement("p",null,a("TENANT_TENANTS_"+(null==l||null===(e=l.code)||void 0===e?void 0:e.toUpperCase()))))},yn=e=>{var i,o,l;let{config:c,t:s}=e;const[d,f]=n.useState(null),{mobile_number:m,tenantId:v}=Digit.Hooks.useQueryParams(),p=a.useHistory(),[g,h]=n.useState(""),[E,y]=n.useState(!0),[_,b]=n.useState(null),C=()=>Digit.UserService.getType();n.useEffect(()=>{var e,t;if(!d)return void Digit.UserService.setType("employee");Digit.UserService.setUser(d);const n=(null===(e=location.state)||void 0===e?void 0:e.from)||"/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/employee";p.replace(n)},[d]);const O=()=>{b(null)},[S,w,N]=c.inputs,I=[{body:[{label:s(S.label),type:S.type,populators:{name:S.name},isMandatory:!0},{label:s(w.label),type:w.type,populators:{name:w.name},isMandatory:!0},{label:s(N.label),type:N.type,populators:{name:N.name},isMandatory:!0}]}];return r.createElement(hn,null,r.createElement("div",{className:"employeeBackbuttonAlign"},r.createElement(t.BackButton,{variant:"white",style:{borderBottom:"none"}})),r.createElement(u.FormComposer,{onSubmit:function(e){try{return Promise.resolve(te(function(){if(e.newPassword!==e.confirmPassword)return b(s("ERR_PASSWORD_DO_NOT_MATCH"));const t={...e,otpReference:g,tenantId:v,type:C().toUpperCase()};return Promise.resolve(Digit.UserService.changePassword(t,v)).then(function(e){(()=>{var e;p.replace("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/user/login")})()})},function(e){var t,n,r,i,o;b((null==e||null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.error)||void 0===r||null===(i=r.fields)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.message)||s("ES_SOMETHING_WRONG")),setTimeout(O,5e3)}))}catch(e){return Promise.reject(e)}},noBoxShadow:!0,inline:!0,submitInForm:!0,config:I,label:c.texts.submitButtonLabel,cardStyle:{maxWidth:"408px",margin:"auto"},className:"employeeChangePassword"},r.createElement(En,null),r.createElement(u.CardSubHeader,{style:{textAlign:"center"}}," ",c.texts.header," "),r.createElement(t.CardText,null,s("CS_LOGIN_OTP_TEXT")+" ",r.createElement("b",null," ",""+s("+ 91 - ")," ",m)),r.createElement(ue,{t:s,userType:"employee",otp:g,onOtpChange:h,error:E,onResend:function(){try{function e(){setTimeout(O,5e3)}const t={otp:{mobileNumber:m,userType:C().toUpperCase(),type:"passwordreset",tenantId:v}},n=te(function(){return Promise.resolve(Digit.UserService.sendOtp(t,v)).then(function(){b(s("ES_OTP_RESEND"))})},function(e){var t,n;b((null==e||null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.error_description)||s("ES_INVALID_LOGIN_CREDENTIALS"))});return Promise.resolve(n&&n.then?n.then(e):e())}catch(e){return Promise.reject(e)}}})),_&&r.createElement(t.Toast,{type:"error",label:s(_),onClose:O}),r.createElement("div",{className:"EmployeeLoginFooter"},r.createElement("img",{alt:"Powered by DIGIT",src:null===(i=window)||void 0===i||null===(o=i.globalConfigs)||void 0===o||null===(l=o.getConfig)||void 0===l?void 0:l.call(o,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:()=>{var e,t,n;window.open(null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_HOME_URL"),"_blank").focus()}})," "))};yn.propTypes={loginParams:gn.any},yn.defaultProps={loginParams:null};const _n=[{texts:{header:"CORE_COMMON_RESET_PASSWORD_LABEL",submitButtonLabel:"CORE_COMMON_CHANGE_PASSWORD"},inputs:[{label:"CORE_LOGIN_USERNAME",type:"text",name:"userName",error:"ERR_HRMS_INVALID_USERNAME"},{label:"CORE_LOGIN_NEW_PASSWORD",type:"password",name:"newPassword",error:"CORE_COMMON_REQUIRED_ERRMSG"},{label:"CORE_LOGIN_CONFIRM_NEW_PASSWORD",type:"password",name:"confirmPassword",error:"CORE_COMMON_REQUIRED_ERRMSG"}]}],bn=()=>{const{t:e}=i.useTranslation(),{path:t}=a.useRouteMatch(),o=n.useMemo(()=>_n.map(t=>{const n={};for(const r in t.texts)n[r]=e(t.texts[r]);return{...t,texts:n}},[_n]));return r.createElement(a.Switch,null,r.createElement(a.Route,{path:""+t,exact:!0},r.createElement(yn,{config:o[0],t:e})))},Cn=[{texts:{header:"CORE_COMMON_FORGOT_PASSWORD_LABEL",description:"ES_FORGOT_PASSWORD_DESC",submitButtonLabel:"CORE_COMMON_CONTINUE"},inputs:[{label:"CORE_COMMON_MOBILE_NUMBER",type:"text",name:"mobileNumber",error:"ERR_HRMS_INVALID_MOBILE_NUMBER"},{label:"CORE_COMMON_CITY",type:"custom",name:"city",error:"ERR_HRMS_INVALID_CITY"}]}],On=e=>{var i,o,l;let{config:c,t:s}=e;const{data:d,isLoading:f}=Digit.Hooks.useTenants(),[m,v]=n.useState(null),p=a.useHistory(),[g,h]=n.useState(null);n.useEffect(()=>{var e,t;if(!m)return void Digit.UserService.setType("employee");Digit.UserService.setUser(m);const n=(null===(e=location.state)||void 0===e?void 0:e.from)||"/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/employee";p.replace(n)},[m]);const E=()=>{h(null)},[y,_]=c.inputs,b=[{body:[{label:s(y.label),type:y.type,populators:{name:y.name,componentInFront:"+91"},isMandatory:!0},{label:s(_.label),type:_.type,populators:{name:_.name,customProps:{},component:(e,n)=>r.createElement(t.Dropdown,I({option:d,optionKey:"name",id:_.name,className:"login-city-dd",select:t=>{e.onChange(t)}},n))},isMandatory:!0}]}];return f?r.createElement(t.Loader,null):r.createElement(hn,null,r.createElement("div",{className:"employeeBackbuttonAlign"},r.createElement(t.BackLink,null)),r.createElement(u.FormComposer,{onSubmit:function(e){try{if(!e.city)return alert("Please Select City!"),Promise.resolve();const t={otp:{mobileNumber:e.mobileNumber,userType:Digit.UserService.getType().toUpperCase(),type:"passwordreset",tenantId:e.city.code}},n=te(function(){return Promise.resolve(Digit.UserService.sendOtp(t,e.city.code)).then(function(){var t;p.push("/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/employee/user/change-password?mobile_number="+e.mobileNumber+"&tenantId="+e.city.code)})},function(e){var t,n,r,i,o;h((null==e||null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.error)||void 0===r||null===(i=r.fields)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.message)||"Invalid login credentials!"),setTimeout(E,5e3)});return Promise.resolve(n&&n.then?n.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},noBoxShadow:!0,inline:!0,submitInForm:!0,config:b,label:c.texts.submitButtonLabel,secondaryActionLabel:c.texts.secondaryButtonLabel,onSecondayActionClick:()=>{var e;p.replace("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/login")},heading:c.texts.header,description:c.texts.description,headingStyle:{textAlign:"center"},cardStyle:{maxWidth:"408px",margin:"auto"},className:"employeeForgotPassword"},r.createElement(En,null)),g&&r.createElement(t.Toast,{type:"error",label:s(g),onClose:E}),r.createElement("div",{className:"EmployeeLoginFooter"},r.createElement("img",{alt:"Powered by DIGIT",src:null===(i=window)||void 0===i||null===(o=i.globalConfigs)||void 0===o||null===(l=o.getConfig)||void 0===l?void 0:l.call(o,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:()=>{var e,t,n;window.open(null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_HOME_URL"),"_blank").focus()}})," "))};On.propTypes={loginParams:gn.any},On.defaultProps={loginParams:null};const Sn=()=>{const{t:e}=i.useTranslation(),{path:t}=a.useRouteMatch(),o=n.useMemo(()=>Cn.map(t=>{const n={};for(const r in t.texts)n[r]=e(t.texts[r]);return{...t,texts:n}},[Cn]));return r.createElement(a.Switch,null,r.createElement(a.Route,{path:""+t,exact:!0},r.createElement(On,{config:o[0],t:e})))},wn=(e,t)=>t.filter(t=>{var n;return null==e||null===(n=e.map)||void 0===n?void 0:n.call(e,e=>e.code).includes(t.code)}),Nn=e=>{var t;let{stateCode:n,userType:i,modules:o,appTenants:l,additionalComponent:u}=e;Digit;const{path:c}=a.useRouteMatch(),s=a.useLocation(),d=Digit.UserService.getUser();var f;if(!d||null==d||!d.access_token||null==d||!d.info)return r.createElement(a.Redirect,{to:{pathname:"/"+(null===(f=window)||void 0===f?void 0:f.contextPath)+"/employee/user/login",state:{from:s.pathname+s.search}}});const m=o.map((e,t)=>{var o;let{code:u,tenants:s}=e;const d=Digit.ComponentRegistryService.getComponent(u+"Module");return r.createElement(a.Route,{key:t,path:c+"/"+u.toLowerCase()},d?r.createElement(d,{stateCode:n,moduleCode:u,userType:i,tenants:wn(s,l)}):r.createElement(a.Redirect,{to:"/"+(null===(o=window)||void 0===o?void 0:o.contextPath)+"/employee/user/error?type=notfound&module="+u}))});return r.createElement("div",{className:"ground-container digit-home-ground"},r.createElement(a.Switch,null,m,r.createElement(a.Route,{path:c+"/login"},r.createElement(a.Redirect,{to:{pathname:"/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/employee/user/login",state:{from:s.pathname+s.search}}})),r.createElement(a.Route,{path:c+"/forgot-password"},r.createElement(Sn,null)),r.createElement(a.Route,{path:c+"/change-password"},r.createElement(bn,null)),r.createElement(a.Route,null,r.createElement(y,{userType:i,modules:o,additionalComponent:u}))))},In={label:"English",value:Digit.Utils.getDefaultLanguage()},Dn=()=>{var e,o,l,c,s;const{data:d,isLoading:f}=Digit.Hooks.useStore.getInitData(),{t:m}=i.useTranslation(),v=a.useHistory(),{languages:p,stateInfo:g}=d||{};let h=p;h&&0!=(null===(e=h)||void 0===e?void 0:e.length)||(h=[In]);const E=Digit.StoreData.getCurrentLanguage(),[y,_]=n.useState(E);return f?r.createElement(t.Loader,null):r.createElement(hn,null,r.createElement(t.Card,{className:"bannerCard removeBottomMargin"},r.createElement("div",{className:"bannerHeader"},r.createElement("img",{className:"bannerLogo",src:null==g?void 0:g.logoUrl,alt:"Digit"}),r.createElement("p",null,m("TENANT_TENANTS_"+(null==g||null===(o=g.code)||void 0===o?void 0:o.toUpperCase())))),r.createElement("div",{className:"language-selector",style:{justifyContent:"space-around",marginBottom:"24px",padding:"0 5%"}},h.map((e,t)=>r.createElement("div",{className:"language-button-container",key:t},r.createElement(u.CustomButton,{selected:e.value===y,text:e.label,onClick:()=>(e=>{_(e.value),Digit.LocalizationService.changeLanguage(e.value,g.code)})(e)})))),r.createElement(t.SubmitBar,{style:{width:"100%"},label:m("CORE_COMMON_CONTINUE"),onSubmit:e=>{var t;v.push("/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/employee/user/login")}})),r.createElement("div",{className:"EmployeeLoginFooter"},r.createElement("img",{alt:"Powered by DIGIT",src:null===(l=window)||void 0===l||null===(c=l.globalConfigs)||void 0===c||null===(s=c.getConfig)||void 0===s?void 0:s.call(c,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:()=>{var e,t,n;window.open(null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_HOME_URL"),"_blank").focus()}})," "))},Tn=[{texts:{header:"CORE_COMMON_LOGIN",submitButtonLabel:"CORE_COMMON_CONTINUE",secondaryButtonLabel:"CORE_COMMON_FORGOT_PASSWORD"},inputs:[{label:"CORE_LOGIN_USERNAME",type:"text",key:"username",isMandatory:!0,populators:{name:"username",validation:{required:!0},error:"ERR_USERNAME_REQUIRED"}},{label:"CORE_LOGIN_PASSWORD",type:"password",key:"password",isMandatory:!0,populators:{name:"password",validation:{required:!0},error:"ERR_PASSWORD_REQUIRED"}},{isMandatory:!0,type:"dropdown",key:"city",label:"CORE_COMMON_CITY",disable:!1,populators:{name:"city",optionsKey:"name",error:"ERR_HRMS_INVALID_CITY",mdmsConfig:{masterName:"tenants",moduleName:"tenant",localePrefix:"TENANT_TENANTS",select:"(data)=>{ return Array.isArray(data['tenant'].tenants) && Digit.Utils.getUnique(data['tenant'].tenants).map(ele=>({code:ele.code,name:Digit.Utils.locale.getTransformedLocale('TENANT_TENANTS_'+ele.code)}))}"}}}]}],An=e=>{var i,o,l,u,c,s,d,f,m,v,p,g,h;let{config:E,t:y,isDisabled:_}=e;const{isLoading:b}=Digit.Hooks.useTenants(),{isLoading:C}=Digit.Hooks.useStore.getInitData(),[O,S]=n.useState(null),[w,N]=n.useState(null),[I,D]=n.useState(!1),T=a.useHistory();n.useEffect(()=>{var e,t,n,r,i,o,l,a,u,c,s,d,f,m,v,p,g,h;if(!O)return;Digit.SessionStorage.set("citizen.userRequestObject",O);const E=null==O||null===(e=O.info)||void 0===e||null===(t=e.roles)||void 0===t?void 0:t.filter(e=>e.tenantId===Digit.SessionStorage.get("Employee.tenantId"));(null==O||null===(n=O.info)||void 0===n||null===(r=n.roles)||void 0===r?void 0:r.length)>0&&(O.info.roles=E),Digit.UserService.setUser(O),((e,t)=>{var n;let r=(null===(n=JSON.parse(sessionStorage.getItem("Digit.locale")))||void 0===n?void 0:n.value)||Digit.Utils.getDefaultLanguage();localStorage.setItem("Employee.tenant-id",null==e?void 0:e.tenantId),localStorage.setItem("tenant-id",null==e?void 0:e.tenantId),localStorage.setItem("citizen.userRequestObject",JSON.stringify(e)),localStorage.setItem("locale",r),localStorage.setItem("Employee.locale",r),localStorage.setItem("token",t),localStorage.setItem("Employee.token",t),localStorage.setItem("user-info",JSON.stringify(e)),localStorage.setItem("Employee.user-info",JSON.stringify(e))})(null==O?void 0:O.info,null==O?void 0:O.access_token);let y="/"+(null===(i=window)||void 0===i?void 0:i.contextPath)+"/employee";var _,b,C,S,w,N,I;null!==(o=window)&&void 0!==o&&null!==(l=o.location)&&void 0!==l&&null!==(a=l.href)&&void 0!==a&&a.includes("from=")&&(y=decodeURIComponent(null===(_=window)||void 0===_||null===(b=_.location)||void 0===b||null===(C=b.href)||void 0===C||null===(S=C.split("from="))||void 0===S?void 0:S[1])||"/"+(null===(w=window)||void 0===w?void 0:w.contextPath)+"/employee"),null!=O&&null!==(u=O.info)&&void 0!==u&&u.roles&&(null==O||null===(c=O.info)||void 0===c||null===(s=c.roles)||void 0===s?void 0:s.length)>0&&null!=O&&null!==(d=O.info)&&void 0!==d&&null!==(f=d.roles)&&void 0!==f&&f.every(e=>"NATADMIN"===e.code)&&(y="/"+(null===(N=window)||void 0===N?void 0:N.contextPath)+"/employee/dss/landing/NURT_DASHBOARD"),null!=O&&null!==(m=O.info)&&void 0!==m&&m.roles&&(null==O||null===(v=O.info)||void 0===v||null===(p=v.roles)||void 0===p?void 0:p.length)>0&&null!=O&&null!==(g=O.info)&&void 0!==g&&null!==(h=g.roles)&&void 0!==h&&h.every(e=>"STADMIN"===e.code)&&(y="/"+(null===(I=window)||void 0===I?void 0:I.contextPath)+"/employee/dss/landing/home"),T.replace(y)},[O]);const A=()=>{N(null)},L={code:Digit.ULBService.getStateId(),name:Digit.Utils.locale.getTransformedLocale("TENANT_TENANTS_"+Digit.ULBService.getStateId())};let R=[{body:null==E?void 0:E.inputs}];const{mode:x}=Digit.Hooks.useQueryParams();return"admin"===x&&0==(null==R||null===(i=R[0])||void 0===i||null===(o=i.body)||void 0===o||null===(l=o[2])||void 0===l?void 0:l.disable)&&null==(null==R||null===(u=R[0])||void 0===u||null===(c=u.body)||void 0===c||null===(s=c[2])||void 0===s||null===(d=s.populators)||void 0===d?void 0:d.defaultValue)&&(R[0].body[2].disable=!0,R[0].body[2].isMandatory=!1,R[0].body[2].populators.defaultValue=L),b||C?r.createElement(t.Loader,null):r.createElement(hn,null,r.createElement("div",{className:"employeeBackbuttonAlign"},r.createElement(t.BackLink,null)),r.createElement(t.FormComposerV2,{onSubmit:function(e){try{var t;function n(){D(!1)}D(!0);const r={...e,userType:"EMPLOYEE"};r.tenantId=(null==e||null===(t=e.city)||void 0===t?void 0:t.code)||Digit.ULBService.getStateId(),delete r.city;const i=te(function(){return Promise.resolve(Digit.UserService.authenticate(r)).then(function(e){let{UserRequest:t,...n}=e;Digit.SessionStorage.set("Employee.tenantId",null==t?void 0:t.tenantId),S({info:t,...n})})},function(e){var t,n;N((null==e||null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.error_description)||"ES_ERROR_USER_NOT_PERMITTED"==(null==e?void 0:e.message)&&y("ES_ERROR_USER_NOT_PERMITTED")||y("INVALID_LOGIN_CREDENTIALS")),setTimeout(A,5e3)});return Promise.resolve(i&&i.then?i.then(n):n())}catch(e){return Promise.reject(e)}},isDisabled:_||I,noBoxShadow:!0,inline:!0,submitInForm:!0,config:R,label:null==E||null===(f=E.texts)||void 0===f?void 0:f.submitButtonLabel,secondaryActionLabel:null==E||null===(m=E.texts)||void 0===m?void 0:m.secondaryButtonLabel,onSecondayActionClick:()=>{var e;T.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/user/forgot-password")},onFormValueChange:(e,t,n)=>{const r=R[0].body.map(e=>e.key).some(e=>{const n=t[e];return null==n||""===n||"check"===e&&!1===n||"captcha"===e&&!1===n});D(r)},heading:null==E||null===(v=E.texts)||void 0===v?void 0:v.header,className:"loginFormStyleEmployee",cardSubHeaderClassName:"loginCardSubHeaderClassName",cardClassName:"loginCardClassName",buttonClassName:"buttonClassName"},r.createElement(En,null)),w&&r.createElement(t.Toast,{type:"error",label:y(w),onClose:A}),r.createElement("div",{className:"employee-login-home-footer",style:{backgroundColor:"unset"}},r.createElement("img",{alt:"Powered by DIGIT",src:null===(p=window)||void 0===p||null===(g=p.globalConfigs)||void 0===g||null===(h=g.getConfig)||void 0===h?void 0:h.call(g,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:()=>{var e,t,n;window.open(null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_HOME_URL"),"_blank").focus()}})," "))};An.propTypes={loginParams:gn.any},An.defaultProps={loginParams:null};const Ln=()=>{const{t:e}=i.useTranslation(),{path:t}=a.useRouteMatch(),[o,l]=n.useState(Tn),{data:u,isLoading:c}=Digit.Hooks.useCommonMDMS(Digit.ULBService.getStateId(),"commonUiConfig",["LoginConfig"],{select:e=>{var t;return{config:null==e||null===(t=e.commonUiConfig)||void 0===t?void 0:t.LoginConfig}},retry:!1});n.useEffect(()=>{l(0==c&&null!=u&&u.config?null==u?void 0:u.config:Tn)},[u,c]);const s=n.useMemo(()=>o.map(t=>{const n={};for(const r in t.texts)n[r]=e(t.texts[r]);return{...t,texts:n}},[o]));return r.createElement(a.Switch,null,r.createElement(a.Route,{path:""+t,exact:!0},r.createElement(An,{config:s[0],t:e})))},Rn=["user/profile","user/error"],xn=e=>{var o,l,u,c,s,d;let{stateInfo:f,userDetails:v,CITIZEN:g,cityDetails:h,mobileView:E,handleUserDropdownSelection:y,logoUrl:_,DSO:b,stateCode:C,modules:O,appTenants:S,initData:w}=e;const N=a.useHistory(),{t:I}=i.useTranslation(),{path:D}=a.useRouteMatch(),T=a.useLocation(),A=null==T||null===(o=T.pathname)||void 0===o?void 0:o.includes("language-selection"),L=Rn.some(e=>{var t;return null==T||null===(t=T.pathname)||void 0===t?void 0:t.includes(e)});n.useEffect(()=>{Digit.UserService.setType("employee")},[]);const R=null==w||null===(l=w.modules)||void 0===l||null===(u=l.filter(e=>null==e?void 0:e.additionalComponent))||void 0===u?void 0:u.map(e=>null==e?void 0:e.additionalComponent);return r.createElement("div",{className:"employee"},r.createElement(a.Switch,null,r.createElement(a.Route,{path:D+"/user"},L&&r.createElement(H,{t:I,stateInfo:f,userDetails:v,CITIZEN:g,cityDetails:h,mobileView:E,handleUserDropdownSelection:y,logoUrl:_,showSidebar:!!L,showLanguageChange:!A}),r.createElement("div",{className:L?"grounded-container":"loginContainer",style:L?{padding:0,paddingTop:"80px",marginLeft:E?"":"64px"}:{"--banner-url":"url("+(null==f?void 0:f.bannerUrl)+")",padding:"0px"}},r.createElement(a.Switch,null,r.createElement(a.Route,{path:D+"/user/login"},r.createElement(Ln,null)),r.createElement(a.Route,{path:D+"/user/forgot-password"},r.createElement(Sn,null)),r.createElement(a.Route,{path:D+"/user/change-password"},r.createElement(bn,null)),r.createElement(t.PrivateRoute,{path:D+"/user/profile"},r.createElement(re,{stateCode:C,userType:"employee",cityDetails:h})),r.createElement(a.Route,{path:D+"/user/error"},r.createElement(m,{initData:w,goToHome:()=>{var e,t,n,r;N.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/"+(null===(t=Digit)||void 0===t||null===(n=t.UserService)||void 0===n||null===(r=n.getType)||void 0===r?void 0:r.call(n)))}})),r.createElement(a.Route,{path:D+"/user/language-selection"},r.createElement(Dn,null)),r.createElement(a.Route,null,r.createElement(a.Redirect,{to:D+"/user/language-selection"}))))),r.createElement(a.Route,null,r.createElement(H,{t:I,stateInfo:f,userDetails:v,CITIZEN:g,cityDetails:h,mobileView:E,handleUserDropdownSelection:y,logoUrl:_,modules:O}),r.createElement("div",{className:"main "+(b?"m-auto":"")+" digit-home-main"},r.createElement("div",{className:"employee-app-wrapper digit-home-app-wrapper"},r.createElement(p,{initData:w},r.createElement(Nn,{stateCode:C,userType:"employee",modules:O,appTenants:S,additionalComponent:R}))),r.createElement("div",{className:"employee-home-footer"},r.createElement("img",{alt:"Powered by DIGIT",src:null===(c=window)||void 0===c||null===(s=c.globalConfigs)||void 0===s||null===(d=s.getConfig)||void 0===d?void 0:d.call(s,"DIGIT_FOOTER"),style:{height:"1.1em",cursor:"pointer"},onClick:()=>{var e,t,n;window.open(null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_HOME_URL"),"_blank").focus()}})))),r.createElement(a.Route,null,r.createElement(a.Redirect,{to:D+"/user/language-selection"}))))},Pn=e=>{var t,i,o,l;let{stateCode:u,modules:c,appTenants:s,logoUrl:d,initData:f,defaultLanding:m="citizen"}=e;const v=a.useHistory(),{pathname:p}=a.useLocation(),g=window.innerWidth,h=Digit.ULBService.getCurrentUlb(),E=Digit.UserService.getUser(),{data:y}=Digit.Hooks.useStore.getInitData(),{stateInfo:_}=y||{},b=Digit.UserService.hasAccess(["FSM_DSO"]);let C="CITIZEN"===(null==E||null===(t=E.info)||void 0===t?void 0:t.type)||!window.location.pathname.split("/").includes("employee");window.location.pathname.split("/").includes("employee")&&(C=!1),n.useEffect(()=>{var e,t,n;null!=p&&p.includes("application-details")||(null!=p&&p.includes("inbox")||Digit.SessionStorage.del("fsm/inbox/searchParams"),null!=p&&p.includes("search")&&Digit.SessionStorage.del("fsm/search/searchParams")),null!=p&&p.includes("dss")||Digit.SessionStorage.del("DSS_FILTERS"),(null==p?void 0:p.toString())==="/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee"&&(Digit.SessionStorage.del("SEARCH_APPLICATION_DETAIL"),Digit.SessionStorage.del("WS_EDIT_APPLICATION_DETAILS")),(null==p?void 0:p.toString())!=="/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/citizen"&&(null==p?void 0:p.toString())!=="/"+(null===(n=window)||void 0===n?void 0:n.contextPath)+"/employee"||Digit.SessionStorage.del("WS_DISCONNECTION")},[p]),v.listen(()=>{var e;null===(e=window)||void 0===e||e.scrollTo({top:0,left:0,behavior:"smooth"})});const O={stateInfo:_,userDetails:E,CITIZEN:C,cityDetails:h,mobileView:g<=640,handleUserDropdownSelection:e=>{e.func()},logoUrl:d,DSO:b,stateCode:u,modules:c,appTenants:s,sourceUrl:window.location.origin+"/citizen",pathname:p,initData:f};return r.createElement(a.Switch,null,r.createElement(a.Route,{path:"/"+(null===(i=window)||void 0===i?void 0:i.contextPath)+"/employee"},r.createElement(xn,O)),r.createElement(a.Route,{path:"/"+(null===(o=window)||void 0===o?void 0:o.contextPath)+"/citizen"},r.createElement(It,O)),r.createElement(a.Route,null,r.createElement(a.Redirect,{to:"/"+(null===(l=window)||void 0===l?void 0:l.contextPath)+"/"+m})))},Mn=[d],kn=("object"==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({}):s.compose)(s.applyMiddleware(...Mn)),Un=e=>{var o,l,a,u,c,s,d,f,m,v;let{onSelect:p,...g}=e;const{t:h}=i.useTranslation(),E=Digit.ULBService.getCurrentTenantId(),[y,_]=n.useState(!1),[b,C]=n.useState(!1),{data:O}=Digit.Hooks.useCustomMDMS(E,"commonUiConfig",[{name:"PrivacyPolicy"}]);return n.useEffect(()=>{p("check",y)},[y]),r.createElement(r.Fragment,null,r.createElement("div",{className:"digit-privacy-checkbox"},r.createElement(t.CheckBox,{label:h("ES_BY_CLICKING"),checked:y,onChange:e=>{_(e.target.checked)}}),r.createElement(t.Button,{label:h("ES_PRIVACY_POLICY"),variation:"link",size:"medium",onClick:()=>{C(!0)},style:{marginBottom:"1.18rem",paddingLeft:"unset"}})),b&&r.createElement(t.PopUp,{type:"default",className:"privacy-popUpClass",footerclassName:"popUpFooter",heading:h(null==O||null===(o=O.commonUiConfig)||void 0===o||null===(l=o.PrivacyPolicy)||void 0===l||null===(a=l[0])||void 0===a||null===(u=a.texts)||void 0===u||null===(c=u[0])||void 0===c?void 0:c.header),onOverlayClick:()=>{C(!1)},footerChildren:[r.createElement(t.Button,{type:"button",size:"large",variation:"secondary",label:h("DIGIT_I_DO_NOT_ACCEPT"),onClick:()=>{_(!1),C(!1)}}),r.createElement(t.Button,{type:"button",size:"large",variation:"primary",label:h("DIGIT_I_ACCEPT"),className:"accept-class",onClick:()=>{_(!0),C(!1)}})],sortFooterChildren:!0,onClose:()=>{C(!1)}},null==O||null===(s=O.commonUiConfig)||void 0===s||null===(d=s.PrivacyPolicy)||void 0===d||null===(f=d[0])||void 0===f||null===(m=f.texts)||void 0===m||null===(v=m[0])||void 0===v?void 0:v.descriptions.map((e,t)=>r.createElement("div",{key:t,style:{fontWeight:e.isBold?700:400}},h(e.text)))))},Bn=e=>{var n;let{stateCode:o,enabledModules:u,moduleReducers:c,defaultLanding:d}=e;const{isLoading:f,data:m={}}=Digit.Hooks.useInitStore(o,u);if(f)return r.createElement(t.Loader,{page:!0});const v=function(e,t){return void 0===t&&(t={}),s.createStore(((e,t)=>{return s.combineReducers({common:(n=e,function(e,t){switch(void 0===e&&(e=n),t.type){case"LANGUAGE_SELECT":return{...e,selectedLanguage:t.payload};default:return e}}),...t});var n})(e,t),kn)}(m,c(m))||{};return i.getI18n(),Digit.ComponentRegistryService.getComponent("PrivacyComponent")||Digit.ComponentRegistryService.setComponent("PrivacyComponent",Un),r.createElement(l.Provider,{store:v},r.createElement(a.BrowserRouter,null,r.createElement(t.BodyContainer,null,r.createElement(Pn,{initData:m,stateCode:o,modules:null==m?void 0:m.modules,appTenants:m.tenants,logoUrl:null==m||null===(n=m.stateInfo)||void 0===n?void 0:n.logoUrl,defaultLanding:d}))))},jn={SelectOtp:ue,ChangeCity:b,ChangeLanguage:C,PrivacyComponent:Un};exports.DigitUI=e=>{let{stateCode:t,registry:i,enabledModules:l,moduleReducers:a,defaultLanding:u}=e;const[c,s]=n.useState(Digit.Utils.getPrivacyObject()||{}),d=(Digit.UserService.getType(),new o.QueryClient({defaultOptions:{queries:{staleTime:9e5,cacheTime:3e6,retry:!1,retryDelay:e=>Infinity}}})),f=Digit.Contexts.ComponentProvider,m=Digit.Contexts.PrivacyProvider;return Digit.UserService.hasAccess(["FSM_DSO"]),r.createElement("div",null,r.createElement(p,null,r.createElement(o.QueryClientProvider,{client:d},r.createElement(f.Provider,{value:i},r.createElement(m.Provider,{value:{privacy:null==c?void 0:c[window.location.pathname],resetPrivacy:e=>{Digit.Utils.setPrivacyObject({}),s({})},getPrivacy:()=>{const e=Digit.Utils.getPrivacyObject();return s(e),e},updatePrivacyDescoped:e=>{const t=Digit.Utils.getAllPrivacyObject(),n={...t,[window.location.pathname]:e};Digit.Utils.setPrivacyObject({...n}),s((null==t?void 0:t[window.location.pathname])||{})},updatePrivacy:(e,t)=>{s(Digit.Utils.updatePrivacy(e,t)||{})}}},r.createElement(Bn,{stateCode:t,enabledModules:l,moduleReducers:a,defaultLanding:u}))))))},exports.initCoreComponents=()=>{Object.entries(jn).forEach(e=>{let[t,n]=e;Digit.ComponentRegistryService.setComponent(t,n)})};
|
|
1
|
+
function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=require("@egovernments/digit-ui-components"),n=require("react"),r=e(n),i=require("react-i18next"),o=require("react-query"),l=require("react-redux"),a=require("react-router-dom"),u=require("@egovernments/digit-ui-react-components"),c=e(require("react-tooltip")),s=require("redux"),d=e(require("redux-thunk"));const f={error:{imgUrl:"https://s3.ap-south-1.amazonaws.com/egov-qa-assets/error-image.png",infoMessage:"CORE_SOMETHING_WENT_WRONG",buttonInfo:"ACTION_TEST_HOME"},maintenance:{imgUrl:"https://s3.ap-south-1.amazonaws.com/egov-qa-assets/maintainence-image.png",infoMessage:"CORE_UNDER_MAINTENANCE",buttonInfo:"ACTION_TEST_HOME"},notfound:{imgUrl:"https://s3.ap-south-1.amazonaws.com/egov-qa-assets/PageNotFound.png",infoMessage:"MODULE_NOT_FOUND",buttonInfo:"ACTION_TEST_HOME"}},m=e=>{const{type:t="error"}=Digit.Hooks.useQueryParams(),n=f[t],{t:o}=i.useTranslation();return r.createElement("div",{className:"error-boundary"},r.createElement("div",{className:"error-container"},r.createElement("img",{src:n.imgUrl,alt:"error"}),r.createElement("h1",null,o(n.infoMessage)),r.createElement("button",{onClick:()=>{e.goToHome()}},o(n.buttonInfo))))},v=()=>{var e,t;const n="employee"===Digit.UserService.getType()?"/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/user/error":"/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/citizen/error";return window.location.href.includes("employee/user/error")||window.location.href.includes("citizen/error")||"development"===process.env.NODE_ENV||(window.location.href=n),r.createElement("span",null)};class p extends r.Component{constructor(e){super(e),this.state={error:null,errorStack:null,hasError:!1}}static getDerivedStateFromError(e){return{error:null==e?void 0:e.message,hasError:!0,errorStack:null==e?void 0:e.stack}}componentDidCatch(e,t){this.setState({error:null==e?void 0:e.message,hasError:!0,errorStack:null==e?void 0:e.stack})}render(){return this.state.hasError?r.createElement("div",{className:"error-boundary"},r.createElement(v,null),r.createElement(m,{initData:this.props.initData})):this.props.children}}const g=(e,t,n)=>{const r=null==e?void 0:e[""+t];r&&r.map(e=>{e.link=e.navigationURL,e.i18nKey=n(e.name)});const i={links:null==r?void 0:r.reverse(),header:Digit.Utils.locale.getTransformedLocale("ACTION_TEST_"+t),iconName:"CITIZEN_"+t+"_ICON"};var o;return"FSM"===t&&[{role:"FSM_DSO",from:"/"+(null===(o=window)||void 0===o?void 0:o.contextPath)+"/citizen/fsm/dso-dashboard",dashoardLink:"CS_LINK_DSO_DASHBOARD",loginLink:"CS_LINK_LOGIN_DSO"}].map(e=>{var t,r,o;let{role:l,from:a,loginLink:u,dashoardLink:c}=e;Digit.UserService.hasAccess(l)?null==i||null===(t=i.links)||void 0===t||t.push({link:a,i18nKey:n(c)}):null==i||null===(r=i.links)||void 0===r||r.push({link:"/"+(null===(o=window)||void 0===o?void 0:o.contextPath)+"/citizen/login",state:{role:"FSM_DSO",from:a},i18nKey:n(u)})}),i},h=e=>{let{modules:n,getCitizenMenu:o,fetchedCitizen:l,isLoading:a}=e;const u=[n.filter(e=>{let{code:t}=e;return"Payment"===t})[0],...n.filter(e=>{let{code:t}=e;return"Payment"!==t})],{t:c}=i.useTranslation();return a?r.createElement(t.Loader,null):r.createElement(r.Fragment,null,r.createElement("div",{className:"citizen-all-services-wrapper"},location.pathname.includes("sanitation-ui/citizen/all-services")?null:r.createElement(t.BackButton,null),r.createElement("div",{className:"citizenAllServiceGrid"},u.filter(e=>e).map((e,n)=>{var i,a;let u,{code:s}=e;var d,f,m,v;return l&&(u=l?g(o,s,c):void 0),(null===(i=u)||void 0===i||null===(a=i.links)||void 0===a?void 0:a.length)>0?r.createElement(t.CitizenHomeCard,{header:c(null===(d=u)||void 0===d?void 0:d.header),links:null===(f=u)||void 0===f||null===(m=f.links)||void 0===m||null===(v=m.filter(e=>null==e?void 0:e.link))||void 0===v?void 0:v.sort((e,t)=>(null==e?void 0:e.orderNumber)-(null==t?void 0:t.orderNumber)),Icon:()=>(e=>{switch(e){case"PT":return r.createElement(PTIcon,{className:"fill-path-primary-main"});case"WS":return r.createElement(WSICon,{className:"fill-path-primary-main"});case"FSM":return r.createElement(t.FSMIcon,{className:"fill-path-primary-main"});case"MCollect":return r.createElement(t.MCollectIcon,{className:"fill-path-primary-main"});case"PGR":return r.createElement(PGRIcon,{className:"fill-path-primary-main"});case"TL":return r.createElement(TLIcon,{className:"fill-path-primary-main"});case"OBPS":return r.createElement(OBPSIcon,{className:"fill-path-primary-main"});case"Bills":return r.createElement(t.BillsIcon,{className:"fill-path-primary-main"});default:return r.createElement(PTIcon,{className:"fill-path-primary-main"})}})(s),Info:"OBPS"===s?()=>r.createElement(t.CitizenInfoLabel,{style:{margin:"0px",padding:"10px"},info:c("CS_FILE_APPLICATION_INFO_LABEL"),text:c("BPA_CITIZEN_HOME_STAKEHOLDER_INCLUDES_INFO_LABEL")}):null,isInfo:"OBPS"===s}):r.createElement(r.Fragment,null)}))))},E=e=>{let{modules:t,additionalComponent:i}=e;return r.createElement(n.Fragment,null,r.createElement("div",{className:"employee-app-container digit-home-employee-app"},r.createElement("div",{className:"ground-container moduleCardWrapper gridModuleWrapper digit-home-moduleCardWrapper"},t.map((e,t)=>{let{code:n}=e;const i=Digit.ComponentRegistryService.getComponent(n+"Card")||(()=>r.createElement(r.Fragment,null));return r.createElement(i,{key:t})}))),i&&(null==i?void 0:i.length)>0&&i.map(e=>{const t="string"==typeof e?Digit.ComponentRegistryService.getComponent(e):null;return t?r.createElement("div",{className:"additional-component-wrapper"},r.createElement(t,null)):null}))},y=e=>{let{userType:t,modules:n,getCitizenMenu:i,fetchedCitizen:o,isLoading:l,additionalComponent:a}=e;return"citizen"===t?r.createElement(h,{modules:n,getCitizenMenu:i,fetchedCitizen:o,isLoading:l}):r.createElement(E,{modules:n,additionalComponent:a})},_=function(e,t,n){if(void 0===e&&(e=""),void 0===t&&(t=""),void 0===n&&(n=""),""==t)return e;for(;null!==(r=e)&&void 0!==r&&r.includes(t);){var r,i;e=null===(i=e)||void 0===i?void 0:i.replace(t,n)}return e},b=e=>{var i;const[o,l]=n.useState(null),[u,c]=n.useState([]),[s,d]=n.useState([]),f=a.useHistory();let m=[];return n.useEffect(()=>{var e,t;const n=Digit.SessionStorage.get("citizen.userRequestObject");let r=[],i=[];null==n||null===(e=n.info)||void 0===e||null===(t=e.roles)||void 0===t||t.forEach(e=>r.push(e.tenantId));let o=r.filter((e,t,n)=>n.indexOf(e)===t);null==o||o.forEach(e=>{var t;i.push({label:"TENANT_TENANTS_"+(null===(t=_(e,".","_"))||void 0===t?void 0:t.toUpperCase()),value:e})}),m=null==i?void 0:i.filter(e=>e.value==Digit.SessionStorage.get("Employee.tenantId")),c(i)},[o]),r.createElement("div",{style:null!=e&&e.mobileView?{color:"#767676"}:{}},r.createElement(t.Dropdown,{t:null==e?void 0:e.t,option:u,selected:u.find(e=>e.value===(null==o?void 0:o.value)),optionKey:"label",select:e=>{var t,n,r,i;const o=Digit.SessionStorage.get("citizen.userRequestObject"),a=null===(t=Digit.SessionStorage.get("citizen.userRequestObject"))||void 0===t||null===(n=t.info)||void 0===n||null===(r=n.roles)||void 0===r?void 0:r.filter(t=>t.tenantId===e.value);if((null==a?void 0:a.length)>0&&(o.info.roles=a,o.info.tenantId=null==e?void 0:e.value),Digit.SessionStorage.set("Employee.tenantId",null==e?void 0:e.value),Digit.UserService.setUser(o),l(e),window.location.href.includes("/"+(null===(i=window)||void 0===i?void 0:i.contextPath)+"/employee/")){var u,c;const e=(null===(u=location.state)||void 0===u?void 0:u.from)||"/"+(null===(c=window)||void 0===c?void 0:c.contextPath)+"/employee";f.replace(e)}window.location.reload()},freeze:!0,customSelector:r.createElement("label",{className:"cp"},null==e?void 0:e.t("TENANT_TENANTS_"+(null===(i=_(Digit.SessionStorage.get("Employee.tenantId"),".","_"))||void 0===i?void 0:i.toUpperCase())))}))},C=e=>{const i=e.dropdown||!1,{data:o,isLoading:l}=Digit.Hooks.useStore.getInitData(),{languages:a,stateInfo:u}=o||{},c=Digit.StoreData.getCurrentLanguage(),[s,d]=n.useState(c),f=e=>{d(e.value),Digit.LocalizationService.changeLanguage(e.value,u.code)};return l?null:i?r.createElement("div",null,r.createElement(t.Dropdown,{className:"language-dropdown",option:a,selected:a.find(e=>e.value===c),optionKey:"label",select:f,freeze:!0,customSelector:r.createElement("label",{className:"cp"},a.find(e=>e.value===s).label)})):r.createElement(r.Fragment,null,r.createElement("div",{style:{marginBottom:"5px"}},"Language"),r.createElement("div",{className:"language-selector"},a.map((e,n)=>r.createElement("div",{className:"language-button-container",key:n},r.createElement(t.Button,{label:e.label,onClick:()=>f(e),variation:e.value===s?"primary":""})))))},O=e=>{var t,n;return r.createElement("span",{className:"user-img-txt",onClick:e.toggleMenu,title:e.name},null==e||null===(t=e.name)||void 0===t||null===(n=t[0])||void 0===n?void 0:n.toUpperCase())},S=e=>{var n,i,o,l,c,s,d,f;let{t:m,stateInfo:v,toggleSidebar:p,isSidebarOpen:g,handleLogout:h,userDetails:E,CITIZEN:y,cityDetails:_,mobileView:S,userOptions:w,handleUserDropdownSelection:N,logoUrl:I,showLanguageChange:D=!0}=e;const[T,A]=r.useState(null);r.useEffect(function(){try{var e;const t=Digit.ULBService.getCurrentTenantId(),n=null==E||null===(e=E.info)||void 0===e?void 0:e.uuid,r=function(){if(n)return Promise.resolve(Digit.UserService.userSearch(t,{uuid:[n]},{})).then(function(e){if(e&&e.user&&e.user.length){var t;const n=e.user[0],r=null==n||null===(t=n.photo)||void 0===t?void 0:t.split(",");A(null==r?void 0:r.at(0))}})}();return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},[null!==T,null==E||null===(n=E.info)||void 0===n?void 0:n.uuid]);const L=Digit.ULBService.getCitizenCurrentTenant(!0);let R=a.useHistory();const{pathname:x}=a.useLocation(),{data:{unreadCount:P}={},isSuccess:M}=Digit.Hooks.useNotificationCount({tenantId:L,config:{enabled:"EMPLOYEE"!==(null===(k=Digit.UserService)||void 0===k||null===(U=k.getUser())||void 0===U||null===(B=U.info)||void 0===B?void 0:B.type)&&"CITIZEN"===(null===(j=Digit.UserService)||void 0===j||null===(F=j.getUser())||void 0===F||null===(V=F.info)||void 0===V?void 0:V.type)&&!!L}});var k,U,B,j,F,V;if(y)return r.createElement("div",null,r.createElement(u.TopBar,{img:null==v?void 0:v.logoUrlWhite,isMobile:!0,toggleSidebar:()=>{Digit.clikOusideFired?Digit.clikOusideFired=!1:p(!0)},logoUrl:null==v?void 0:v.logoUrlWhite,onLogout:h,userDetails:E,notificationCount:P<99?P:99,notificationCountLoaded:M,cityOfCitizenShownBesideLogo:m(L),onNotificationIconClick:function(){var e;R.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/citizen/engagement/notifications")},hideNotificationIconOnSomeUrlsWhenNotLoggedIn:(e=>{var t,n,r,i;return(null===(t=Digit.UserService)||void 0===t||null===(n=t.getUser())||void 0===n||!n.access_token)&&["/"+(null===(r=window)||void 0===r?void 0:r.contextPath)+"/citizen/select-language","/"+(null===(i=window)||void 0===i?void 0:i.contextPath)+"/citizen/select-location"].includes(e)})(x),changeLanguage:S?null:r.createElement(C,{dropdown:!0})}));const z=!(null==E||!E.access_token),W=null===(i=Digit.ComponentRegistryService)||void 0===i?void 0:i.getComponent("CustomEmployeeTopBar");return W?r.createElement(W,{t:m,stateInfo:v,toggleSidebar:p,isSidebarOpen:g,handleLogout:h,userDetails:E,CITIZEN:y,cityDetails:_,mobileView:S,userOptions:w,handleUserDropdownSelection:N,logoUrl:I,showLanguageChange:D,loggedin:z}):r.createElement("div",{className:"topbar"},r.createElement("div",{className:"digit-hamburger-class"},r.createElement(u.Hamburger,{handleClick:p,color:"#9E9E9E"})),r.createElement("img",{className:"city",src:z?null==_?void 0:_.logoId:null==v?void 0:v.statelogo}),r.createElement("span",{className:"digit-topbar-container"},z&&(null!=_&&null!==(o=_.city)&&void 0!==o&&o.ulbGrade?r.createElement("p",{className:"ulb"},m(null==_?void 0:_.i18nKey).toUpperCase()," ",m("ULBGRADE_"+(null==_||null===(l=_.city)||void 0===l?void 0:l.ulbGrade.toUpperCase().replace(" ","_").replace(".","_"))).toUpperCase()):r.createElement("img",{className:"state",src:I})),!z&&r.createElement("p",{className:"ulb"},m("MYCITY_"+(null==v||null===(c=v.code)||void 0===c?void 0:c.toUpperCase())+"_LABEL")," ",m("MYCITY_STATECODE_LABEL")),r.createElement("div",{className:S?"right":"flex-right right w-80 column-gap-15",style:z?{}:{width:"80%"}},r.createElement("div",{className:"left"},!window.location.href.includes("employee/user/login")&&!window.location.href.includes("employee/user/language-selection")&&r.createElement(b,{dropdown:!0,t:m})),r.createElement("div",{className:"left"},D&&r.createElement(C,{dropdown:!0})),(null==E?void 0:E.access_token)&&r.createElement("div",{className:"left"},r.createElement(t.Dropdown,{option:w,optionKey:"name",select:N,showArrow:!0,freeze:!0,style:{},optionCardStyles:{overflow:"revert",display:"table"},topbarOptionsClassName:"topbarOptionsClassName",customSelector:null==T?r.createElement(O,{name:(null==E||null===(s=E.info)||void 0===s?void 0:s.name)||(null==E||null===(d=E.info)||void 0===d||null===(f=d.userInfo)||void 0===f?void 0:f.name)||"Employee"}):r.createElement("img",{src:T,style:{height:"48px",width:"48px",borderRadius:"50%"}}),showIcon:!0})),r.createElement("img",{className:"state",src:I}))))},w=(e,n,i,o)=>{var l,a;return[{type:"link",element:"HOME",text:e("COMMON_BOTTOM_NAVIGATION_HOME"),link:o?"/"+(null===(l=window)||void 0===l?void 0:l.contextPath)+"/employee":"/"+(null===(a=window)||void 0===a?void 0:a.contextPath)+"/citizen",icon:"HomeIcon",populators:{onClick:n}},{type:"component",element:"LANGUAGE",action:r.createElement(C,null),icon:"LanguageIcon"},{id:"login-btn",element:"LOGIN",text:e("CORE_COMMON_LOGIN"),icon:r.createElement(t.LogoutIcon,{className:"icon"}),populators:{onClick:i}}]},N="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAO4AAADUCAMAAACs0e/bAAAAM1BMVEXK0eL////Dy97GzuD4+fvL0uPg5O7T2efb4OvR1+Xr7vTk5/Df4+37/P3v8fbO1eTt8PUsnq5FAAAGqElEQVR4nO2d25ajIBBFCajgvf//a0eMyZgEjcI5xgt7Hmatme507UaxuJXidiDqjmSgeVIMlB1ZR1WZAf2gbdu0QwixSYzjOJPmHurfEGEfY9XzjNGG9whQCeVAuv5xQEySLtR9hPuIcwj0EeroN5m3D1IbsbgHK0esiQ9MKsqXVr8Hm/a/Pulk6wihpCIXBw3dh7bTvRBt9+dC5NfS1VH3xETdM3MxXRN1T0zUPTNR98xcS1dlV9NNfx3DhkTdM6PKqHteVBF1z0vU5f0sKdpc2zWLKutXrjJjdLvpesRmukqYonauPhXpdsLb6CppmpnltsYIuY2yavi6Mi2/rzAWm1zUfF0limVLqkZyA+mDYevKBS37aGC+L1lX5e7uyU1Cv565uiua9k5LFqbqqrnu2I3m+jJ11ZoLeRtfmdB0Uw/ZDsP0VTxdn7a1VERfmq7XlXyn5D2QWLoq8bZlPoBJumphJjVBw/Ll6CoTZGsTDs4NrGqKbqBth8ZHJUi6cn168QmleSm6GmB7Kxm+6obXlf7PoDHosCwM3QpiS2legi6ocSl3L0G3BdneDDgwQdENfeY+SfDJBkF37ZB+GvwzA6/rMaafAn8143VhPZWdjMWG1oHXhdnemgPoAvLlB/iZyRTfVeF06wPoQhJmlm4bdcOAZRlRN5gcPc5SoPEQR1fDdbOo6wn+uYvXxY0QCLom6gYROKH+Aj5nvphuFXWDiLpRdxl/19LFT95k6CHCrnW7pCDqBn1i1PUFvii2c11oZOJ6usWeH0RRNzC4Zs+6FTi2nevCVwCjbugnXklX5fkfTldL8PEilUB1kfNyN1u9MME2sATr4lbuB7AjfLAuvsRm1A0g6gYRdcPAjvBlje2Z8brI8OC68AcRdlCkwLohx2mcZMjw9q+LzarQurjtnwPYAydX08WecECO/u6Ad0GBdYG7jO5gB4Ap+PwKcA9ZT43dn4/W9TyiPAn4OAJaF7h3uwe8StSCddFdM3jqFa2LvnnB5zzhuuBBAjY4gi50cg694gnXhTYvfMdrjtcFZhrwE9r41gUem8IXWMC3LrBzxh+a0gRd1N1LOK7M0IUUGuggvEmHoStA2/MJh7MpupiDU4TzjhxdzLAoO4ouZvqVURbFMHQlZD6SUeWHoguZsSLUGegrehA+FZFowPdUWTi6iMoZlIpGGUUXkDbjj/9ZOLqAQS/+GIKl5BQOCn/ycqpzkXSDm5dU7ZWkG7wUyGlcmm7g5Ux56AqirgoaJ7BeokPTDbp9CbVunjFxPrl7+HqnkrSq1Da7JX20f3dV8yJi6voO81mX8vV0mx3qUsZCPRfTlVRdz2EvdufYGDvNQvvwqHtmXd+a1ITinwNcXc+lT6JuzdT1XDyBn/x7wtX1HCQQdW9MXc8xArGrirowfLeUEbMqqq6f7TF1lfRdOuGNiGi6SpT+WxY06xUfNN2wBfyE9I4tlm7w5hvOPDNJN3yNiLMipji6gE3chKhouoCtN5x3QlF0EZt8OW/8ougitqJQlk1aii7iFC9l0MvRReyao7xNjKML2Z/PuHlzhi5mFxljiZeiC9rPTEisNEMX9KYAwo5Xhi7qaA3hamboYm7dG+NVrXhdaYDv5zFaQZsYrCtbbAGnjkQDX2+J1FXCwOsqWOpKoIQNTFdqYBWydxqNqUoG0pVpCS+H8kaJaGKErlIaXj7CRRE+gRWuKwW9YZ80oVOUgbpdT0zpnSZJTIiwCtJVelvXntr4P5j6BWfPb5Wcx84C4cq3hb11lco2u2Mdwp6XdJ/Ne3wb8DWdfiRenZaXrhLwOj4e+GQeHroy3YOspS7TlU28Wle2m2QUS0mqdcbrdNW+ZHsSsyK7tBfm0q/dWcv+Z3mytVx3t7KWulqUe6ilunu8jF8pFwgv1FXp3mUt35OtRbr7eM4u4Gs6vUBXgeuHc5kfE/cbvWZtkROLm1DMtLCy80tzsu2PRj0hTI8fvrQuvsjlJkyutszq+m423wHaLTyniy/XuiGZ84LuT+m5ZfNfRxyGs7LXZOvia7VujatUwVTrIt+Q/Csc7Tuhe+BOakT10b4TuoiiJjvgU9emTO42PwEfBa+cuodKkuf42DXr1D3JpXz73Hnn0j10evHKe+nufgfUm+7B84sX9FfdEzXux2DBpWuKokkCqN/5pa/8pmvnL+RGKCddCGmatiPyPB/+ekO/M/q/7uvbt22kTt3zEnXPzCV13T3Gel4/6NduDu66xRvlPNkM1RjjxUdv+4WhGx6TftD19Q/dfzpwcHO+rE3fAAAAAElFTkSuQmCC";function I(){return(I=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}const D=e=>{let{onSelect:n,onCancel:o,onDismiss:l,PopupStyles:a,isDisabled:u,hideSubmit:c}=e;const{t:s}=i.useTranslation(),d=[r.createElement("div",null,r.createElement(t.CardText,null,s("CORE_LOGOUT_WEB_CONFIRMATION_MESSAGE")+" ",r.createElement("strong",null,s("CORE_LOGOUT_MESSAGE"))))],f=[r.createElement(t.Button,{type:"button",size:"large",variation:"digit-action-cancel",label:s("CORE_LOGOUT_CANCEL"),className:"logout-cancel-button",onClick:o}),r.createElement(t.Button,{type:"button",size:"large",variation:"primary",label:s("CORE_LOGOUT_WEB_YES"),formId:"modal-action",onClick:n,isDisabled:u})],m=[r.createElement(t.Button,{type:"button",size:"large",variation:"digit-action-cancel",label:s("CORE_LOGOUT_CANCEL"),className:"logout-cancel-button",onClick:o})];return r.createElement(t.PopUp,{type:"default",children:d,heading:s("CORE_LOGOUT_WEB_HEADER"),footerChildren:c?m:f,sortFooterButtons:!0,onClose:l,className:"digit-logout-popup-wrapper",onOverlayClick:l,style:a})},T=e=>{let{info:t,t:n}=e;return r.createElement("div",{className:"profile-section"},r.createElement("div",{className:"imageloader imageloader-loaded"},r.createElement("img",{className:"img-responsive img-circle img-Profile",src:N})),r.createElement("div",{id:"profile-name",className:"label-container name-Profile"},r.createElement("div",{className:"label-text"}," ",null==t?void 0:t.name," ")),r.createElement("div",{id:"profile-location",className:"label-container loc-Profile"},r.createElement("div",{className:"label-text"}," ",null==t?void 0:t.mobileNumber," ")),(null==t?void 0:t.emailId)&&r.createElement("div",{id:"profile-emailid",className:"label-container loc-Profile"},r.createElement("div",{className:"label-text"}," ",t.emailId," ")),r.createElement("div",{className:"profile-divider"}),window.location.href.includes("/employee")&&!window.location.href.includes("/employee/user/login")&&!window.location.href.includes("employee/user/language-selection")&&r.createElement(b,{t:n,mobileView:!0}))},A={CommonPTIcon:r.createElement(t.PTIcon,{className:"icon"}),OBPSIcon:r.createElement(t.OBPSIcon,{className:"icon"}),propertyIcon:r.createElement(t.PropertyHouse,{className:"icon"}),TLIcon:r.createElement(t.CaseIcon,{className:"icon"}),PGRIcon:r.createElement(t.PGRIcon,{className:"icon"}),FSMIcon:r.createElement(t.FSMIcon,{className:"icon"}),WSIcon:r.createElement(t.WSICon,{className:"icon"}),MCollectIcon:r.createElement(t.MCollectIcon,{className:"icon"}),BillsIcon:r.createElement(t.CollectionIcon,{className:"icon"}),BirthIcon:r.createElement(t.BirthIcon,{className:"icon"}),DeathIcon:r.createElement(t.DeathIcon,{className:"icon"}),FirenocIcon:r.createElement(t.FirenocIcon,{className:"icon"}),HomeIcon:r.createElement(t.HomeIcon,{className:"icon"}),EditPencilIcon:r.createElement(t.EditPencilIcon,{className:"icon"}),LogoutIcon:r.createElement(t.LogoutIcon,{className:"icon"}),Phone:r.createElement(t.Phone,{className:"icon"})},L=e=>{var o,l,u;let{linkData:c,islinkDataLoading:s}=e;const{t:d}=i.useTranslation(),f=a.useHistory(),m=a.useLocation(),{pathname:v}=m,{data:p,isFetched:g}=Digit.Hooks.useStore.getInitData(),{stateInfo:h}=p||{},E=Digit.UserService.getUser();let y=window.Digit.Utils.browser.isMobile();const[_,b]=n.useState(!1),[C,O]=n.useState(!1),[S,N]=n.useState(!1),L=()=>{N(!1)};if(s)return r.createElement(t.Loader,null);const R=()=>{var e;f.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/citizen/user/profile")};let x=[...w(d,R,()=>{var e;f.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/citizen/login")},_)];x=x.filter(e=>"LANGUAGE"!==e.element),Digit.ULBService.getCurrentTenantId();const P=e=>{var t,n;let{item:i}=e;const o=(null==i?void 0:i.icon)||(null===(t=i.icon)||void 0===t||null===(n=t.type)||void 0===n?void 0:n.name),l=o?A[o]:A.BillsIcon;let u;u="component"===i.type?i.action:i.text;const c=()=>r.createElement("span",I({className:"menu-item"},i.populators),l,r.createElement("div",{className:"menu-label"},u));return"external-link"===i.type?r.createElement("a",{href:i.link},r.createElement(c,null)):"link"===i.type?r.createElement(a.Link,{to:null==i?void 0:i.link},r.createElement(c,null)):r.createElement(c,null)};let M;return g&&E&&E.access_token&&(M=r.createElement(T,{info:null==E?void 0:E.info,stateName:null==h?void 0:h.name,t:d}),x=x.filter(e=>"login-btn"!==(null==e?void 0:e.id)),x=[...x,{text:d("EDIT_PROFILE"),element:"PROFILE",icon:"EditPencilIcon",populators:{onClick:R}},{text:d("CORE_COMMON_LOGOUT"),element:"LOGOUT",icon:"LogoutIcon",populators:{onClick:()=>{O(!1),N(!0)}}},{text:r.createElement(r.Fragment,null,d("CS_COMMON_HELPLINE"),r.createElement("div",{className:"telephone",style:{marginTop:"-10%"}},null==p?void 0:p.tenants.map(e=>{}),r.createElement("div",{className:"link"},r.createElement("a",{href:"tel:"+(null==p?void 0:p.tenants[0].contactNumber)},null==p?void 0:p.tenants[0].contactNumber)))),element:"Helpline",icon:"Phone"}]),null===(o=Object.keys(c))||void 0===o||null===(l=o.sort((e,t)=>t.localeCompare(e)))||void 0===l||l.map(e=>{var t,n,r,i,o,l;(null===(t=c[e][0])||void 0===t?void 0:t.sidebar)===window.contextPath+"-links"&&x.splice(1,0,{type:null!==(n=c[e][0])&&void 0!==n&&null!==(r=n.sidebarURL)&&void 0!==r&&r.includes(null===(i=window)||void 0===i?void 0:i.contextPath)?"link":"external-link",text:d("ACTION_TEST_"+Digit.Utils.locale.getTransformedLocale(e)),links:c[e],icon:null===(o=c[e][0])||void 0===o?void 0:o.leftIcon,link:null===(l=c[e][0])||void 0===l?void 0:l.sidebarURL})}),r.createElement(r.Fragment,null,r.createElement("div",null,r.createElement("div",{style:{height:"100%",width:"100%",top:"0px",backgroundColor:"rgba(0, 0, 0, 0.54)",pointerzevents:"auto"}}),r.createElement("div",{style:{display:"flex",flexDirection:"column",height:y?"calc(100vh - 56px)":"auto",zIndex:"99"}},M,r.createElement("div",{className:"drawer-desktop"},null===(u=x)||void 0===u?void 0:u.map((e,t)=>r.createElement("div",{className:"sidebar-list "+(v===(null==e?void 0:e.link)||v===(null==e?void 0:e.sidebarURL)?"active":""),key:t},r.createElement(P,{item:e}))))),r.createElement("div",null,S&&r.createElement(D,{onSelect:()=>{Digit.UserService.logout(),N(!1)},onCancel:L,onDismiss:L}))))},R=e=>{var t;let{info:n,t:i}=e;const[o,l]=r.useState(null);r.useEffect(function(){try{const e=Digit.ULBService.getCurrentTenantId(),t=null==n?void 0:n.uuid,r=function(){if(t)return Promise.resolve(Digit.UserService.userSearch(e,{uuid:[t]},{})).then(function(e){if(e&&e.user&&e.user.length){var t;const n=e.user[0],r=null==n||null===(t=n.photo)||void 0===t?void 0:t.split(",");l(null==r?void 0:r.at(0))}})}();return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},[null!==o]);const a=null===(t=Digit.ComponentRegistryService)||void 0===t?void 0:t.getComponent("CustomEmployeeTopBar");return r.createElement("div",{className:"profile-section"},r.createElement("div",{className:"imageloader imageloader-loaded"},r.createElement("img",{className:"img-responsive img-circle img-Profile",src:o||N,style:{objectFit:"cover",objectPosition:"center"}})),r.createElement("div",{id:"profile-name",className:"label-container name-Profile"},r.createElement("div",{className:"label-text"}," ",null==n?void 0:n.name," ")),r.createElement("div",{id:"profile-location",className:"label-container loc-Profile"},r.createElement("div",{className:"label-text"}," ",null==n?void 0:n.mobileNumber," ")),(null==n?void 0:n.emailId)&&r.createElement("div",{id:"profile-emailid",className:"label-container loc-Profile"},r.createElement("div",{className:"label-text"}," ",n.emailId," ")),r.createElement("div",{className:"profile-divider"}),window.location.href.includes("/employee")&&!window.location.href.includes("/employee/user/login")&&!window.location.href.includes("employee/user/language-selection")&&!a&&r.createElement(b,{t:i,mobileView:!0}))},x=()=>{var e,t,n;return r.createElement("div",{className:"digit-footer",style:{marginBottom:0}},r.createElement("img",{alt:"Powered by DIGIT",src:null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_FOOTER"),style:{cursor:"pointer"},onClick:()=>{var e,t,n;window.open(null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_HOME_URL"),"_blank").focus()}})," ")},P=e=>{let{isOpen:o,isMobile:l=!1,toggleSidebar:c,onLogout:s,isEmployee:d=!1,linkData:f,islinkDataLoading:m}=e;const{data:v,isFetched:p}=Digit.Hooks.useStore.getInitData(),{stateInfo:g}=v||{},h=Digit.UserService.getUser(),[E,y]=n.useState(""),{t:_}=i.useTranslation(),b=a.useHistory(),C=()=>{Digit.clikOusideFired=!0,c(!1)},{isLoading:O,data:S}=Digit.Hooks.useAccessControl(),N=(Digit.ULBService.getCurrentTenantId(),()=>{var e,t;const n=d?"/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/user/profile":"/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/citizen/user/profile";b.push(n),C()});if(m||O)return r.createElement(t.Loader,null);let I,D=[...w(_,C,()=>{var e;b.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/citizen/login"),C()},d)];p&&h&&h.access_token&&(I=r.createElement(R,{info:null==h?void 0:h.info,stateName:null==g?void 0:g.name,t:_}),D=D.filter(e=>"login-btn"!==(null==e?void 0:e.id)),D=[...D,{text:_("EDIT_PROFILE"),element:"PROFILE",icon:"EditPencilIcon",populators:{onClick:N}},{text:_("CORE_COMMON_LOGOUT"),element:"LOGOUT",icon:"LogoutIcon",populators:{onClick:s}},{text:r.createElement(r.Fragment,null,_("CS_COMMON_HELPLINE"),r.createElement("div",{className:"telephone",style:{marginTop:"-10%"}},null==v?void 0:v.tenants.map(e=>{}),r.createElement("div",{className:"link"},r.createElement("a",{href:"tel:"+(null==v?void 0:v.tenants[0].contactNumber)},null==v?void 0:v.tenants[0].contactNumber)))),element:"Helpline",icon:"Phone"}]);let T={};if(d){var A;null==S||S.actions.filter(e=>"url"===e.url&&"Home"!==e.displayName).forEach(e=>{var t;if(""==E&&""!==e.path){let t=e.path.split(".")[0];"TradeLicense"===t&&(t="Trade License"),T[t]?T[t].push(e):T[t]=[e]}else if(""!==e.path&&null!=e&&null!==(t=e.displayName)&&void 0!==t&&t.toLowerCase().includes(E.toLowerCase())){let t=e.path.split(".")[0];"TradeLicense"===t&&(t="Trade License"),T[t]?T[t].push(e):T[t]=[e]}});const e=Object.keys(T);for(let t=0;t<e.length;t++){var P,M,k,U,B;const n=null===(P=T[e[t]][0])||void 0===P||null===(M=P.displayName)||void 0===M||null===(k=M.toUpperCase())||void 0===k?void 0:k.replace(/[ -]/g,"_"),r=null===(U=e[t])||void 0===U||null===(B=U.toUpperCase())||void 0===B?void 0:B.replace(/[ -]/g,"_");var j,F,V,z,W,H,G;-1===T[e[t]][0].path.indexOf(".")?D.splice(1,0,{type:"link",text:_("ACTION_TEST_"+n),link:null===(j=T[e[t]][0])||void 0===j?void 0:j.navigationURL,icon:null===(F=T[e[t]][0])||void 0===F||null===(V=F.leftIcon)||void 0===V||null===(z=(W=V).split)||void 0===z?void 0:z.call(W,":")[1],populators:{onClick:()=>{var n;b.push(null===(n=T[e[t]][0])||void 0===n?void 0:n.navigationURL),C()}}}):D.splice(1,0,{type:"dynamic",moduleName:_("ACTION_TEST_"+r),links:null===(H=T[e[t]])||void 0===H?void 0:H.map(e=>{var t,n;return{...e,displayName:_("ACTION_TEST_"+(null==e||null===(t=e.displayName)||void 0===t||null===(n=t.toUpperCase())||void 0===n?void 0:n.replace(/[ -]/g,"_")))}}),icon:null===(G=T[e[t]][1])||void 0===G?void 0:G.leftIcon})}const t=D.findIndex(e=>"HOME"===e.element),n=D.splice(t,1),r=D.findIndex(e=>"LANGUAGE"===e.element),i=D.splice(r,(null===(A=D)||void 0===A?void 0:A.length)-r);D.sort((e,t)=>("dynamic"===(null==e?void 0:e.type)?null==e?void 0:e.moduleName:null==e?void 0:e.text).localeCompare("dynamic"===(null==t?void 0:t.type)?null==t?void 0:t.moduleName:null==t?void 0:t.text)),(null==n?void 0:n[0])&&D.splice(0,0,n[0]),D=(null==i?void 0:i.length)>0?D.concat(i):D}else{var q,Z;null===(q=Object.keys(f))||void 0===q||null===(Z=q.sort((e,t)=>t.localeCompare(e)))||void 0===Z||Z.map(e=>{var t,n,r,i,o,l;"digit-ui-links"===(null===(t=f[e][0])||void 0===t?void 0:t.sidebar)&&D.splice(1,0,{type:null!==(n=f[e][0])&&void 0!==n&&null!==(r=n.sidebarURL)&&void 0!==r&&r.includes(null===(i=window)||void 0===i?void 0:i.contextPath)?"link":"external-link",text:_("ACTION_TEST_"+Digit.Utils.locale.getTransformedLocale(e)),links:f[e],icon:null===(o=f[e][0])||void 0===o?void 0:o.leftIcon,link:null===(l=f[e][0])||void 0===l?void 0:l.sidebarURL})})}return b.location.pathname.includes("/openlink")&&(I=r.createElement("span",null),D=D.filter(e=>"LANGUAGE"===e.element)),l?r.createElement(u.NavBar,{open:o,toggleSidebar:c,profileItem:I,onClose:C,menuItems:D,Footer:r.createElement(x,null),isEmployee:d,search:E,setSearch:y}):r.createElement(L,{logout:s})};var M="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function k(e,t){return e(t={exports:{}},t.exports),t.exports}k(function(e,t){(function(){var n="Expected a function",r="__lodash_placeholder__",i=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],o="[object Arguments]",l="[object Array]",a="[object Boolean]",u="[object Date]",c="[object Error]",s="[object Function]",d="[object GeneratorFunction]",f="[object Map]",m="[object Number]",v="[object Object]",p="[object RegExp]",g="[object Set]",h="[object String]",E="[object Symbol]",y="[object WeakMap]",_="[object ArrayBuffer]",b="[object DataView]",C="[object Float32Array]",O="[object Float64Array]",S="[object Int8Array]",w="[object Int16Array]",N="[object Int32Array]",I="[object Uint8Array]",D="[object Uint16Array]",T="[object Uint32Array]",A=/\b__p \+= '';/g,L=/\b(__p \+=) '' \+/g,R=/(__e\(.*?\)|\b__t\)) \+\n'';/g,x=/&(?:amp|lt|gt|quot|#39);/g,P=/[&<>"']/g,k=RegExp(x.source),U=RegExp(P.source),B=/<%-([\s\S]+?)%>/g,j=/<%([\s\S]+?)%>/g,F=/<%=([\s\S]+?)%>/g,V=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,z=/^\w*$/,W=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,H=/[\\^$.*+?()[\]{}|]/g,G=RegExp(H.source),q=/^\s+/,Z=/\s/,X=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,$=/\{\n\/\* \[wrapped with (.+)\] \*/,Y=/,? & /,K=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,J=/[()=,{}\[\]\/\s]/,Q=/\\(\\)?/g,ee=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,te=/\w*$/,ne=/^[-+]0x[0-9a-f]+$/i,re=/^0b[01]+$/i,ie=/^\[object .+?Constructor\]$/,oe=/^0o[0-7]+$/i,le=/^(?:0|[1-9]\d*)$/,ae=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ue=/($^)/,ce=/['\n\r\u2028\u2029\\]/g,se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",de="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",fe="["+de+"]",me="["+se+"]",ve="\\d+",pe="[a-z\\xdf-\\xf6\\xf8-\\xff]",ge="[^\\ud800-\\udfff"+de+ve+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",he="\\ud83c[\\udffb-\\udfff]",Ee="[^\\ud800-\\udfff]",ye="(?:\\ud83c[\\udde6-\\uddff]){2}",_e="[\\ud800-\\udbff][\\udc00-\\udfff]",be="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Ce="(?:"+pe+"|"+ge+")",Oe="(?:"+be+"|"+ge+")",Se="(?:"+me+"|"+he+")?",we="[\\ufe0e\\ufe0f]?"+Se+"(?:\\u200d(?:"+[Ee,ye,_e].join("|")+")[\\ufe0e\\ufe0f]?"+Se+")*",Ne="(?:"+["[\\u2700-\\u27bf]",ye,_e].join("|")+")"+we,Ie="(?:"+[Ee+me+"?",me,ye,_e,"[\\ud800-\\udfff]"].join("|")+")",De=RegExp("['’]","g"),Te=RegExp(me,"g"),Ae=RegExp(he+"(?="+he+")|"+Ie+we,"g"),Le=RegExp([be+"?"+pe+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[fe,be,"$"].join("|")+")",Oe+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[fe,be+Ce,"$"].join("|")+")",be+"?"+Ce+"+(?:['’](?:d|ll|m|re|s|t|ve))?",be+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ve,Ne].join("|"),"g"),Re=RegExp("[\\u200d\\ud800-\\udfff"+se+"\\ufe0e\\ufe0f]"),xe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Pe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Me=-1,ke={};ke[C]=ke[O]=ke[S]=ke[w]=ke[N]=ke[I]=ke["[object Uint8ClampedArray]"]=ke[D]=ke[T]=!0,ke[o]=ke[l]=ke[_]=ke[a]=ke[b]=ke[u]=ke[c]=ke[s]=ke[f]=ke[m]=ke[v]=ke[p]=ke[g]=ke[h]=ke[y]=!1;var Ue={};Ue[o]=Ue[l]=Ue[_]=Ue[b]=Ue[a]=Ue[u]=Ue[C]=Ue[O]=Ue[S]=Ue[w]=Ue[N]=Ue[f]=Ue[m]=Ue[v]=Ue[p]=Ue[g]=Ue[h]=Ue[E]=Ue[I]=Ue["[object Uint8ClampedArray]"]=Ue[D]=Ue[T]=!0,Ue[c]=Ue[s]=Ue[y]=!1;var Be={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},je=parseFloat,Fe=parseInt,Ve="object"==typeof M&&M&&M.Object===Object&&M,ze="object"==typeof self&&self&&self.Object===Object&&self,We=Ve||ze||Function("return this")(),He=t&&!t.nodeType&&t,Ge=He&&e&&!e.nodeType&&e,qe=Ge&&Ge.exports===He,Ze=qe&&Ve.process,Xe=function(){try{return Ge&&Ge.require&&Ge.require("util").types||Ze&&Ze.binding&&Ze.binding("util")}catch(e){}}(),$e=Xe&&Xe.isArrayBuffer,Ye=Xe&&Xe.isDate,Ke=Xe&&Xe.isMap,Je=Xe&&Xe.isRegExp,Qe=Xe&&Xe.isSet,et=Xe&&Xe.isTypedArray;function tt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function nt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var l=e[i];t(r,l,n(l),e)}return r}function rt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function it(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function ot(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function lt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var l=e[n];t(l,n,e)&&(o[i++]=l)}return o}function at(e,t){return!(null==e||!e.length)&&ht(e,t,0)>-1}function ut(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function ct(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function st(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function dt(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function ft(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function mt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var vt=bt("length");function pt(e,t,n){var r;return n(e,function(e,n,i){if(t(e,n,i))return r=n,!1}),r}function gt(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function ht(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):gt(e,yt,n)}function Et(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function yt(e){return e!=e}function _t(e,t){var n=null==e?0:e.length;return n?St(e,t)/n:NaN}function bt(e){return function(t){return null==t?void 0:t[e]}}function Ct(e){return function(t){return null==e?void 0:e[t]}}function Ot(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}function St(e,t){for(var n,r=-1,i=e.length;++r<i;){var o=t(e[r]);void 0!==o&&(n=void 0===n?o:n+o)}return n}function wt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Nt(e){return e?e.slice(0,Ht(e)+1).replace(q,""):e}function It(e){return function(t){return e(t)}}function Dt(e,t){return ct(t,function(t){return e[t]})}function Tt(e,t){return e.has(t)}function At(e,t){for(var n=-1,r=e.length;++n<r&&ht(t,e[n],0)>-1;);return n}function Lt(e,t){for(var n=e.length;n--&&ht(t,e[n],0)>-1;);return n}function Rt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var xt=Ct({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Pt=Ct({"&":"&","<":"<",">":">",'"':""","'":"'"});function Mt(e){return"\\"+Be[e]}function kt(e){return Re.test(e)}function Ut(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function Bt(e,t){return function(n){return e(t(n))}}function jt(e,t){for(var n=-1,i=e.length,o=0,l=[];++n<i;){var a=e[n];a!==t&&a!==r||(e[n]=r,l[o++]=n)}return l}function Ft(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function Vt(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function zt(e){return kt(e)?function(e){for(var t=Ae.lastIndex=0;Ae.test(e);)++t;return t}(e):vt(e)}function Wt(e){return kt(e)?function(e){return e.match(Ae)||[]}(e):function(e){return e.split("")}(e)}function Ht(e){for(var t=e.length;t--&&Z.test(e.charAt(t)););return t}var Gt=Ct({"&":"&","<":"<",">":">",""":'"',"'":"'"}),qt=function e(t){var M,Z=(t=null==t?We:qt.defaults(We.Object(),t,qt.pick(We,Pe))).Array,se=t.Date,de=t.Error,fe=t.Function,me=t.Math,ve=t.Object,pe=t.RegExp,ge=t.String,he=t.TypeError,Ee=Z.prototype,ye=ve.prototype,_e=t["__core-js_shared__"],be=fe.prototype.toString,Ce=ye.hasOwnProperty,Oe=0,Se=(M=/[^.]+$/.exec(_e&&_e.keys&&_e.keys.IE_PROTO||""))?"Symbol(src)_1."+M:"",we=ye.toString,Ne=be.call(ve),Ie=We._,Ae=pe("^"+be.call(Ce).replace(H,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Re=qe?t.Buffer:void 0,Be=t.Symbol,Ve=t.Uint8Array,ze=Re?Re.allocUnsafe:void 0,He=Bt(ve.getPrototypeOf,ve),Ge=ve.create,Ze=ye.propertyIsEnumerable,Xe=Ee.splice,vt=Be?Be.isConcatSpreadable:void 0,Ct=Be?Be.iterator:void 0,Zt=Be?Be.toStringTag:void 0,Xt=function(){try{var e=Ji(ve,"defineProperty");return e({},"",{}),e}catch(e){}}(),$t=t.clearTimeout!==We.clearTimeout&&t.clearTimeout,Yt=se&&se.now!==We.Date.now&&se.now,Kt=t.setTimeout!==We.setTimeout&&t.setTimeout,Jt=me.ceil,Qt=me.floor,en=ve.getOwnPropertySymbols,tn=Re?Re.isBuffer:void 0,nn=t.isFinite,rn=Ee.join,on=Bt(ve.keys,ve),ln=me.max,an=me.min,un=se.now,cn=t.parseInt,sn=me.random,dn=Ee.reverse,fn=Ji(t,"DataView"),mn=Ji(t,"Map"),vn=Ji(t,"Promise"),pn=Ji(t,"Set"),gn=Ji(t,"WeakMap"),hn=Ji(ve,"create"),En=gn&&new gn,yn={},_n=Do(fn),bn=Do(mn),Cn=Do(vn),On=Do(pn),Sn=Do(gn),wn=Be?Be.prototype:void 0,Nn=wn?wn.valueOf:void 0,In=wn?wn.toString:void 0;function Dn(e){if(Gl(e)&&!Pl(e)&&!(e instanceof Rn)){if(e instanceof Ln)return e;if(Ce.call(e,"__wrapped__"))return To(e)}return new Ln(e)}var Tn=function(){function e(){}return function(t){if(!Hl(t))return{};if(Ge)return Ge(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function An(){}function Ln(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Rn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function xn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Pn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Mn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function kn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Mn;++t<n;)this.add(e[t])}function Un(e){var t=this.__data__=new Pn(e);this.size=t.size}function Bn(e,t){var n=Pl(e),r=!n&&xl(e),i=!n&&!r&&Bl(e),o=!n&&!r&&!i&&Ql(e),l=n||r||i||o,a=l?wt(e.length,ge):[],u=a.length;for(var c in e)!t&&!Ce.call(e,c)||l&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||oo(c,u))||a.push(c);return a}function jn(e){var t=e.length;return t?e[Mr(0,t-1)]:void 0}function Fn(e,t){return Oo(gi(e),$n(t,0,e.length))}function Vn(e){return Oo(gi(e))}function zn(e,t,n){(void 0!==n&&!Al(e[t],n)||void 0===n&&!(t in e))&&Zn(e,t,n)}function Wn(e,t,n){var r=e[t];Ce.call(e,t)&&Al(r,n)&&(void 0!==n||t in e)||Zn(e,t,n)}function Hn(e,t){for(var n=e.length;n--;)if(Al(e[n][0],t))return n;return-1}function Gn(e,t,n,r){return er(e,function(e,i,o){t(r,e,n(e),o)}),r}function qn(e,t){return e&&hi(t,ba(t),e)}function Zn(e,t,n){"__proto__"==t&&Xt?Xt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Xn(e,t){for(var n=-1,r=t.length,i=Z(r),o=null==e;++n<r;)i[n]=o?void 0:ga(e,t[n]);return i}function $n(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}function Yn(e,t,n,r,i,l){var c,y=1&t,A=2&t,L=4&t;if(n&&(c=i?n(e,r,i,l):n(e)),void 0!==c)return c;if(!Hl(e))return e;var R=Pl(e);if(R){if(c=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ce.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!y)return gi(e,c)}else{var x=to(e),P=x==s||x==d;if(Bl(e))return si(e,y);if(x==v||x==o||P&&!i){if(c=A||P?{}:ro(e),!y)return A?function(e,t){return hi(e,eo(e),t)}(e,function(e,t){return e&&hi(t,Ca(t),e)}(c,e)):function(e,t){return hi(e,Qi(e),t)}(e,qn(c,e))}else{if(!Ue[x])return i?e:{};c=function(e,t,n){var r=e.constructor;switch(t){case _:return di(e);case a:case u:return new r(+e);case b:return function(e,t){var n=t?di(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case C:case O:case S:case w:case N:case I:case"[object Uint8ClampedArray]":case D:case T:return fi(e,n);case f:return new r;case m:case h:return new r(e);case p:return function(e){var t=new e.constructor(e.source,te.exec(e));return t.lastIndex=e.lastIndex,t}(e);case g:return new r;case E:return Nn?ve(Nn.call(e)):{}}}(e,x,y)}}l||(l=new Un);var M=l.get(e);if(M)return M;l.set(e,c),Yl(e)?e.forEach(function(r){c.add(Yn(r,t,n,r,e,l))}):ql(e)&&e.forEach(function(r,i){c.set(i,Yn(r,t,n,i,e,l))});var k=R?void 0:(L?A?Gi:Hi:A?Ca:ba)(e);return rt(k||e,function(r,i){k&&(r=e[i=r]),Wn(c,i,Yn(r,t,n,i,e,l))}),c}function Kn(e,t,n){var r=n.length;if(null==e)return!r;for(e=ve(e);r--;){var i=n[r],o=e[i];if(void 0===o&&!(i in e)||!(0,t[i])(o))return!1}return!0}function Jn(e,t,r){if("function"!=typeof e)throw new he(n);return yo(function(){e.apply(void 0,r)},t)}function Qn(e,t,n,r){var i=-1,o=at,l=!0,a=e.length,u=[],c=t.length;if(!a)return u;n&&(t=ct(t,It(n))),r?(o=ut,l=!1):t.length>=200&&(o=Tt,l=!1,t=new kn(t));e:for(;++i<a;){var s=e[i],d=null==n?s:n(s);if(s=r||0!==s?s:0,l&&d==d){for(var f=c;f--;)if(t[f]===d)continue e;u.push(s)}else o(t,d,r)||u.push(s)}return u}Dn.templateSettings={escape:B,evaluate:j,interpolate:F,variable:"",imports:{_:Dn}},(Dn.prototype=An.prototype).constructor=Dn,(Ln.prototype=Tn(An.prototype)).constructor=Ln,(Rn.prototype=Tn(An.prototype)).constructor=Rn,xn.prototype.clear=function(){this.__data__=hn?hn(null):{},this.size=0},xn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},xn.prototype.get=function(e){var t=this.__data__;if(hn){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Ce.call(t,e)?t[e]:void 0},xn.prototype.has=function(e){var t=this.__data__;return hn?void 0!==t[e]:Ce.call(t,e)},xn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=hn&&void 0===t?"__lodash_hash_undefined__":t,this},Pn.prototype.clear=function(){this.__data__=[],this.size=0},Pn.prototype.delete=function(e){var t=this.__data__,n=Hn(t,e);return!(n<0||(n==t.length-1?t.pop():Xe.call(t,n,1),--this.size,0))},Pn.prototype.get=function(e){var t=this.__data__,n=Hn(t,e);return n<0?void 0:t[n][1]},Pn.prototype.has=function(e){return Hn(this.__data__,e)>-1},Pn.prototype.set=function(e,t){var n=this.__data__,r=Hn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Mn.prototype.clear=function(){this.size=0,this.__data__={hash:new xn,map:new(mn||Pn),string:new xn}},Mn.prototype.delete=function(e){var t=Yi(this,e).delete(e);return this.size-=t?1:0,t},Mn.prototype.get=function(e){return Yi(this,e).get(e)},Mn.prototype.has=function(e){return Yi(this,e).has(e)},Mn.prototype.set=function(e,t){var n=Yi(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},kn.prototype.add=kn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},kn.prototype.has=function(e){return this.__data__.has(e)},Un.prototype.clear=function(){this.__data__=new Pn,this.size=0},Un.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Un.prototype.get=function(e){return this.__data__.get(e)},Un.prototype.has=function(e){return this.__data__.has(e)},Un.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Pn){var r=n.__data__;if(!mn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Mn(r)}return n.set(e,t),this.size=n.size,this};var er=_i(ur),tr=_i(cr,!0);function nr(e,t){var n=!0;return er(e,function(e,r,i){return n=!!t(e,r,i)}),n}function rr(e,t,n){for(var r=-1,i=e.length;++r<i;){var o=e[r],l=t(o);if(null!=l&&(void 0===a?l==l&&!Jl(l):n(l,a)))var a=l,u=o}return u}function ir(e,t){var n=[];return er(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function or(e,t,n,r,i){var o=-1,l=e.length;for(n||(n=io),i||(i=[]);++o<l;){var a=e[o];t>0&&n(a)?t>1?or(a,t-1,n,r,i):st(i,a):r||(i[i.length]=a)}return i}var lr=bi(),ar=bi(!0);function ur(e,t){return e&&lr(e,t,ba)}function cr(e,t){return e&&ar(e,t,ba)}function sr(e,t){return lt(t,function(t){return Vl(e[t])})}function dr(e,t){for(var n=0,r=(t=li(t,e)).length;null!=e&&n<r;)e=e[Io(t[n++])];return n&&n==r?e:void 0}function fr(e,t,n){var r=t(e);return Pl(e)?r:st(r,n(e))}function mr(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Zt&&Zt in ve(e)?function(e){var t=Ce.call(e,Zt),n=e[Zt];try{e[Zt]=void 0;var r=!0}catch(e){}var i=we.call(e);return r&&(t?e[Zt]=n:delete e[Zt]),i}(e):function(e){return we.call(e)}(e)}function vr(e,t){return e>t}function pr(e,t){return null!=e&&Ce.call(e,t)}function gr(e,t){return null!=e&&t in ve(e)}function hr(e,t,n){for(var r=n?ut:at,i=e[0].length,o=e.length,l=o,a=Z(o),u=Infinity,c=[];l--;){var s=e[l];l&&t&&(s=ct(s,It(t))),u=an(s.length,u),a[l]=!n&&(t||i>=120&&s.length>=120)?new kn(l&&s):void 0}s=e[0];var d=-1,f=a[0];e:for(;++d<i&&c.length<u;){var m=s[d],v=t?t(m):m;if(m=n||0!==m?m:0,!(f?Tt(f,v):r(c,v,n))){for(l=o;--l;){var p=a[l];if(!(p?Tt(p,v):r(e[l],v,n)))continue e}f&&f.push(v),c.push(m)}}return c}function Er(e,t,n){var r=null==(e=po(e,t=li(t,e)))?e:e[Io(Fo(t))];return null==r?void 0:tt(r,e,n)}function yr(e){return Gl(e)&&mr(e)==o}function _r(e,t,n,r,i){return e===t||(null==e||null==t||!Gl(e)&&!Gl(t)?e!=e&&t!=t:function(e,t,n,r,i,s){var d=Pl(e),y=Pl(t),C=d?l:to(e),O=y?l:to(t),S=(C=C==o?v:C)==v,w=(O=O==o?v:O)==v,N=C==O;if(N&&Bl(e)){if(!Bl(t))return!1;d=!0,S=!1}if(N&&!S)return s||(s=new Un),d||Ql(e)?zi(e,t,n,r,i,s):function(e,t,n,r,i,o,l){switch(n){case b:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case _:return!(e.byteLength!=t.byteLength||!o(new Ve(e),new Ve(t)));case a:case u:case m:return Al(+e,+t);case c:return e.name==t.name&&e.message==t.message;case p:case h:return e==t+"";case f:var s=Ut;case g:if(s||(s=Ft),e.size!=t.size&&!(1&r))return!1;var d=l.get(e);if(d)return d==t;r|=2,l.set(e,t);var v=zi(s(e),s(t),r,i,o,l);return l.delete(e),v;case E:if(Nn)return Nn.call(e)==Nn.call(t)}return!1}(e,t,C,n,r,i,s);if(!(1&n)){var I=S&&Ce.call(e,"__wrapped__"),D=w&&Ce.call(t,"__wrapped__");if(I||D){var T=I?e.value():e,A=D?t.value():t;return s||(s=new Un),i(T,A,n,r,s)}}return!!N&&(s||(s=new Un),function(e,t,n,r,i,o){var l=1&n,a=Hi(e),u=a.length;if(u!=Hi(t).length&&!l)return!1;for(var c=u;c--;){var s=a[c];if(!(l?s in t:Ce.call(t,s)))return!1}var d=o.get(e),f=o.get(t);if(d&&f)return d==t&&f==e;var m=!0;o.set(e,t),o.set(t,e);for(var v=l;++c<u;){var p=e[s=a[c]],g=t[s];if(r)var h=l?r(g,p,s,t,e,o):r(p,g,s,e,t,o);if(!(void 0===h?p===g||i(p,g,n,r,o):h)){m=!1;break}v||(v="constructor"==s)}if(m&&!v){var E=e.constructor,y=t.constructor;E==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof E&&E instanceof E&&"function"==typeof y&&y instanceof y||(m=!1)}return o.delete(e),o.delete(t),m}(e,t,n,r,i,s))}(e,t,n,r,_r,i))}function br(e,t,n,r){var i=n.length,o=i,l=!r;if(null==e)return!o;for(e=ve(e);i--;){var a=n[i];if(l&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){var u=(a=n[i])[0],c=e[u],s=a[1];if(l&&a[2]){if(void 0===c&&!(u in e))return!1}else{var d=new Un;if(r)var f=r(c,s,u,e,t,d);if(!(void 0===f?_r(s,c,3,r,d):f))return!1}}return!0}function Cr(e){return!(!Hl(e)||(t=e,Se&&Se in t))&&(Vl(e)?Ae:ie).test(Do(e));var t}function Or(e){return"function"==typeof e?e:null==e?Za:"object"==typeof e?Pl(e)?Dr(e[0],e[1]):Ir(e):nu(e)}function Sr(e){if(!so(e))return on(e);var t=[];for(var n in ve(e))Ce.call(e,n)&&"constructor"!=n&&t.push(n);return t}function wr(e,t){return e<t}function Nr(e,t){var n=-1,r=kl(e)?Z(e.length):[];return er(e,function(e,i,o){r[++n]=t(e,i,o)}),r}function Ir(e){var t=Ki(e);return 1==t.length&&t[0][2]?mo(t[0][0],t[0][1]):function(n){return n===e||br(n,e,t)}}function Dr(e,t){return ao(e)&&fo(t)?mo(Io(e),t):function(n){var r=ga(n,e);return void 0===r&&r===t?ha(n,e):_r(t,r,3)}}function Tr(e,t,n,r,i){e!==t&&lr(t,function(o,l){if(i||(i=new Un),Hl(o))!function(e,t,n,r,i,o,l){var a=ho(e,n),u=ho(t,n),c=l.get(u);if(c)zn(e,n,c);else{var s=o?o(a,u,n+"",e,t,l):void 0,d=void 0===s;if(d){var f=Pl(u),m=!f&&Bl(u),v=!f&&!m&&Ql(u);s=u,f||m||v?Pl(a)?s=a:Ul(a)?s=gi(a):m?(d=!1,s=si(u,!0)):v?(d=!1,s=fi(u,!0)):s=[]:Xl(u)||xl(u)?(s=a,xl(a)?s=aa(a):Hl(a)&&!Vl(a)||(s=ro(u))):d=!1}d&&(l.set(u,s),i(s,u,r,o,l),l.delete(u)),zn(e,n,s)}}(e,t,l,n,Tr,r,i);else{var a=r?r(ho(e,l),o,l+"",e,t,i):void 0;void 0===a&&(a=o),zn(e,l,a)}},Ca)}function Ar(e,t){var n=e.length;if(n)return oo(t+=t<0?n:0,n)?e[t]:void 0}function Lr(e,t,n){t=t.length?ct(t,function(e){return Pl(e)?function(t){return dr(t,1===e.length?e[0]:e)}:e}):[Za];var r=-1;return t=ct(t,It($i())),function(e,t){var r=e.length;for(e.sort(function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,l=i.length,a=n.length;++r<l;){var u=mi(i[r],o[r]);if(u)return r>=a?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)});r--;)e[r]=e[r].value;return e}(Nr(e,function(e,n,i){return{criteria:ct(t,function(t){return t(e)}),index:++r,value:e}}))}function Rr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var l=t[r],a=dr(e,l);n(a,l)&&Fr(o,li(l,e),a)}return o}function xr(e,t,n,r){var i=r?Et:ht,o=-1,l=t.length,a=e;for(e===t&&(t=gi(t)),n&&(a=ct(e,It(n)));++o<l;)for(var u=0,c=t[o],s=n?n(c):c;(u=i(a,s,u,r))>-1;)a!==e&&Xe.call(a,u,1),Xe.call(e,u,1);return e}function Pr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;oo(i)?Xe.call(e,i,1):Jr(e,i)}}return e}function Mr(e,t){return e+Qt(sn()*(t-e+1))}function kr(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=Qt(t/2))&&(e+=e)}while(t);return n}function Ur(e,t){return _o(vo(e,t,Za),e+"")}function Br(e){return jn(Aa(e))}function jr(e,t){var n=Aa(e);return Oo(n,$n(t,0,n.length))}function Fr(e,t,n,r){if(!Hl(e))return e;for(var i=-1,o=(t=li(t,e)).length,l=o-1,a=e;null!=a&&++i<o;){var u=Io(t[i]),c=n;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;if(i!=l){var s=a[u];void 0===(c=r?r(s,u,a):void 0)&&(c=Hl(s)?s:oo(t[i+1])?[]:{})}Wn(a,u,c),a=a[u]}return e}var Vr=En?function(e,t){return En.set(e,t),e}:Za,zr=Xt?function(e,t){return Xt(e,"toString",{configurable:!0,enumerable:!1,value:Ha(t),writable:!0})}:Za;function Wr(e){return Oo(Aa(e))}function Hr(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Z(i);++r<i;)o[r]=e[r+t];return o}function Gr(e,t){var n;return er(e,function(e,r,i){return!(n=t(e,r,i))}),!!n}function qr(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,l=e[o];null!==l&&!Jl(l)&&(n?l<=t:l<t)?r=o+1:i=o}return i}return Zr(e,t,Za,n)}function Zr(e,t,n,r){var i=0,o=null==e?0:e.length;if(0===o)return 0;for(var l=(t=n(t))!=t,a=null===t,u=Jl(t),c=void 0===t;i<o;){var s=Qt((i+o)/2),d=n(e[s]),f=void 0!==d,m=null===d,v=d==d,p=Jl(d);if(l)var g=r||v;else g=c?v&&(r||f):a?v&&f&&(r||!m):u?v&&f&&!m&&(r||!p):!m&&!p&&(r?d<=t:d<t);g?i=s+1:o=s}return an(o,4294967294)}function Xr(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var l=e[n],a=t?t(l):l;if(!n||!Al(a,u)){var u=a;o[i++]=0===l?0:l}}return o}function $r(e){return"number"==typeof e?e:Jl(e)?NaN:+e}function Yr(e){if("string"==typeof e)return e;if(Pl(e))return ct(e,Yr)+"";if(Jl(e))return In?In.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Kr(e,t,n){var r=-1,i=at,o=e.length,l=!0,a=[],u=a;if(n)l=!1,i=ut;else if(o>=200){var c=t?null:ki(e);if(c)return Ft(c);l=!1,i=Tt,u=new kn}else u=t?[]:a;e:for(;++r<o;){var s=e[r],d=t?t(s):s;if(s=n||0!==s?s:0,l&&d==d){for(var f=u.length;f--;)if(u[f]===d)continue e;t&&u.push(d),a.push(s)}else i(u,d,n)||(u!==a&&u.push(d),a.push(s))}return a}function Jr(e,t){return null==(e=po(e,t=li(t,e)))||delete e[Io(Fo(t))]}function Qr(e,t,n,r){return Fr(e,t,n(dr(e,t)),r)}function ei(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?Hr(e,r?0:o,r?o+1:i):Hr(e,r?o+1:0,r?i:o)}function ti(e,t){var n=e;return n instanceof Rn&&(n=n.value()),dt(t,function(e,t){return t.func.apply(t.thisArg,st([e],t.args))},n)}function ni(e,t,n){var r=e.length;if(r<2)return r?Kr(e[0]):[];for(var i=-1,o=Z(r);++i<r;)for(var l=e[i],a=-1;++a<r;)a!=i&&(o[i]=Qn(o[i]||l,e[a],t,n));return Kr(or(o,1),t,n)}function ri(e,t,n){for(var r=-1,i=e.length,o=t.length,l={};++r<i;)n(l,e[r],r<o?t[r]:void 0);return l}function ii(e){return Ul(e)?e:[]}function oi(e){return"function"==typeof e?e:Za}function li(e,t){return Pl(e)?e:ao(e,t)?[e]:No(ua(e))}var ai=Ur;function ui(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:Hr(e,t,n)}var ci=$t||function(e){return We.clearTimeout(e)};function si(e,t){if(t)return e.slice();var n=e.length,r=ze?ze(n):new e.constructor(n);return e.copy(r),r}function di(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t}function fi(e,t){var n=t?di(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function mi(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=e==e,o=Jl(e),l=void 0!==t,a=null===t,u=t==t,c=Jl(t);if(!a&&!c&&!o&&e>t||o&&l&&u&&!a&&!c||r&&l&&u||!n&&u||!i)return 1;if(!r&&!o&&!c&&e<t||c&&n&&i&&!r&&!o||a&&n&&i||!l&&i||!u)return-1}return 0}function vi(e,t,n,r){for(var i=-1,o=e.length,l=n.length,a=-1,u=t.length,c=ln(o-l,0),s=Z(u+c),d=!r;++a<u;)s[a]=t[a];for(;++i<l;)(d||i<o)&&(s[n[i]]=e[i]);for(;c--;)s[a++]=e[i++];return s}function pi(e,t,n,r){for(var i=-1,o=e.length,l=-1,a=n.length,u=-1,c=t.length,s=ln(o-a,0),d=Z(s+c),f=!r;++i<s;)d[i]=e[i];for(var m=i;++u<c;)d[m+u]=t[u];for(;++l<a;)(f||i<o)&&(d[m+n[l]]=e[i++]);return d}function gi(e,t){var n=-1,r=e.length;for(t||(t=Z(r));++n<r;)t[n]=e[n];return t}function hi(e,t,n,r){var i=!n;n||(n={});for(var o=-1,l=t.length;++o<l;){var a=t[o],u=r?r(n[a],e[a],a,n,e):void 0;void 0===u&&(u=e[a]),i?Zn(n,a,u):Wn(n,a,u)}return n}function Ei(e,t){return function(n,r){var i=Pl(n)?nt:Gn,o=t?t():{};return i(n,e,$i(r,2),o)}}function yi(e){return Ur(function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,l=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,l&&lo(n[0],n[1],l)&&(o=i<3?void 0:o,i=1),t=ve(t);++r<i;){var a=n[r];a&&e(t,a,r,o)}return t})}function _i(e,t){return function(n,r){if(null==n)return n;if(!kl(n))return e(n,r);for(var i=n.length,o=t?i:-1,l=ve(n);(t?o--:++o<i)&&!1!==r(l[o],o,l););return n}}function bi(e){return function(t,n,r){for(var i=-1,o=ve(t),l=r(t),a=l.length;a--;){var u=l[e?a:++i];if(!1===n(o[u],u,o))break}return t}}function Ci(e){return function(t){var n=kt(t=ua(t))?Wt(t):void 0,r=n?n[0]:t.charAt(0),i=n?ui(n,1).join(""):t.slice(1);return r[e]()+i}}function Oi(e){return function(t){return dt(Va(xa(t).replace(De,"")),e,"")}}function Si(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Tn(e.prototype),r=e.apply(n,t);return Hl(r)?r:n}}function wi(e){return function(t,n,r){var i=ve(t);if(!kl(t)){var o=$i(n,3);t=ba(t),n=function(e){return o(i[e],e,i)}}var l=e(t,n,r);return l>-1?i[o?t[l]:l]:void 0}}function Ni(e){return Wi(function(t){var r=t.length,i=r,o=Ln.prototype.thru;for(e&&t.reverse();i--;){var l=t[i];if("function"!=typeof l)throw new he(n);if(o&&!a&&"wrapper"==Zi(l))var a=new Ln([],!0)}for(i=a?i:r;++i<r;){var u=Zi(l=t[i]),c="wrapper"==u?qi(l):void 0;a=c&&uo(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?a[Zi(c[0])].apply(a,c[3]):1==l.length&&uo(l)?a[u]():a.thru(l)}return function(){var e=arguments,n=e[0];if(a&&1==e.length&&Pl(n))return a.plant(n).value();for(var i=0,o=r?t[i].apply(this,e):n;++i<r;)o=t[i].call(this,o);return o}})}function Ii(e,t,n,r,i,o,l,a,u,c){var s=128&t,d=1&t,f=2&t,m=24&t,v=512&t,p=f?void 0:Si(e);return function g(){for(var h=arguments.length,E=Z(h),y=h;y--;)E[y]=arguments[y];if(m)var _=Xi(g),b=Rt(E,_);if(r&&(E=vi(E,r,i,m)),o&&(E=pi(E,o,l,m)),h-=b,m&&h<c){var C=jt(E,_);return Pi(e,t,Ii,g.placeholder,n,E,C,a,u,c-h)}var O=d?n:this,S=f?O[e]:e;return h=E.length,a?E=go(E,a):v&&h>1&&E.reverse(),s&&u<h&&(E.length=u),this&&this!==We&&this instanceof g&&(S=p||Si(S)),S.apply(O,E)}}function Di(e,t){return function(n,r){return function(e,t,n,r){return ur(e,function(e,i,o){t(r,n(e),i,o)}),r}(n,e,t(r),{})}}function Ti(e,t){return function(n,r){var i;if(void 0===n&&void 0===r)return t;if(void 0!==n&&(i=n),void 0!==r){if(void 0===i)return r;"string"==typeof n||"string"==typeof r?(n=Yr(n),r=Yr(r)):(n=$r(n),r=$r(r)),i=e(n,r)}return i}}function Ai(e){return Wi(function(t){return t=ct(t,It($i())),Ur(function(n){var r=this;return e(t,function(e){return tt(e,r,n)})})})}function Li(e,t){var n=(t=void 0===t?" ":Yr(t)).length;if(n<2)return n?kr(t,e):t;var r=kr(t,Jt(e/zt(t)));return kt(t)?ui(Wt(r),0,e).join(""):r.slice(0,e)}function Ri(e){return function(t,n,r){return r&&"number"!=typeof r&&lo(t,n,r)&&(n=r=void 0),t=ra(t),void 0===n?(n=t,t=0):n=ra(n),function(e,t,n,r){for(var i=-1,o=ln(Jt((t-e)/(n||1)),0),l=Z(o);o--;)l[r?o:++i]=e,e+=n;return l}(t,n,r=void 0===r?t<n?1:-1:ra(r),e)}}function xi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=la(t),n=la(n)),e(t,n)}}function Pi(e,t,n,r,i,o,l,a,u,c){var s=8&t;t|=s?32:64,4&(t&=~(s?64:32))||(t&=-4);var d=[e,t,i,s?o:void 0,s?l:void 0,s?void 0:o,s?void 0:l,a,u,c],f=n.apply(void 0,d);return uo(e)&&Eo(f,d),f.placeholder=r,bo(f,e,t)}function Mi(e){var t=me[e];return function(e,n){if(e=la(e),(n=null==n?0:an(ia(n),292))&&nn(e)){var r=(ua(e)+"e").split("e");return+((r=(ua(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var ki=pn&&1/Ft(new pn([,-0]))[1]==1/0?function(e){return new pn(e)}:Ja;function Ui(e){return function(t){var n=to(t);return n==f?Ut(t):n==g?Vt(t):function(e,t){return ct(t,function(t){return[t,e[t]]})}(t,e(t))}}function Bi(e,t,i,o,l,a,u,c){var s=2&t;if(!s&&"function"!=typeof e)throw new he(n);var d=o?o.length:0;if(d||(t&=-97,o=l=void 0),u=void 0===u?u:ln(ia(u),0),c=void 0===c?c:ia(c),d-=l?l.length:0,64&t){var f=o,m=l;o=l=void 0}var v=s?void 0:qi(e),p=[e,t,i,o,l,f,m,a,u,c];if(v&&function(e,t){var n=e[1],i=t[1],o=n|i;if(!(o<131||128==i&&8==n||128==i&&256==n&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==n))return e;1&i&&(e[2]=t[2],o|=1&n?0:4);var l=t[3];if(l){var a=e[3];e[3]=a?vi(a,l,t[4]):l,e[4]=a?jt(e[3],r):t[4]}(l=t[5])&&(e[5]=(a=e[5])?pi(a,l,t[6]):l,e[6]=a?jt(e[5],r):t[6]),(l=t[7])&&(e[7]=l),128&i&&(e[8]=null==e[8]?t[8]:an(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(p,v),e=p[0],t=p[1],i=p[2],o=p[3],l=p[4],!(c=p[9]=void 0===p[9]?s?0:e.length:ln(p[9]-d,0))&&24&t&&(t&=-25),t&&1!=t)g=8==t||16==t?function(e,t,n){var r=Si(e);return function i(){for(var o=arguments.length,l=Z(o),a=o,u=Xi(i);a--;)l[a]=arguments[a];var c=o<3&&l[0]!==u&&l[o-1]!==u?[]:jt(l,u);if((o-=c.length)<n)return Pi(e,t,Ii,i.placeholder,void 0,l,c,void 0,void 0,n-o);var s=this&&this!==We&&this instanceof i?r:e;return tt(s,this,l)}}(e,t,c):32!=t&&33!=t||l.length?Ii.apply(void 0,p):function(e,t,n,r){var i=1&t,o=Si(e);return function t(){for(var l=-1,a=arguments.length,u=-1,c=r.length,s=Z(c+a),d=this&&this!==We&&this instanceof t?o:e;++u<c;)s[u]=r[u];for(;a--;)s[u++]=arguments[++l];return tt(d,i?n:this,s)}}(e,t,i,o);else var g=function(e,t,n){var r=1&t,i=Si(e);return function t(){var o=this&&this!==We&&this instanceof t?i:e;return o.apply(r?n:this,arguments)}}(e,t,i);return bo((v?Vr:Eo)(g,p),e,t)}function ji(e,t,n,r){return void 0===e||Al(e,ye[n])&&!Ce.call(r,n)?t:e}function Fi(e,t,n,r,i,o){return Hl(e)&&Hl(t)&&(o.set(t,e),Tr(e,t,void 0,Fi,o),o.delete(t)),e}function Vi(e){return Xl(e)?void 0:e}function zi(e,t,n,r,i,o){var l=1&n,a=e.length,u=t.length;if(a!=u&&!(l&&u>a))return!1;var c=o.get(e),s=o.get(t);if(c&&s)return c==t&&s==e;var d=-1,f=!0,m=2&n?new kn:void 0;for(o.set(e,t),o.set(t,e);++d<a;){var v=e[d],p=t[d];if(r)var g=l?r(p,v,d,t,e,o):r(v,p,d,e,t,o);if(void 0!==g){if(g)continue;f=!1;break}if(m){if(!mt(t,function(e,t){if(!Tt(m,t)&&(v===e||i(v,e,n,r,o)))return m.push(t)})){f=!1;break}}else if(v!==p&&!i(v,p,n,r,o)){f=!1;break}}return o.delete(e),o.delete(t),f}function Wi(e){return _o(vo(e,void 0,Mo),e+"")}function Hi(e){return fr(e,ba,Qi)}function Gi(e){return fr(e,Ca,eo)}var qi=En?function(e){return En.get(e)}:Ja;function Zi(e){for(var t=e.name+"",n=yn[t],r=Ce.call(yn,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function Xi(e){return(Ce.call(Dn,"placeholder")?Dn:e).placeholder}function $i(){var e=Dn.iteratee||Xa;return e=e===Xa?Or:e,arguments.length?e(arguments[0],arguments[1]):e}function Yi(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Ki(e){for(var t=ba(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,fo(i)]}return t}function Ji(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Cr(n)?n:void 0}var Qi=en?function(e){return null==e?[]:(e=ve(e),lt(en(e),function(t){return Ze.call(e,t)}))}:ou,eo=en?function(e){for(var t=[];e;)st(t,Qi(e)),e=He(e);return t}:ou,to=mr;function no(e,t,n){for(var r=-1,i=(t=li(t,e)).length,o=!1;++r<i;){var l=Io(t[r]);if(!(o=null!=e&&n(e,l)))break;e=e[l]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Wl(i)&&oo(l,i)&&(Pl(e)||xl(e))}function ro(e){return"function"!=typeof e.constructor||so(e)?{}:Tn(He(e))}function io(e){return Pl(e)||xl(e)||!!(vt&&e&&e[vt])}function oo(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&le.test(e))&&e>-1&&e%1==0&&e<t}function lo(e,t,n){if(!Hl(n))return!1;var r=typeof t;return!!("number"==r?kl(n)&&oo(t,n.length):"string"==r&&t in n)&&Al(n[t],e)}function ao(e,t){if(Pl(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Jl(e))||z.test(e)||!V.test(e)||null!=t&&e in ve(t)}function uo(e){var t=Zi(e),n=Dn[t];if("function"!=typeof n||!(t in Rn.prototype))return!1;if(e===n)return!0;var r=qi(n);return!!r&&e===r[0]}(fn&&to(new fn(new ArrayBuffer(1)))!=b||mn&&to(new mn)!=f||vn&&"[object Promise]"!=to(vn.resolve())||pn&&to(new pn)!=g||gn&&to(new gn)!=y)&&(to=function(e){var t=mr(e),n=t==v?e.constructor:void 0,r=n?Do(n):"";if(r)switch(r){case _n:return b;case bn:return f;case Cn:return"[object Promise]";case On:return g;case Sn:return y}return t});var co=_e?Vl:lu;function so(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ye)}function fo(e){return e==e&&!Hl(e)}function mo(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in ve(n))}}function vo(e,t,n){return t=ln(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=ln(r.length-t,0),l=Z(o);++i<o;)l[i]=r[t+i];i=-1;for(var a=Z(t+1);++i<t;)a[i]=r[i];return a[t]=n(l),tt(e,this,a)}}function po(e,t){return t.length<2?e:dr(e,Hr(t,0,-1))}function go(e,t){for(var n=e.length,r=an(t.length,n),i=gi(e);r--;){var o=t[r];e[r]=oo(o,n)?i[o]:void 0}return e}function ho(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Eo=Co(Vr),yo=Kt||function(e,t){return We.setTimeout(e,t)},_o=Co(zr);function bo(e,t,n){var r=t+"";return _o(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(X,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return rt(i,function(n){var r="_."+n[0];t&n[1]&&!at(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match($);return t?t[1].split(Y):[]}(r),n)))}function Co(e){var t=0,n=0;return function(){var r=un(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Oo(e,t){var n=-1,r=e.length,i=r-1;for(t=void 0===t?r:t;++n<t;){var o=Mr(n,i),l=e[o];e[o]=e[n],e[n]=l}return e.length=t,e}var So,wo,No=(So=Sl(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(W,function(e,n,r,i){t.push(r?i.replace(Q,"$1"):n||e)}),t},function(e){return 500===wo.size&&wo.clear(),e}),wo=So.cache,So);function Io(e){if("string"==typeof e||Jl(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Do(e){if(null!=e){try{return be.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function To(e){if(e instanceof Rn)return e.clone();var t=new Ln(e.__wrapped__,e.__chain__);return t.__actions__=gi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Ao=Ur(function(e,t){return Ul(e)?Qn(e,or(t,1,Ul,!0)):[]}),Lo=Ur(function(e,t){var n=Fo(t);return Ul(n)&&(n=void 0),Ul(e)?Qn(e,or(t,1,Ul,!0),$i(n,2)):[]}),Ro=Ur(function(e,t){var n=Fo(t);return Ul(n)&&(n=void 0),Ul(e)?Qn(e,or(t,1,Ul,!0),void 0,n):[]});function xo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ia(n);return i<0&&(i=ln(r+i,0)),gt(e,$i(t,3),i)}function Po(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return void 0!==n&&(i=ia(n),i=n<0?ln(r+i,0):an(i,r-1)),gt(e,$i(t,3),i,!0)}function Mo(e){return null!=e&&e.length?or(e,1):[]}function ko(e){return e&&e.length?e[0]:void 0}var Uo=Ur(function(e){var t=ct(e,ii);return t.length&&t[0]===e[0]?hr(t):[]}),Bo=Ur(function(e){var t=Fo(e),n=ct(e,ii);return t===Fo(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?hr(n,$i(t,2)):[]}),jo=Ur(function(e){var t=Fo(e),n=ct(e,ii);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?hr(n,void 0,t):[]});function Fo(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Vo=Ur(zo);function zo(e,t){return e&&e.length&&t&&t.length?xr(e,t):e}var Wo=Wi(function(e,t){var n=null==e?0:e.length,r=Xn(e,t);return Pr(e,ct(t,function(e){return oo(e,n)?+e:e}).sort(mi)),r});function Ho(e){return null==e?e:dn.call(e)}var Go=Ur(function(e){return Kr(or(e,1,Ul,!0))}),qo=Ur(function(e){var t=Fo(e);return Ul(t)&&(t=void 0),Kr(or(e,1,Ul,!0),$i(t,2))}),Zo=Ur(function(e){var t=Fo(e);return t="function"==typeof t?t:void 0,Kr(or(e,1,Ul,!0),void 0,t)});function Xo(e){if(!e||!e.length)return[];var t=0;return e=lt(e,function(e){if(Ul(e))return t=ln(e.length,t),!0}),wt(t,function(t){return ct(e,bt(t))})}function $o(e,t){if(!e||!e.length)return[];var n=Xo(e);return null==t?n:ct(n,function(e){return tt(t,void 0,e)})}var Yo=Ur(function(e,t){return Ul(e)?Qn(e,t):[]}),Ko=Ur(function(e){return ni(lt(e,Ul))}),Jo=Ur(function(e){var t=Fo(e);return Ul(t)&&(t=void 0),ni(lt(e,Ul),$i(t,2))}),Qo=Ur(function(e){var t=Fo(e);return t="function"==typeof t?t:void 0,ni(lt(e,Ul),void 0,t)}),el=Ur(Xo),tl=Ur(function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,$o(e,n)});function nl(e){var t=Dn(e);return t.__chain__=!0,t}function rl(e,t){return t(e)}var il=Wi(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return Xn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Rn&&oo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:rl,args:[i],thisArg:void 0}),new Ln(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(void 0),e})):this.thru(i)}),ol=Ei(function(e,t,n){Ce.call(e,n)?++e[n]:Zn(e,n,1)}),ll=wi(xo),al=wi(Po);function ul(e,t){return(Pl(e)?rt:er)(e,$i(t,3))}function cl(e,t){return(Pl(e)?it:tr)(e,$i(t,3))}var sl=Ei(function(e,t,n){Ce.call(e,n)?e[n].push(t):Zn(e,n,[t])}),dl=Ur(function(e,t,n){var r=-1,i="function"==typeof t,o=kl(e)?Z(e.length):[];return er(e,function(e){o[++r]=i?tt(t,e,n):Er(e,t,n)}),o}),fl=Ei(function(e,t,n){Zn(e,n,t)});function ml(e,t){return(Pl(e)?ct:Nr)(e,$i(t,3))}var vl=Ei(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),pl=Ur(function(e,t){if(null==e)return[];var n=t.length;return n>1&&lo(e,t[0],t[1])?t=[]:n>2&&lo(t[0],t[1],t[2])&&(t=[t[0]]),Lr(e,or(t,1),[])}),gl=Yt||function(){return We.Date.now()};function hl(e,t,n){return t=n?void 0:t,Bi(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function El(e,t){var r;if("function"!=typeof t)throw new he(n);return e=ia(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=void 0),r}}var yl=Ur(function(e,t,n){var r=1;if(n.length){var i=jt(n,Xi(yl));r|=32}return Bi(e,r,t,n,i)}),_l=Ur(function(e,t,n){var r=3;if(n.length){var i=jt(n,Xi(_l));r|=32}return Bi(t,r,e,n,i)});function bl(e,t,r){var i,o,l,a,u,c,s=0,d=!1,f=!1,m=!0;if("function"!=typeof e)throw new he(n);function v(t){var n=i,r=o;return i=o=void 0,s=t,a=e.apply(r,n)}function p(e){return s=e,u=yo(h,t),d?v(e):a}function g(e){var n=e-c;return void 0===c||n>=t||n<0||f&&e-s>=l}function h(){var e=gl();if(g(e))return E(e);u=yo(h,function(e){var n=t-(e-c);return f?an(n,l-(e-s)):n}(e))}function E(e){return u=void 0,m&&i?v(e):(i=o=void 0,a)}function y(){var e=gl(),n=g(e);if(i=arguments,o=this,c=e,n){if(void 0===u)return p(c);if(f)return ci(u),u=yo(h,t),v(c)}return void 0===u&&(u=yo(h,t)),a}return t=la(t)||0,Hl(r)&&(d=!!r.leading,l=(f="maxWait"in r)?ln(la(r.maxWait)||0,t):l,m="trailing"in r?!!r.trailing:m),y.cancel=function(){void 0!==u&&ci(u),s=0,i=c=o=u=void 0},y.flush=function(){return void 0===u?a:E(gl())},y}var Cl=Ur(function(e,t){return Jn(e,1,t)}),Ol=Ur(function(e,t,n){return Jn(e,la(t)||0,n)});function Sl(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new he(n);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var l=e.apply(this,n);return r.cache=o.set(i,l)||o,l};return r.cache=new(Sl.Cache||Mn),r}function wl(e){if("function"!=typeof e)throw new he(n);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Sl.Cache=Mn;var Nl=ai(function(e,t){var n=(t=1==t.length&&Pl(t[0])?ct(t[0],It($i())):ct(or(t,1),It($i()))).length;return Ur(function(r){for(var i=-1,o=an(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return tt(e,this,r)})}),Il=Ur(function(e,t){return Bi(e,32,void 0,t,jt(t,Xi(Il)))}),Dl=Ur(function(e,t){return Bi(e,64,void 0,t,jt(t,Xi(Dl)))}),Tl=Wi(function(e,t){return Bi(e,256,void 0,void 0,void 0,t)});function Al(e,t){return e===t||e!=e&&t!=t}var Ll=xi(vr),Rl=xi(function(e,t){return e>=t}),xl=yr(function(){return arguments}())?yr:function(e){return Gl(e)&&Ce.call(e,"callee")&&!Ze.call(e,"callee")},Pl=Z.isArray,Ml=$e?It($e):function(e){return Gl(e)&&mr(e)==_};function kl(e){return null!=e&&Wl(e.length)&&!Vl(e)}function Ul(e){return Gl(e)&&kl(e)}var Bl=tn||lu,jl=Ye?It(Ye):function(e){return Gl(e)&&mr(e)==u};function Fl(e){if(!Gl(e))return!1;var t=mr(e);return t==c||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Xl(e)}function Vl(e){if(!Hl(e))return!1;var t=mr(e);return t==s||t==d||"[object AsyncFunction]"==t||"[object Proxy]"==t}function zl(e){return"number"==typeof e&&e==ia(e)}function Wl(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Hl(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Gl(e){return null!=e&&"object"==typeof e}var ql=Ke?It(Ke):function(e){return Gl(e)&&to(e)==f};function Zl(e){return"number"==typeof e||Gl(e)&&mr(e)==m}function Xl(e){if(!Gl(e)||mr(e)!=v)return!1;var t=He(e);if(null===t)return!0;var n=Ce.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&be.call(n)==Ne}var $l=Je?It(Je):function(e){return Gl(e)&&mr(e)==p},Yl=Qe?It(Qe):function(e){return Gl(e)&&to(e)==g};function Kl(e){return"string"==typeof e||!Pl(e)&&Gl(e)&&mr(e)==h}function Jl(e){return"symbol"==typeof e||Gl(e)&&mr(e)==E}var Ql=et?It(et):function(e){return Gl(e)&&Wl(e.length)&&!!ke[mr(e)]},ea=xi(wr),ta=xi(function(e,t){return e<=t});function na(e){if(!e)return[];if(kl(e))return Kl(e)?Wt(e):gi(e);if(Ct&&e[Ct])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ct]());var t=to(e);return(t==f?Ut:t==g?Ft:Aa)(e)}function ra(e){return e?(e=la(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ia(e){var t=ra(e),n=t%1;return t==t?n?t-n:t:0}function oa(e){return e?$n(ia(e),0,4294967295):0}function la(e){if("number"==typeof e)return e;if(Jl(e))return NaN;if(Hl(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Hl(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Nt(e);var n=re.test(e);return n||oe.test(e)?Fe(e.slice(2),n?2:8):ne.test(e)?NaN:+e}function aa(e){return hi(e,Ca(e))}function ua(e){return null==e?"":Yr(e)}var ca=yi(function(e,t){if(so(t)||kl(t))hi(t,ba(t),e);else for(var n in t)Ce.call(t,n)&&Wn(e,n,t[n])}),sa=yi(function(e,t){hi(t,Ca(t),e)}),da=yi(function(e,t,n,r){hi(t,Ca(t),e,r)}),fa=yi(function(e,t,n,r){hi(t,ba(t),e,r)}),ma=Wi(Xn),va=Ur(function(e,t){e=ve(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&lo(t[0],t[1],i)&&(r=1);++n<r;)for(var o=t[n],l=Ca(o),a=-1,u=l.length;++a<u;){var c=l[a],s=e[c];(void 0===s||Al(s,ye[c])&&!Ce.call(e,c))&&(e[c]=o[c])}return e}),pa=Ur(function(e){return e.push(void 0,Fi),tt(Sa,void 0,e)});function ga(e,t,n){var r=null==e?void 0:dr(e,t);return void 0===r?n:r}function ha(e,t){return null!=e&&no(e,t,gr)}var Ea=Di(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=we.call(t)),e[t]=n},Ha(Za)),ya=Di(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=we.call(t)),Ce.call(e,t)?e[t].push(n):e[t]=[n]},$i),_a=Ur(Er);function ba(e){return kl(e)?Bn(e):Sr(e)}function Ca(e){return kl(e)?Bn(e,!0):function(e){if(!Hl(e))return function(e){var t=[];if(null!=e)for(var n in ve(e))t.push(n);return t}(e);var t=so(e),n=[];for(var r in e)("constructor"!=r||!t&&Ce.call(e,r))&&n.push(r);return n}(e)}var Oa=yi(function(e,t,n){Tr(e,t,n)}),Sa=yi(function(e,t,n,r){Tr(e,t,n,r)}),wa=Wi(function(e,t){var n={};if(null==e)return n;var r=!1;t=ct(t,function(t){return t=li(t,e),r||(r=t.length>1),t}),hi(e,Gi(e),n),r&&(n=Yn(n,7,Vi));for(var i=t.length;i--;)Jr(n,t[i]);return n}),Na=Wi(function(e,t){return null==e?{}:function(e,t){return Rr(e,t,function(t,n){return ha(e,n)})}(e,t)});function Ia(e,t){if(null==e)return{};var n=ct(Gi(e),function(e){return[e]});return t=$i(t),Rr(e,n,function(e,n){return t(e,n[0])})}var Da=Ui(ba),Ta=Ui(Ca);function Aa(e){return null==e?[]:Dt(e,ba(e))}var La=Oi(function(e,t,n){return t=t.toLowerCase(),e+(n?Ra(t):t)});function Ra(e){return Fa(ua(e).toLowerCase())}function xa(e){return(e=ua(e))&&e.replace(ae,xt).replace(Te,"")}var Pa=Oi(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Ma=Oi(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),ka=Ci("toLowerCase"),Ua=Oi(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Ba=Oi(function(e,t,n){return e+(n?" ":"")+Fa(t)}),ja=Oi(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Fa=Ci("toUpperCase");function Va(e,t,n){return e=ua(e),void 0===(t=n?void 0:t)?function(e){return xe.test(e)}(e)?function(e){return e.match(Le)||[]}(e):function(e){return e.match(K)||[]}(e):e.match(t)||[]}var za=Ur(function(e,t){try{return tt(e,void 0,t)}catch(e){return Fl(e)?e:new de(e)}}),Wa=Wi(function(e,t){return rt(t,function(t){t=Io(t),Zn(e,t,yl(e[t],e))}),e});function Ha(e){return function(){return e}}var Ga=Ni(),qa=Ni(!0);function Za(e){return e}function Xa(e){return Or("function"==typeof e?e:Yn(e,1))}var $a=Ur(function(e,t){return function(n){return Er(n,e,t)}}),Ya=Ur(function(e,t){return function(n){return Er(e,n,t)}});function Ka(e,t,n){var r=ba(t),i=sr(t,r);null!=n||Hl(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=sr(t,ba(t)));var o=!(Hl(n)&&"chain"in n&&!n.chain),l=Vl(e);return rt(i,function(n){var r=t[n];e[n]=r,l&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=gi(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,st([this.value()],arguments))})}),e}function Ja(){}var Qa=Ai(ct),eu=Ai(ot),tu=Ai(mt);function nu(e){return ao(e)?bt(Io(e)):function(e){return function(t){return dr(t,e)}}(e)}var ru=Ri(),iu=Ri(!0);function ou(){return[]}function lu(){return!1}var au,uu=Ti(function(e,t){return e+t},0),cu=Mi("ceil"),su=Ti(function(e,t){return e/t},1),du=Mi("floor"),fu=Ti(function(e,t){return e*t},1),mu=Mi("round"),vu=Ti(function(e,t){return e-t},0);return Dn.after=function(e,t){if("function"!=typeof t)throw new he(n);return e=ia(e),function(){if(--e<1)return t.apply(this,arguments)}},Dn.ary=hl,Dn.assign=ca,Dn.assignIn=sa,Dn.assignInWith=da,Dn.assignWith=fa,Dn.at=ma,Dn.before=El,Dn.bind=yl,Dn.bindAll=Wa,Dn.bindKey=_l,Dn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Pl(e)?e:[e]},Dn.chain=nl,Dn.chunk=function(e,t,n){t=(n?lo(e,t,n):void 0===t)?1:ln(ia(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var i=0,o=0,l=Z(Jt(r/t));i<r;)l[o++]=Hr(e,i,i+=t);return l},Dn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Dn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=Z(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return st(Pl(n)?gi(n):[n],or(t,1))},Dn.cond=function(e){var t=null==e?0:e.length,r=$i();return e=t?ct(e,function(e){if("function"!=typeof e[1])throw new he(n);return[r(e[0]),e[1]]}):[],Ur(function(n){for(var r=-1;++r<t;){var i=e[r];if(tt(i[0],this,n))return tt(i[1],this,n)}})},Dn.conforms=function(e){return function(e){var t=ba(e);return function(n){return Kn(n,e,t)}}(Yn(e,1))},Dn.constant=Ha,Dn.countBy=ol,Dn.create=function(e,t){var n=Tn(e);return null==t?n:qn(n,t)},Dn.curry=function e(t,n,r){var i=Bi(t,8,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=e.placeholder,i},Dn.curryRight=function e(t,n,r){var i=Bi(t,16,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=e.placeholder,i},Dn.debounce=bl,Dn.defaults=va,Dn.defaultsDeep=pa,Dn.defer=Cl,Dn.delay=Ol,Dn.difference=Ao,Dn.differenceBy=Lo,Dn.differenceWith=Ro,Dn.drop=function(e,t,n){var r=null==e?0:e.length;return r?Hr(e,(t=n||void 0===t?1:ia(t))<0?0:t,r):[]},Dn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?Hr(e,0,(t=r-(t=n||void 0===t?1:ia(t)))<0?0:t):[]},Dn.dropRightWhile=function(e,t){return e&&e.length?ei(e,$i(t,3),!0,!0):[]},Dn.dropWhile=function(e,t){return e&&e.length?ei(e,$i(t,3),!0):[]},Dn.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&lo(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=ia(n))<0&&(n=-n>i?0:i+n),(r=void 0===r||r>i?i:ia(r))<0&&(r+=i),r=n>r?0:oa(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Dn.filter=function(e,t){return(Pl(e)?lt:ir)(e,$i(t,3))},Dn.flatMap=function(e,t){return or(ml(e,t),1)},Dn.flatMapDeep=function(e,t){return or(ml(e,t),1/0)},Dn.flatMapDepth=function(e,t,n){return n=void 0===n?1:ia(n),or(ml(e,t),n)},Dn.flatten=Mo,Dn.flattenDeep=function(e){return null!=e&&e.length?or(e,1/0):[]},Dn.flattenDepth=function(e,t){return null!=e&&e.length?or(e,t=void 0===t?1:ia(t)):[]},Dn.flip=function(e){return Bi(e,512)},Dn.flow=Ga,Dn.flowRight=qa,Dn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Dn.functions=function(e){return null==e?[]:sr(e,ba(e))},Dn.functionsIn=function(e){return null==e?[]:sr(e,Ca(e))},Dn.groupBy=sl,Dn.initial=function(e){return null!=e&&e.length?Hr(e,0,-1):[]},Dn.intersection=Uo,Dn.intersectionBy=Bo,Dn.intersectionWith=jo,Dn.invert=Ea,Dn.invertBy=ya,Dn.invokeMap=dl,Dn.iteratee=Xa,Dn.keyBy=fl,Dn.keys=ba,Dn.keysIn=Ca,Dn.map=ml,Dn.mapKeys=function(e,t){var n={};return t=$i(t,3),ur(e,function(e,r,i){Zn(n,t(e,r,i),e)}),n},Dn.mapValues=function(e,t){var n={};return t=$i(t,3),ur(e,function(e,r,i){Zn(n,r,t(e,r,i))}),n},Dn.matches=function(e){return Ir(Yn(e,1))},Dn.matchesProperty=function(e,t){return Dr(e,Yn(t,1))},Dn.memoize=Sl,Dn.merge=Oa,Dn.mergeWith=Sa,Dn.method=$a,Dn.methodOf=Ya,Dn.mixin=Ka,Dn.negate=wl,Dn.nthArg=function(e){return e=ia(e),Ur(function(t){return Ar(t,e)})},Dn.omit=wa,Dn.omitBy=function(e,t){return Ia(e,wl($i(t)))},Dn.once=function(e){return El(2,e)},Dn.orderBy=function(e,t,n,r){return null==e?[]:(Pl(t)||(t=null==t?[]:[t]),Pl(n=r?void 0:n)||(n=null==n?[]:[n]),Lr(e,t,n))},Dn.over=Qa,Dn.overArgs=Nl,Dn.overEvery=eu,Dn.overSome=tu,Dn.partial=Il,Dn.partialRight=Dl,Dn.partition=vl,Dn.pick=Na,Dn.pickBy=Ia,Dn.property=nu,Dn.propertyOf=function(e){return function(t){return null==e?void 0:dr(e,t)}},Dn.pull=Vo,Dn.pullAll=zo,Dn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?xr(e,t,$i(n,2)):e},Dn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?xr(e,t,void 0,n):e},Dn.pullAt=Wo,Dn.range=ru,Dn.rangeRight=iu,Dn.rearg=Tl,Dn.reject=function(e,t){return(Pl(e)?lt:ir)(e,wl($i(t,3)))},Dn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=$i(t,3);++r<o;){var l=e[r];t(l,r,e)&&(n.push(l),i.push(r))}return Pr(e,i),n},Dn.rest=function(e,t){if("function"!=typeof e)throw new he(n);return Ur(e,t=void 0===t?t:ia(t))},Dn.reverse=Ho,Dn.sampleSize=function(e,t,n){return t=(n?lo(e,t,n):void 0===t)?1:ia(t),(Pl(e)?Fn:jr)(e,t)},Dn.set=function(e,t,n){return null==e?e:Fr(e,t,n)},Dn.setWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:Fr(e,t,n,r)},Dn.shuffle=function(e){return(Pl(e)?Vn:Wr)(e)},Dn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&lo(e,t,n)?(t=0,n=r):(t=null==t?0:ia(t),n=void 0===n?r:ia(n)),Hr(e,t,n)):[]},Dn.sortBy=pl,Dn.sortedUniq=function(e){return e&&e.length?Xr(e):[]},Dn.sortedUniqBy=function(e,t){return e&&e.length?Xr(e,$i(t,2)):[]},Dn.split=function(e,t,n){return n&&"number"!=typeof n&&lo(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=ua(e))&&("string"==typeof t||null!=t&&!$l(t))&&!(t=Yr(t))&&kt(e)?ui(Wt(e),0,n):e.split(t,n):[]},Dn.spread=function(e,t){if("function"!=typeof e)throw new he(n);return t=null==t?0:ln(ia(t),0),Ur(function(n){var r=n[t],i=ui(n,0,t);return r&&st(i,r),tt(e,this,i)})},Dn.tail=function(e){var t=null==e?0:e.length;return t?Hr(e,1,t):[]},Dn.take=function(e,t,n){return e&&e.length?Hr(e,0,(t=n||void 0===t?1:ia(t))<0?0:t):[]},Dn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Hr(e,(t=r-(t=n||void 0===t?1:ia(t)))<0?0:t,r):[]},Dn.takeRightWhile=function(e,t){return e&&e.length?ei(e,$i(t,3),!1,!0):[]},Dn.takeWhile=function(e,t){return e&&e.length?ei(e,$i(t,3)):[]},Dn.tap=function(e,t){return t(e),e},Dn.throttle=function(e,t,r){var i=!0,o=!0;if("function"!=typeof e)throw new he(n);return Hl(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),bl(e,t,{leading:i,maxWait:t,trailing:o})},Dn.thru=rl,Dn.toArray=na,Dn.toPairs=Da,Dn.toPairsIn=Ta,Dn.toPath=function(e){return Pl(e)?ct(e,Io):Jl(e)?[e]:gi(No(ua(e)))},Dn.toPlainObject=aa,Dn.transform=function(e,t,n){var r=Pl(e),i=r||Bl(e)||Ql(e);if(t=$i(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Hl(e)&&Vl(o)?Tn(He(e)):{}}return(i?rt:ur)(e,function(e,r,i){return t(n,e,r,i)}),n},Dn.unary=function(e){return hl(e,1)},Dn.union=Go,Dn.unionBy=qo,Dn.unionWith=Zo,Dn.uniq=function(e){return e&&e.length?Kr(e):[]},Dn.uniqBy=function(e,t){return e&&e.length?Kr(e,$i(t,2)):[]},Dn.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Kr(e,void 0,t):[]},Dn.unset=function(e,t){return null==e||Jr(e,t)},Dn.unzip=Xo,Dn.unzipWith=$o,Dn.update=function(e,t,n){return null==e?e:Qr(e,t,oi(n))},Dn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:Qr(e,t,oi(n),r)},Dn.values=Aa,Dn.valuesIn=function(e){return null==e?[]:Dt(e,Ca(e))},Dn.without=Yo,Dn.words=Va,Dn.wrap=function(e,t){return Il(oi(t),e)},Dn.xor=Ko,Dn.xorBy=Jo,Dn.xorWith=Qo,Dn.zip=el,Dn.zipObject=function(e,t){return ri(e||[],t||[],Wn)},Dn.zipObjectDeep=function(e,t){return ri(e||[],t||[],Fr)},Dn.zipWith=tl,Dn.entries=Da,Dn.entriesIn=Ta,Dn.extend=sa,Dn.extendWith=da,Ka(Dn,Dn),Dn.add=uu,Dn.attempt=za,Dn.camelCase=La,Dn.capitalize=Ra,Dn.ceil=cu,Dn.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=la(n))==n?n:0),void 0!==t&&(t=(t=la(t))==t?t:0),$n(la(e),t,n)},Dn.clone=function(e){return Yn(e,4)},Dn.cloneDeep=function(e){return Yn(e,5)},Dn.cloneDeepWith=function(e,t){return Yn(e,5,t="function"==typeof t?t:void 0)},Dn.cloneWith=function(e,t){return Yn(e,4,t="function"==typeof t?t:void 0)},Dn.conformsTo=function(e,t){return null==t||Kn(e,t,ba(t))},Dn.deburr=xa,Dn.defaultTo=function(e,t){return null==e||e!=e?t:e},Dn.divide=su,Dn.endsWith=function(e,t,n){e=ua(e),t=Yr(t);var r=e.length,i=n=void 0===n?r:$n(ia(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Dn.eq=Al,Dn.escape=function(e){return(e=ua(e))&&U.test(e)?e.replace(P,Pt):e},Dn.escapeRegExp=function(e){return(e=ua(e))&&G.test(e)?e.replace(H,"\\$&"):e},Dn.every=function(e,t,n){var r=Pl(e)?ot:nr;return n&&lo(e,t,n)&&(t=void 0),r(e,$i(t,3))},Dn.find=ll,Dn.findIndex=xo,Dn.findKey=function(e,t){return pt(e,$i(t,3),ur)},Dn.findLast=al,Dn.findLastIndex=Po,Dn.findLastKey=function(e,t){return pt(e,$i(t,3),cr)},Dn.floor=du,Dn.forEach=ul,Dn.forEachRight=cl,Dn.forIn=function(e,t){return null==e?e:lr(e,$i(t,3),Ca)},Dn.forInRight=function(e,t){return null==e?e:ar(e,$i(t,3),Ca)},Dn.forOwn=function(e,t){return e&&ur(e,$i(t,3))},Dn.forOwnRight=function(e,t){return e&&cr(e,$i(t,3))},Dn.get=ga,Dn.gt=Ll,Dn.gte=Rl,Dn.has=function(e,t){return null!=e&&no(e,t,pr)},Dn.hasIn=ha,Dn.head=ko,Dn.identity=Za,Dn.includes=function(e,t,n,r){e=kl(e)?e:Aa(e),n=n&&!r?ia(n):0;var i=e.length;return n<0&&(n=ln(i+n,0)),Kl(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&ht(e,t,n)>-1},Dn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ia(n);return i<0&&(i=ln(r+i,0)),ht(e,t,i)},Dn.inRange=function(e,t,n){return t=ra(t),void 0===n?(n=t,t=0):n=ra(n),function(e,t,n){return e>=an(t,n)&&e<ln(t,n)}(e=la(e),t,n)},Dn.invoke=_a,Dn.isArguments=xl,Dn.isArray=Pl,Dn.isArrayBuffer=Ml,Dn.isArrayLike=kl,Dn.isArrayLikeObject=Ul,Dn.isBoolean=function(e){return!0===e||!1===e||Gl(e)&&mr(e)==a},Dn.isBuffer=Bl,Dn.isDate=jl,Dn.isElement=function(e){return Gl(e)&&1===e.nodeType&&!Xl(e)},Dn.isEmpty=function(e){if(null==e)return!0;if(kl(e)&&(Pl(e)||"string"==typeof e||"function"==typeof e.splice||Bl(e)||Ql(e)||xl(e)))return!e.length;var t=to(e);if(t==f||t==g)return!e.size;if(so(e))return!Sr(e).length;for(var n in e)if(Ce.call(e,n))return!1;return!0},Dn.isEqual=function(e,t){return _r(e,t)},Dn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===r?_r(e,t,void 0,n):!!r},Dn.isError=Fl,Dn.isFinite=function(e){return"number"==typeof e&&nn(e)},Dn.isFunction=Vl,Dn.isInteger=zl,Dn.isLength=Wl,Dn.isMap=ql,Dn.isMatch=function(e,t){return e===t||br(e,t,Ki(t))},Dn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:void 0,br(e,t,Ki(t),n)},Dn.isNaN=function(e){return Zl(e)&&e!=+e},Dn.isNative=function(e){if(co(e))throw new de("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Cr(e)},Dn.isNil=function(e){return null==e},Dn.isNull=function(e){return null===e},Dn.isNumber=Zl,Dn.isObject=Hl,Dn.isObjectLike=Gl,Dn.isPlainObject=Xl,Dn.isRegExp=$l,Dn.isSafeInteger=function(e){return zl(e)&&e>=-9007199254740991&&e<=9007199254740991},Dn.isSet=Yl,Dn.isString=Kl,Dn.isSymbol=Jl,Dn.isTypedArray=Ql,Dn.isUndefined=function(e){return void 0===e},Dn.isWeakMap=function(e){return Gl(e)&&to(e)==y},Dn.isWeakSet=function(e){return Gl(e)&&"[object WeakSet]"==mr(e)},Dn.join=function(e,t){return null==e?"":rn.call(e,t)},Dn.kebabCase=Pa,Dn.last=Fo,Dn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return void 0!==n&&(i=(i=ia(n))<0?ln(r+i,0):an(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):gt(e,yt,i,!0)},Dn.lowerCase=Ma,Dn.lowerFirst=ka,Dn.lt=ea,Dn.lte=ta,Dn.max=function(e){return e&&e.length?rr(e,Za,vr):void 0},Dn.maxBy=function(e,t){return e&&e.length?rr(e,$i(t,2),vr):void 0},Dn.mean=function(e){return _t(e,Za)},Dn.meanBy=function(e,t){return _t(e,$i(t,2))},Dn.min=function(e){return e&&e.length?rr(e,Za,wr):void 0},Dn.minBy=function(e,t){return e&&e.length?rr(e,$i(t,2),wr):void 0},Dn.stubArray=ou,Dn.stubFalse=lu,Dn.stubObject=function(){return{}},Dn.stubString=function(){return""},Dn.stubTrue=function(){return!0},Dn.multiply=fu,Dn.nth=function(e,t){return e&&e.length?Ar(e,ia(t)):void 0},Dn.noConflict=function(){return We._===this&&(We._=Ie),this},Dn.noop=Ja,Dn.now=gl,Dn.pad=function(e,t,n){e=ua(e);var r=(t=ia(t))?zt(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Li(Qt(i),n)+e+Li(Jt(i),n)},Dn.padEnd=function(e,t,n){e=ua(e);var r=(t=ia(t))?zt(e):0;return t&&r<t?e+Li(t-r,n):e},Dn.padStart=function(e,t,n){e=ua(e);var r=(t=ia(t))?zt(e):0;return t&&r<t?Li(t-r,n)+e:e},Dn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),cn(ua(e).replace(q,""),t||0)},Dn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&lo(e,t,n)&&(t=n=void 0),void 0===n&&("boolean"==typeof t?(n=t,t=void 0):"boolean"==typeof e&&(n=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=ra(e),void 0===t?(t=e,e=0):t=ra(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=sn();return an(e+i*(t-e+je("1e-"+((i+"").length-1))),t)}return Mr(e,t)},Dn.reduce=function(e,t,n){var r=Pl(e)?dt:Ot,i=arguments.length<3;return r(e,$i(t,4),n,i,er)},Dn.reduceRight=function(e,t,n){var r=Pl(e)?ft:Ot,i=arguments.length<3;return r(e,$i(t,4),n,i,tr)},Dn.repeat=function(e,t,n){return t=(n?lo(e,t,n):void 0===t)?1:ia(t),kr(ua(e),t)},Dn.replace=function(){var e=arguments,t=ua(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Dn.result=function(e,t,n){var r=-1,i=(t=li(t,e)).length;for(i||(i=1,e=void 0);++r<i;){var o=null==e?void 0:e[Io(t[r])];void 0===o&&(r=i,o=n),e=Vl(o)?o.call(e):o}return e},Dn.round=mu,Dn.runInContext=e,Dn.sample=function(e){return(Pl(e)?jn:Br)(e)},Dn.size=function(e){if(null==e)return 0;if(kl(e))return Kl(e)?zt(e):e.length;var t=to(e);return t==f||t==g?e.size:Sr(e).length},Dn.snakeCase=Ua,Dn.some=function(e,t,n){var r=Pl(e)?mt:Gr;return n&&lo(e,t,n)&&(t=void 0),r(e,$i(t,3))},Dn.sortedIndex=function(e,t){return qr(e,t)},Dn.sortedIndexBy=function(e,t,n){return Zr(e,t,$i(n,2))},Dn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=qr(e,t);if(r<n&&Al(e[r],t))return r}return-1},Dn.sortedLastIndex=function(e,t){return qr(e,t,!0)},Dn.sortedLastIndexBy=function(e,t,n){return Zr(e,t,$i(n,2),!0)},Dn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=qr(e,t,!0)-1;if(Al(e[n],t))return n}return-1},Dn.startCase=Ba,Dn.startsWith=function(e,t,n){return e=ua(e),n=null==n?0:$n(ia(n),0,e.length),t=Yr(t),e.slice(n,n+t.length)==t},Dn.subtract=vu,Dn.sum=function(e){return e&&e.length?St(e,Za):0},Dn.sumBy=function(e,t){return e&&e.length?St(e,$i(t,2)):0},Dn.template=function(e,t,n){var r=Dn.templateSettings;n&&lo(e,t,n)&&(t=void 0),e=ua(e),t=da({},t,r,ji);var i,o,l=da({},t.imports,r.imports,ji),a=ba(l),u=Dt(l,a),c=0,s=t.interpolate||ue,d="__p += '",f=pe((t.escape||ue).source+"|"+s.source+"|"+(s===F?ee:ue).source+"|"+(t.evaluate||ue).source+"|$","g"),m="//# sourceURL="+(Ce.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Me+"]")+"\n";e.replace(f,function(t,n,r,l,a,u){return r||(r=l),d+=e.slice(c,u).replace(ce,Mt),n&&(i=!0,d+="' +\n__e("+n+") +\n'"),a&&(o=!0,d+="';\n"+a+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+t.length,t}),d+="';\n";var v=Ce.call(t,"variable")&&t.variable;if(v){if(J.test(v))throw new de("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(o?d.replace(A,""):d).replace(L,"$1").replace(R,"$1;"),d="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var p=za(function(){return fe(a,m+"return "+d).apply(void 0,u)});if(p.source=d,Fl(p))throw p;return p},Dn.times=function(e,t){if((e=ia(e))<1||e>9007199254740991)return[];var n=4294967295,r=an(e,4294967295);e-=4294967295;for(var i=wt(r,t=$i(t));++n<e;)t(n);return i},Dn.toFinite=ra,Dn.toInteger=ia,Dn.toLength=oa,Dn.toLower=function(e){return ua(e).toLowerCase()},Dn.toNumber=la,Dn.toSafeInteger=function(e){return e?$n(ia(e),-9007199254740991,9007199254740991):0===e?e:0},Dn.toString=ua,Dn.toUpper=function(e){return ua(e).toUpperCase()},Dn.trim=function(e,t,n){if((e=ua(e))&&(n||void 0===t))return Nt(e);if(!e||!(t=Yr(t)))return e;var r=Wt(e),i=Wt(t);return ui(r,At(r,i),Lt(r,i)+1).join("")},Dn.trimEnd=function(e,t,n){if((e=ua(e))&&(n||void 0===t))return e.slice(0,Ht(e)+1);if(!e||!(t=Yr(t)))return e;var r=Wt(e);return ui(r,0,Lt(r,Wt(t))+1).join("")},Dn.trimStart=function(e,t,n){if((e=ua(e))&&(n||void 0===t))return e.replace(q,"");if(!e||!(t=Yr(t)))return e;var r=Wt(e);return ui(r,At(r,Wt(t))).join("")},Dn.truncate=function(e,t){var n=30,r="...";if(Hl(t)){var i="separator"in t?t.separator:i;n="length"in t?ia(t.length):n,r="omission"in t?Yr(t.omission):r}var o=(e=ua(e)).length;if(kt(e)){var l=Wt(e);o=l.length}if(n>=o)return e;var a=n-zt(r);if(a<1)return r;var u=l?ui(l,0,a).join(""):e.slice(0,a);if(void 0===i)return u+r;if(l&&(a+=u.length-a),$l(i)){if(e.slice(a).search(i)){var c,s=u;for(i.global||(i=pe(i.source,ua(te.exec(i))+"g")),i.lastIndex=0;c=i.exec(s);)var d=c.index;u=u.slice(0,void 0===d?a:d)}}else if(e.indexOf(Yr(i),a)!=a){var f=u.lastIndexOf(i);f>-1&&(u=u.slice(0,f))}return u+r},Dn.unescape=function(e){return(e=ua(e))&&k.test(e)?e.replace(x,Gt):e},Dn.uniqueId=function(e){var t=++Oe;return ua(e)+t},Dn.upperCase=ja,Dn.upperFirst=Fa,Dn.each=ul,Dn.eachRight=cl,Dn.first=ko,Ka(Dn,(au={},ur(Dn,function(e,t){Ce.call(Dn.prototype,t)||(au[t]=e)}),au),{chain:!1}),Dn.VERSION="4.17.21",rt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Dn[e].placeholder=Dn}),rt(["drop","take"],function(e,t){Rn.prototype[e]=function(n){n=void 0===n?1:ln(ia(n),0);var r=this.__filtered__&&!t?new Rn(this):this.clone();return r.__filtered__?r.__takeCount__=an(n,r.__takeCount__):r.__views__.push({size:an(n,4294967295),type:e+(r.__dir__<0?"Right":"")}),r},Rn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),rt(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;Rn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:$i(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),rt(["head","last"],function(e,t){var n="take"+(t?"Right":"");Rn.prototype[e]=function(){return this[n](1).value()[0]}}),rt(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Rn.prototype[e]=function(){return this.__filtered__?new Rn(this):this[n](1)}}),Rn.prototype.compact=function(){return this.filter(Za)},Rn.prototype.find=function(e){return this.filter(e).head()},Rn.prototype.findLast=function(e){return this.reverse().find(e)},Rn.prototype.invokeMap=Ur(function(e,t){return"function"==typeof e?new Rn(this):this.map(function(n){return Er(n,e,t)})}),Rn.prototype.reject=function(e){return this.filter(wl($i(e)))},Rn.prototype.slice=function(e,t){e=ia(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Rn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=ia(t))<0?n.dropRight(-t):n.take(t-e)),n)},Rn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Rn.prototype.toArray=function(){return this.take(4294967295)},ur(Rn.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Dn[r?"take"+("last"==t?"Right":""):t],o=r||/^find/.test(t);i&&(Dn.prototype[t]=function(){var t=this.__wrapped__,l=r?[1]:arguments,a=t instanceof Rn,u=l[0],c=a||Pl(t),s=function(e){var t=i.apply(Dn,st([e],l));return r&&d?t[0]:t};c&&n&&"function"==typeof u&&1!=u.length&&(a=c=!1);var d=this.__chain__,f=!!this.__actions__.length,m=o&&!d,v=a&&!f;if(!o&&c){t=v?t:new Rn(this);var p=e.apply(t,l);return p.__actions__.push({func:rl,args:[s],thisArg:void 0}),new Ln(p,d)}return m&&v?e.apply(this,l):(p=this.thru(s),m?r?p.value()[0]:p.value():p)})}),rt(["pop","push","shift","sort","splice","unshift"],function(e){var t=Ee[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Dn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Pl(i)?i:[],e)}return this[n](function(n){return t.apply(Pl(n)?n:[],e)})}}),ur(Rn.prototype,function(e,t){var n=Dn[t];if(n){var r=n.name+"";Ce.call(yn,r)||(yn[r]=[]),yn[r].push({name:t,func:n})}}),yn[Ii(void 0,2).name]=[{name:"wrapper",func:void 0}],Rn.prototype.clone=function(){var e=new Rn(this.__wrapped__);return e.__actions__=gi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=gi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=gi(this.__views__),e},Rn.prototype.reverse=function(){if(this.__filtered__){var e=new Rn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Rn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Pl(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],l=o.size;switch(o.type){case"drop":e+=l;break;case"dropRight":t-=l;break;case"take":t=an(t,e+l);break;case"takeRight":e=ln(e,t-l)}}return{start:e,end:t}}(0,i,this.__views__),l=o.start,a=o.end,u=a-l,c=r?a:l-1,s=this.__iteratees__,d=s.length,f=0,m=an(u,this.__takeCount__);if(!n||!r&&i==u&&m==u)return ti(e,this.__actions__);var v=[];e:for(;u--&&f<m;){for(var p=-1,g=e[c+=t];++p<d;){var h=s[p],E=h.type,y=(0,h.iteratee)(g);if(2==E)g=y;else if(!y){if(1==E)continue e;break e}}v[f++]=g}return v},Dn.prototype.at=il,Dn.prototype.chain=function(){return nl(this)},Dn.prototype.commit=function(){return new Ln(this.value(),this.__chain__)},Dn.prototype.next=function(){void 0===this.__values__&&(this.__values__=na(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},Dn.prototype.plant=function(e){for(var t,n=this;n instanceof An;){var r=To(n);r.__index__=0,r.__values__=void 0,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Dn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Rn){var t=e;return this.__actions__.length&&(t=new Rn(this)),(t=t.reverse()).__actions__.push({func:rl,args:[Ho],thisArg:void 0}),new Ln(t,this.__chain__)}return this.thru(Ho)},Dn.prototype.toJSON=Dn.prototype.valueOf=Dn.prototype.value=function(){return ti(this.__wrapped__,this.__actions__)},Dn.prototype.first=Dn.prototype.head,Ct&&(Dn.prototype[Ct]=function(){return this}),Dn}();Ge?((Ge.exports=qt)._=qt,He._=qt):We._=qt}).call(M)});const U=["digit-ui","works-ui","workbench-ui","health-ui","sanitation-ui","core-ui","mgramseva-web"],B=(e,t)=>{if("object"!=typeof e||null===e)return null;const n=Object.keys(e).map(n=>{var r,i,o,l,a;return"string"==typeof(null===(r=e[n])||void 0===r||null===(i=r.item)||void 0===i?void 0:i.path)?(null===(o=e[n])||void 0===o||null===(l=o.item)||void 0===l||null===(a=l.path)||void 0===a?void 0:a.split(t?t+"."+n:"."+n))||B(e[n],n):null});return null==n?void 0:n[0]},j=function(e){var t,n,r;void 0===e&&(e="");const i=null===(t=e)||void 0===t?void 0:t.split(".");return null!==(n=e)&&void 0!==n&&null!==(r=n.endsWith)&&void 0!==r&&r.call(n,".")?i[0]:i[(null==i?void 0:i.length)-1]},F=e=>{let{data:o}=e;const{t:l}=i.useTranslation(),u=a.useHistory(),[s,d]=n.useState({}),[f,m]=n.useState(null),[v,p]=n.useState(null),[g,h]=n.useState(null),[E,y]=n.useState(!1),_={home:r.createElement(t.HomeIcon,null),announcement:r.createElement(t.ComplaintIcon,null),business:r.createElement(t.BPAHomeIcon,null),store:r.createElement(t.PropertyHouse,null),assignment:r.createElement(t.CaseIcon,null),receipt:r.createElement(t.ReceiptIcon,null),"business-center":r.createElement(t.PersonIcon,null),description:r.createElement(t.DocumentIconSolid,null),"water-tap":r.createElement(t.DropIcon,null),"collections-bookmark":r.createElement(t.CollectionsBookmarIcons,null),"insert-chart":r.createElement(t.FinanceChartIcon,null),edcr:r.createElement(t.CollectionIcon,null),collections:r.createElement(t.CollectionIcon,null)};function b(e){void 0===e&&(e={});for(const o in e){const l=e[o];var t,n,r,i;if("item"===o&&""!==(null==l?void 0:l.leftIcon))return{iconKey:null==l||null===(t=l.leftIcon)||void 0===t||null===(n=t.split(":"))||void 0===n?void 0:n[0],iconName:null==l||null===(r=l.leftIcon)||void 0===r||null===(i=r.split(":"))||void 0===i?void 0:i[1]};if("object"==typeof e[o]&&!Array.isArray(e[o])){const t=b(e[o]);if(t)return t}}return null}const C=function(e,n,i,o){void 0===n&&(n=null),void 0===i&&(i=!0),void 0===o&&(o=0);const a=Object.values(e).sort((e,t)=>{var n,r;return null!=e&&e.item&&null!=t&&t.item?(null==e||null===(n=e.item)||void 0===n?void 0:n.orderNumber)-(null==t||null===(r=t.item)||void 0===r?void 0:r.orderNumber):(null==e?void 0:e[0])<(null==t?void 0:t[0])?-1:(null==e?void 0:e[0])>(null==t?void 0:t[0])?1:0}).map(e=>{var t,n,r;return(null==e||null===(t=e.item)||void 0===t?void 0:t.path)&&j(null==e||null===(n=e.item)||void 0===n?void 0:n.path)||j(null===(r=B(e))||void 0===r?void 0:r[0])});return r.createElement("div",{className:"submenu-container level-"+o},a.map((a,y)=>{const O=e[a],S=O?"item"===Object.keys(O)[0]:null,w=s[a]||!1;var N=n?""+n:a;const I=null==a?void 0:a.replace(/[ -]/g,"_"),D=l(Digit.Utils.locale.getTransformedLocale("ACTION_TEST_"+I)),T=l((null==D?void 0:D.length)>20?D.substring(0,20)+"...":D);if(!S&&O&&Object.keys(O).length>0){const{iconKey:e,iconName:n}=b(O)||{};let u=_[n]||_.collections;var A,L,R;"dynamic"===e&&(u=(k=null===(A=require("@egovernments/digit-ui-react-components"))||void 0===A?void 0:A[n])?r.createElement(k,null):u),"svg"===e&&(u=(k=null===(L=require("@egovernments/digit-ui-react-components"))||void 0===L||null===(R=L.SVG)||void 0===R?void 0:R[n])?r.createElement(k,{fill:"white"}):u);const s=f===N,v=g===T;return r.createElement("div",{key:y,className:"sidebar-link level-"+o+" "+(s?"select-level":""),style:{display:"flex",flexDirection:"column",alignItems:"flex-start"}},r.createElement("div",{className:"actions "+(v&&1===o?"selected-action-level-1":s?"default-"+o+" active":"default-"+o),onClick:e=>{(e=>{d(t=>({...t,[e]:!t[e]}))})(a),m(e=>e===N?null:N);const t=e.target.innerText;h(e=>e===t||w?null:t),p(null)},style:{display:"flex",flexDirection:"row",width:"100%"}},i&&r.createElement("div",{className:"link-icon"},u),r.createElement("div",{"data-tip":"React-tooltip","data-for":"jk-side-"+a},r.createElement("span",null," ",T," "),(null==T?void 0:T.includes("..."))&&r.createElement(c,{textColor:"white",backgroundColor:"grey",place:"right",type:"info",effect:"solid",id:"jk-side-"+a},l(Digit.Utils.locale.getTransformedLocale("ACTION_TEST_"+a)))),r.createElement("div",{style:{position:"relative",marginLeft:"auto"},className:"arrow "+(v&&1===o?"selected-arrow":"")+" "},w?r.createElement(t.ArrowVectorDown,{height:"28px",width:"28px"}):r.createElement(t.ArrowForward,null))),E&&r.createElement("div",{style:{width:"100%"}},w&&C(O,N,!1,o+1)))}if(S){const{iconName:e,iconKey:t}=b(O)||{};let s=_[e]||_.collections;var x,P,M,k;return"dynamic"===t&&(s=(k=null===(x=require("@egovernments/digit-ui-react-components"))||void 0===x?void 0:x[e])?r.createElement(k,null):s),"svg"===t&&(s=(k=null===(P=require("@egovernments/digit-ui-react-components"))||void 0===P||null===(M=P.SVG)||void 0===M?void 0:M[e])?r.createElement(k,{fill:"white"}):s),r.createElement("a",{key:y,className:"dropdown-link new-dropdown-link "+(v===O.item.path?"active":"")+" level-"+o,onClick:()=>{var e;const t=O.item.path;m(n),p(t),h(null),function(e,t){var n,r;if(void 0===e&&(e={}),void 0===t&&(t=""),-1===(null===(n=t)||void 0===n?void 0:n.indexOf("/"+(null===(r=window)||void 0===r?void 0:r.contextPath)))){const e=window.location.origin,n=null!=U&&U.every(e=>{var n;return-1===(null===(n=t)||void 0===n?void 0:n.indexOf("/"+e))})?e+"/employee/"+t:e+t;window.location.href=n}else e.push(t)}(u,""+(null==O||null===(e=O.item)||void 0===e?void 0:e.navigationURL))}},r.createElement("div",{className:"actions level-"+o+" "+("Home"===T?"custom":""),"data-tip":"React-tooltip","data-for":"jk-side-"+a},i&&r.createElement("div",{className:"link-icon"},s),r.createElement("span",null," ",T," "),(null==T?void 0:T.includes("..."))&&r.createElement(c,{textColor:"white",backgroundColor:"grey",place:"right",type:"info",effect:"solid",id:"jk-side-"+a},l(Digit.Utils.locale.getTransformedLocale("ACTION_TEST_"+a)))))}}))};return r.createElement("div",{className:"new-sidebar "+(s?"show":""),onMouseEnter:()=>{y(!0)},onMouseLeave:()=>{y(!1),d({}),m(null),p(null),h(null)}},C(o))},V=function(e,t){return void 0===e&&(e=""),void 0===t&&(t=""),e.toLowerCase().includes(t.toLowerCase())},z=()=>{const e=n.useRef(null),{isLoading:o,data:l}=Digit.Hooks.useAccessControl(),[a,u]=n.useState(""),{t:c}=i.useTranslation(),[s,d]=n.useState(!1);n.useEffect(()=>{if(o)return r.createElement(t.Loader,null);e.current.style.cursor="pointer",f()},[o]);const f=()=>{e.current.style.width="60px",e.current.style.overflow="hidden",d(!1)};function m(e,t){for(const n in t)t.hasOwnProperty(n)&&("object"!=typeof t[n]||Array.isArray(t[n])?e[n]||(e[n]=t[n]):(e[n]||(e[n]={}),m(e[n],t[n])))}const v={};return null==l||l.actions.filter(e=>"url"===e.url).forEach(e=>{var t,n,r;let i=(null==e||null===(t=e.path)||void 0===t||null===(n=t.split("."))||void 0===n?void 0:n[0])||"";if(""==a&&""!==e.path){const t=e.path.split(".");let n={};t.reduce((n,r,i)=>{if(i!==t.length-1)return n[r]={},n[r];n[r]={item:e}},n),m(v,n)}else if(V(c("ACTION_TEST_"+(null==i||null===(r=i.toUpperCase())||void 0===r?void 0:r.replace(/[ -]/g,"_"))),a)||V(c(Digit.Utils.locale.getTransformedLocale("ACTION_TEST_"+(null==e?void 0:e.displayName))),a)){const t=e.path.split(".");let n={};t.reduce((n,r,i)=>{if(i!==t.length-1)return n[r]={},n[r];n[r]={item:e}},n),m(v,n)}}),o?r.createElement(t.Loader,null):v?r.createElement("div",{className:"sidebar",ref:e,onMouseOver:()=>{e.current.style.width="260px",d(!0)},onMouseLeave:f},r.createElement("div",{className:""},r.createElement("div",{className:"sidebar-link"},s?r.createElement("div",{className:"actions search-icon-wrapper"},r.createElement("input",{className:"employee-search-input nav-bar",type:"text",placeholder:c("ACTION_TEST_SEARCH"),name:"search",value:a,onChange:e=>u(e.target.value)}),r.createElement(t.SearchIcon,{className:"search-icon"})):r.createElement("div",{className:"actions search-icon-wrapper-new"},r.createElement(t.SearchIcon,{className:"search-icon"})))),(e=>{const t=Object.entries(e);t.sort((e,t)=>e[0]<t[0]?-1:e[0]>t[0]?1:0);const n=Object.fromEntries(t);return r.createElement(F,{data:e=n})})(v)):""},W=e=>{let{CITIZEN:t,isSidebarOpen:n,toggleSidebar:i,handleLogout:o,mobileView:l,userDetails:a,modules:u,linkData:c,islinkDataLoading:s}=e;return t?r.createElement(P,{isOpen:n,isMobile:!0,toggleSidebar:i,onLogout:o,linkData:c,islinkDataLoading:s}):!n&&null!=a&&a.access_token?r.createElement("div",{className:"digit-employeeSidebar"},r.createElement(z,{mobileView:l,userDetails:a,modules:u})):r.createElement("div",{className:"digit-citizenSidebar"},r.createElement(P,{isOpen:n,isMobile:!0,toggleSidebar:i,onLogout:o,isEmployee:!0}))},H=e=>{let{t:t,stateInfo:i,userDetails:o,CITIZEN:l,cityDetails:u,mobileView:c,handleUserDropdownSelection:s,logoUrl:d,showSidebar:f=!0,showLanguageChange:m,linkData:v,islinkDataLoading:p}=e;const[g,h]=n.useState(!1),E=a.useHistory(),[y,_]=n.useState(!1),b=()=>{h(!1),_(!0)},C=()=>{_(!1)},O=()=>{h(!g)},w=[{name:t("EDIT_PROFILE"),icon:"Edit",func:()=>{var e;E.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/user/profile")}},{name:t("CORE_COMMON_LOGOUT"),icon:"Logout",func:b}];return r.createElement(r.Fragment,null,r.createElement(S,{t:t,stateInfo:i,toggleSidebar:O,isSidebarOpen:g,handleLogout:b,userDetails:o,CITIZEN:l,cityDetails:u,mobileView:c,userOptions:w,handleUserDropdownSelection:s,logoUrl:d,showLanguageChange:m}),y&&r.createElement(D,{onSelect:()=>{Digit.UserService.logout(),_(!1)},onCancel:C,onDismiss:C}),f&&r.createElement(W,{t:t,CITIZEN:l,isSidebarOpen:g,toggleSidebar:O,handleLogout:b,mobileView:c,userDetails:o,linkData:v,islinkDataLoading:p}))},G=e=>{const{question:o,answer:l,lastIndex:a}=e,[u,c]=n.useState(!1),{t:s}=i.useTranslation();return r.createElement("div",{className:"faqs border-none",onClick:()=>c(!u)},r.createElement("div",{className:"faq-question",style:{justifyContent:"space-between",display:"flex"}},r.createElement("span",null,s(o)),r.createElement("span",{className:u?"faqicon rotate":"faqicon",style:{float:"right"}},r.createElement(t.ArrowForward,null))),r.createElement("div",{className:"faq-answer",style:u?{display:"block"}:{display:"none"}},r.createElement("span",null,s(l))),a?null:r.createElement("div",{className:"cs-box-border"}))},q=e=>{var o,l,a;let{module:u}=e;const c=Digit.UserService.getUser(),{t:s}=((null==c||null===(o=c.info)||void 0===o?void 0:o.tenantId)||Digit.ULBService.getCurrentTenantId(),i.useTranslation()),{isLoading:d,data:f}=Digit.Hooks.useGetFAQsJSON(Digit.ULBService.getStateId()),m=null==f||null===(l=f.MdmsRes["common-masters"])||void 0===l||null===(a=l.faqs[0])||void 0===a?void 0:a[""+u].faqs;return d?r.createElement(t.Loader,null):r.createElement(n.Fragment,null,r.createElement("div",{className:"faq-page"},r.createElement(t.BackButton,{style:{marginLeft:"unset"}}),r.createElement("div",{style:{marginBottom:"15px"}},r.createElement(t.Header,{styles:{marginLeft:"0px",paddingTop:"10px",fontSize:"32px"}},s("FAQ_S"))),r.createElement("div",{className:"faq-list"},m.map((e,t)=>r.createElement(G,{key:"faq_"+t,question:e.question,answer:e.answer,lastIndex:t===(null==m?void 0:m.length)-1})))))},Z=()=>{var e,n,o,l,u,c,s,d,f,m,v,p,g,h,E,y,_,b,C,O,S,w,N;const{t:D}=i.useTranslation(),T=a.useHistory(),A=Digit.ULBService.getCitizenCurrentTenant(!0),{data:{uiHomePage:L}={},isLoading:R}=Digit.Hooks.useStore.getInitData();let x=window.Digit.Utils.browser.isMobile();const P=()=>{var e,t,n,r,i;return"EMPLOYEE"!==(null===(e=Digit.UserService)||void 0===e||null===(t=e.getUser())||void 0===t||null===(n=t.info)||void 0===n?void 0:n.type)&&!(null===(r=Digit.UserService)||void 0===r||null===(i=r.getUser())||void 0===i||!i.access_token)},{data:M,isLoading:k}=Digit.Hooks.useEvents({tenantId:A,variant:"whats-new",config:{enabled:P()}});var U;A||T.push("/"+(null===(U=window)||void 0===U?void 0:U.contextPath)+"/citizen/select-language");const B=null==L?void 0:L.appBannerDesktop,j=null==L?void 0:L.appBannerMobile,F=null==L?void 0:L.citizenServicesCard,V=null==L?void 0:L.informationAndUpdatesCard,z=null==L?void 0:L.whatsAppBannerDesktop,W=null==L?void 0:L.whatsAppBannerMobile,H=null==L?void 0:L.whatsNewSection,G=null==L?void 0:L.redirectURL;var q,Z;G&&T.push("/"+(null===(q=window)||void 0===q?void 0:q.contextPath)+"/citizen/"+G),null!==(e=window)&&void 0!==e&&null!==(n=e.location)&&void 0!==n&&null!==(o=n.href)&&void 0!==o&&null!==(l=o.includes)&&void 0!==l&&l.call(o,"sanitation-ui")&&T.push("/"+(null===(Z=window)||void 0===Z?void 0:Z.contextPath)+"/citizen/all-services");const X=e=>{window.open(null==e?void 0:e.navigationUrl)},$={header:D(null==F?void 0:F.headerLabel),sideOption:{name:D(null==F||null===(u=F.sideOption)||void 0===u?void 0:u.name),onClick:()=>{var e;return T.push(null==F||null===(e=F.sideOption)||void 0===e?void 0:e.navigationUrl)}},options:[{name:D(null==F||null===(c=F.props)||void 0===c||null===(s=c[0])||void 0===s?void 0:s.label),Icon:r.createElement(t.ComplaintIcon,null),onClick:()=>{var e,t;return T.push(null==F||null===(e=F.props)||void 0===e||null===(t=e[0])||void 0===t?void 0:t.navigationUrl)}},{name:D(null==F||null===(d=F.props)||void 0===d||null===(f=d[1])||void 0===f?void 0:f.label),Icon:r.createElement(t.PTIcon,{className:"fill-path-primary-main"}),onClick:()=>{var e,t;return T.push(null==F||null===(e=F.props)||void 0===e||null===(t=e[1])||void 0===t?void 0:t.navigationUrl)}},{name:D(null==F||null===(m=F.props)||void 0===m||null===(v=m[2])||void 0===v?void 0:v.label),Icon:r.createElement(t.CaseIcon,{className:"fill-path-primary-main"}),onClick:()=>{var e,t;return T.push(null==F||null===(e=F.props)||void 0===e||null===(t=e[2])||void 0===t?void 0:t.navigationUrl)}},{name:D(null==F||null===(p=F.props)||void 0===p||null===(g=p[3])||void 0===g?void 0:g.label),Icon:r.createElement(t.OBPSIcon,null),onClick:()=>{var e,t;return T.push(null==F||null===(e=F.props)||void 0===e||null===(t=e[3])||void 0===t?void 0:t.navigationUrl)}}],styles:{display:"flex",flexWrap:"wrap",justifyContent:"flex-start",width:"100%"}},Y={header:D(null==V?void 0:V.headerLabel),sideOption:{name:D(null==V||null===(h=V.sideOption)||void 0===h?void 0:h.name),onClick:()=>{var e;return T.push(null==V||null===(e=V.sideOption)||void 0===e?void 0:e.navigationUrl)}},options:[{name:D(null==V||null===(E=V.props)||void 0===E||null===(y=E[0])||void 0===y?void 0:y.label),Icon:r.createElement(t.HomeIcon,null),onClick:()=>{var e,t;return T.push(null==V||null===(e=V.props)||void 0===e||null===(t=e[0])||void 0===t?void 0:t.navigationUrl)}},{name:D(null==V||null===(_=V.props)||void 0===_||null===(b=_[1])||void 0===b?void 0:b.label),Icon:r.createElement(t.Calender,null),onClick:()=>{var e,t;return T.push(null==V||null===(e=V.props)||void 0===e||null===(t=e[1])||void 0===t?void 0:t.navigationUrl)}},{name:D(null==V||null===(C=V.props)||void 0===C||null===(O=C[2])||void 0===O?void 0:O.label),Icon:r.createElement(t.DocumentIcon,null),onClick:()=>{var e,t;return T.push(null==V||null===(e=V.props)||void 0===e||null===(t=e[2])||void 0===t?void 0:t.navigationUrl)}},{name:D(null==V||null===(S=V.props)||void 0===S||null===(w=S[3])||void 0===w?void 0:w.label),Icon:r.createElement(t.DocumentIcon,null),onClick:()=>{var e,t;return T.push(null==V||null===(e=V.props)||void 0===e||null===(t=e[3])||void 0===t?void 0:t.navigationUrl)}}],styles:{display:"flex",flexWrap:"wrap",justifyContent:"flex-start",width:"100%"}};return R?r.createElement(t.Loader,null):r.createElement("div",{className:"HomePageContainer"},r.createElement("div",{className:"HomePageWrapper"},r.createElement("div",{className:"BannerWithSearch"},r.createElement("img",x?{src:null==j?void 0:j.bannerUrl}:{src:null==B?void 0:B.bannerUrl}),r.createElement("div",{className:"ServicesSection"},r.createElement(t.CardBasedOptions,I({style:{marginTop:"-30px"}},$)),r.createElement(t.CardBasedOptions,I({style:x?{}:{marginTop:"-30px"}},Y)))),(W||z)&&r.createElement("div",{className:"WhatsAppBanner"},r.createElement("img",x?{src:null==W?void 0:W.bannerUrl,onClick:()=>X(W)}:{src:null==z?void 0:z.bannerUrl,onClick:()=>X(z)})),P()?k?r.createElement(t.Loader,null):r.createElement("div",{className:"WhatsNewSection"},r.createElement("div",{className:"headSection"},r.createElement("h2",null,D(null==H?void 0:H.headerLabel)),r.createElement("p",{onClick:()=>{var e;return T.push(null==H||null===(e=H.sideOption)||void 0===e?void 0:e.navigationUrl)}},D(null==H||null===(N=H.sideOption)||void 0===N?void 0:N.name))),r.createElement(t.WhatsNewCard,null==M?void 0:M[0])):null))},X=()=>{const{t:e}=i.useTranslation(),o=a.useHistory(),{data:{languages:l,stateInfo:u}={},isLoading:c}=Digit.Hooks.useStore.getInitData(),s=Digit.StoreData.getCurrentLanguage(),d=n.useMemo(()=>({header:e("CS_COMMON_CHOOSE_LANGUAGE"),submitBarLabel:e("CORE_COMMON_CONTINUE")}),[e]),f=n.useMemo(()=>({options:l,optionsKey:"label",additionalWrapperClass:"digit-reverse-radio-selection-wrapper",onSelect:e=>Digit.LocalizationService.changeLanguage(e.value,u.code),selectedOption:null==l?void 0:l.filter(e=>e.value===s)[0]}),[s,l]);return c?r.createElement(t.Loader,null):r.createElement("div",{className:"selection-card-wrapper"},r.createElement(t.PageBasedInput,{texts:d,onSubmit:function(){var e;o.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/citizen/select-location")}},r.createElement(t.CardHeader,null,e("CS_COMMON_CHOOSE_LANGUAGE")),r.createElement(t.RadioButtons,f)))},$=()=>{const{t:e}=i.useTranslation(),o=a.useHistory(),l=a.useLocation(),{data:u,isLoading:c}=Digit.Hooks.useTenants(),[s,d]=n.useState(()=>({code:Digit.ULBService.getCitizenCurrentTenant(!0)})),[f,m]=n.useState(!1),v=n.useMemo(()=>({header:e("CS_COMMON_CHOOSE_LOCATION"),submitBarLabel:e("CORE_COMMON_CONTINUE")}),[e]);function p(e){d(e),m(!1)}const g=n.useMemo(()=>({options:u,optionsKey:"i18nKey",additionalWrapperClass:"digit-reverse-radio-selection-wrapper",onSelect:p,selectedOption:s}),[u,e,s]);return c?r.createElement("loader",null):r.createElement("div",{className:"selection-card-wrapper"},r.createElement(t.BackButton,null),r.createElement(t.PageBasedInput,{texts:v,onSubmit:function(){if(s){var e,t;Digit.SessionStorage.set("CITIZEN.COMMON.HOME.CITY",s);const n=null===(e=l.state)||void 0===e?void 0:e.redirectBackTo;n?o.replace(n):o.push("/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/citizen")}else m(!0)},className:"location-selection-container"},r.createElement(t.CardHeader,null,e("CS_COMMON_CHOOSE_LOCATION")),r.createElement(t.SearchOnRadioButtons,I({},g,{placeholder:e("COMMON_TABLE_SEARCH")})),f?r.createElement(t.CardLabelError,null,e("CS_COMMON_LOCATION_SELECTION_ERROR")):null))},Y=function(){function e(){}return e.prototype.then=function(t,n){const r=new e,i=this.s;if(i){const e=1&i?t:n;if(e){try{K(r,1,e(this.v))}catch(e){K(r,2,e)}return r}return this}return this.o=function(e){try{const i=e.v;1&e.s?K(r,1,t?t(i):i):n?K(r,1,n(i)):K(r,2,i)}catch(e){K(r,2,e)}},r},e}();function K(e,t,n){if(!e.s){if(n instanceof Y){if(!n.s)return void(n.o=K.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(K.bind(null,e,t),K.bind(null,e,2));e.s=t,e.v=n;const r=e.o;r&&r(e)}}function J(e){return e instanceof Y&&1&e.s}const Q="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function ee(e,t,n){if("function"==typeof e[Q]){var r,i,o,l=e[Q]();if(function e(a){try{for(;!((r=l.next()).done||n&&n());)if((a=t(r.value))&&a.then){if(!J(a))return void a.then(e,o||(o=K.bind(null,i=new Y,2)));a=a.v}i?K(i,1,a):i=a}catch(e){K(i||(i=new Y),2,e)}}(),l.return){var a=function(e){try{r.done||l.return()}catch(e){}return e};if(i&&i.then)return i.then(a,function(e){throw a(e)});a()}return i}if(!("length"in e))throw new TypeError("Object is not iterable");for(var u=[],c=0;c<e.length;c++)u.push(e[c]);return function(e,t,n){var r,i,o=-1;return function l(a){try{for(;++o<e.length&&(!n||!n());)if((a=t(o))&&a.then){if(!J(a))return void a.then(l,i||(i=K.bind(null,r=new Y,2)));a=a.v}r?K(r,1,a):r=a}catch(e){K(r||(r=new Y),2,e)}}(),r}(u,function(e){return t(u[e])},n)}function te(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}function ne(e){let{setProfilePic:o,closeDrawer:l,userType:a,removeProfilePic:u,showToast:c}=e;const[s,d]=n.useState(null),[f,m]=n.useState(""),[v,p]=n.useState(null),{t:g}=i.useTranslation();return n.useEffect(()=>{!function(){try{p(null);const e=function(){if(f){const e=function(){if(f.size>=1e6)c("error",g("CORE_COMMON_PROFILE_MAXIMUM_UPLOAD_SIZE_EXCEEDED")),p(g("CORE_COMMON_PROFILE_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else{const e=te(function(){return Promise.resolve(Digit.UploadServices.Filestorage(a+"-profile",f,Digit.ULBService.getStateId())).then(function(e){var t,n;if((null==e||null===(t=e.data)||void 0===t||null===(n=t.files)||void 0===n?void 0:n.length)>0){var r,i;const t=null==e||null===(r=e.data)||void 0===r||null===(i=r.files[0])||void 0===i?void 0:i.fileStoreId;d(t),o(t)}else c("error",g("CORE_COMMON_PROFILE_FILE_UPLOAD_ERROR")),p(g("CORE_COMMON_PROFILE_FILE_UPLOAD_ERROR"))})},function(){c("error",g("CORE_COMMON_PROFILE_INVALID_FILE_INPUT"))});if(e&&e.then)return e.then(function(){})}}();if(e&&e.then)return e.then(function(){})}}();e&&e.then&&e.then(function(){})}catch(e){Promise.reject(e)}}()},[f]),r.createElement(r.Fragment,null,r.createElement("div",{style:{position:"fixed",top:"0",left:"0",right:"0",bottom:"0",width:"100%",height:"100vh",backgroundColor:"rgba(0,0,0,.5)"},onClick:()=>l()}),r.createElement("div",{style:{width:"100%",justifyContent:"space-between",display:"flex",backgroundColor:"white",alignItems:"center",position:"fixed",left:"0",right:"0",height:"20%",bottom:"citizen"===a?"2.5rem":"0",zIndex:"1000"}},r.createElement("div",{style:{display:"flex",flex:"1",flexDirection:"column",width:"100%",justifyContent:"center",alignItems:"center",gap:"8px 0"}},r.createElement("label",{for:"file",style:{cursor:"pointer"}}," ",r.createElement(t.GalleryIcon,null)),r.createElement("label",{style:{cursor:"pointer"}}," Gallery"),r.createElement("input",{type:"file",id:"file",accept:"image/*, .png, .jpeg, .jpg",onChange:e=>m(e.target.files[0]),style:{display:"none"}})),r.createElement("div",{style:{display:"flex",flex:"1",width:"100%",justifyContent:"center",alignItems:"center",flexDirection:"column",gap:"8px 0"}},r.createElement("button",{onClick:()=>{u(),l()}},r.createElement(t.RemoveIcon,null)),r.createElement("label",{style:{cursor:"pointer"}},"Remove"))))}"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));const re=e=>{var o,l,u,c,s,d,f,m,v,p,g;let{stateCode:h,userType:E,cityDetails:y}=e;a.useHistory();const{t:_}=i.useTranslation(),b=window.location.href,C=Digit.ULBService.getStateId(),O=Digit.ULBService.getCurrentTenantId(),S=(null===(o=Digit.UserService.getUser())||void 0===o?void 0:o.info)||{},[w,N]=n.useState(null),[D,T]=n.useState(null!=S&&S.name?S.name:""),[A,L]=n.useState(null!=S&&S.emailId?S.emailId:""),[R,x]=n.useState(null==w?void 0:w.gender),[P,M]=n.useState(null!=S&&S.permanentCity?S.permanentCity:y.name),[k,U]=n.useState(null!=S&&S.mobileNumber?S.mobileNumber:""),[B,j]=n.useState(null),[F,V]=n.useState(""),[z,W]=n.useState(!1),[H,G]=n.useState(!1),[q,Z]=n.useState(""),[X,$]=n.useState(""),[Y,K]=n.useState(""),[J,Q]=n.useState(null),[ee,re]=n.useState(!1),[ie,oe]=r.useState(window.innerWidth),[le,ae]=r.useState({}),ue=window.Digit.Utils.browser.isMobile();r.useEffect(()=>(window.addEventListener("resize",()=>oe(window.innerWidth)),()=>{window.removeEventListener("resize",()=>oe(window.innerWidth))})),n.useEffect(()=>{var e;re(!0),function(){try{const e=null==S?void 0:S.uuid,t=function(){if(e)return Promise.resolve(Digit.UserService.userSearch(O,{uuid:[e]},{})).then(function(e){e&&e.user&&e.user.length&&N(e.user[0])})}();Promise.resolve(t&&t.then?t.then(function(){}):void 0)}catch(e){return Promise.reject(e)}}(),x({i18nKey:void 0,code:null==w?void 0:w.gender,value:null==w?void 0:w.gender});const t=null==w||null===(e=w.photo)||void 0===e?void 0:e.split(",");V(null==t?void 0:t.at(0)),re(!1)},[null!==w]);let ce={};const se=e=>x(e),de=()=>W(!1),fe=e=>{T(e),!new RegExp(/^[a-zA-Z ]+$/i).test(e)||0===e.length||e.length>50?ae({...le,userName:{type:"pattern",message:"CORE_COMMON_PROFILE_NAME_INVALID"}}):ae({...le,userName:null})},me=e=>{(null==S?void 0:S.userName)!==e?(L(e),!e.length||e.includes("@")&&e.includes(".")?ae({...le,emailAddress:null}):ae({...le,emailAddress:{type:"pattern",message:"CORE_COMMON_PROFILE_EMAIL_INVALID"}})):ae({...le,emailAddress:null})},ve=function(e,t,n){void 0===n&&(n=5e3),Q({key:e,action:t}),setTimeout(()=>{Q(null)},n)},pe=function(){try{let t=!1;function e(e){if(t)return e;re(!1)}re(!0);const n=te(function(){const e={...S,name:D,gender:null==R?void 0:R.value,emailId:A,photo:B};if(!new RegExp(/^([a-zA-Z ])*$/).test(D)||""===D||D.length>50||D.length<1)throw JSON.stringify({type:"error",message:_("CORE_COMMON_PROFILE_NAME_INVALID")});if("employee"===E&&!new RegExp(/^[6-9]{1}[0-9]{9}$/).test(k))throw JSON.stringify({type:"error",message:_("CORE_COMMON_PROFILE_MOBILE_NUMBER_INVALID")});if(A.length&&(!A.includes("@")||!A.includes(".")))throw JSON.stringify({type:"error",message:_("CORE_COMMON_PROFILE_EMAIL_INVALID")});if(H&&(q.length||X.length||Y.length)){if(X!==Y)throw JSON.stringify({type:"error",message:_("CORE_COMMON_PROFILE_PASSWORD_MISMATCH")});if(!(q.length&&X.length&&Y.length))throw JSON.stringify({type:"error",message:_("CORE_COMMON_PROFILE_PASSWORD_INVALID")});if(!new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(X)&&!new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(Y))throw JSON.stringify({type:"error",message:_("CORE_COMMON_PROFILE_PASSWORD_INVALID")})}return Promise.resolve(Digit.UserService.updateUser(e,h)).then(function(e){let{responseInfo:t}=e;if(t&&"200"===t.status){const e=Digit.UserService.getUser();e&&Digit.UserService.setUser({...e,info:{...e.info,name:D,mobileNumber:k,emailId:A,permanentCity:P}})}return function(){if(q.length&&X.length&&Y.length){const e={existingPassword:q,newPassword:X,tenantId:O,type:"EMPLOYEE",username:null==S?void 0:S.userName,confirmPassword:Y};return function(){if(X===Y)return te(function(){return Promise.resolve(Digit.UserService.changePassword(e,O)).then(function(e){const{responseInfo:t}=e;if(null==t||!t.status||"200"!==t.status)throw"";ve("success",_("CORE_COMMON_PROFILE_UPDATE_SUCCESS_WITH_PASSWORD"),5e3),setTimeout(()=>Digit.UserService.logout(),2e3)})},function(e){var t,n;throw JSON.stringify({type:"error",message:null!==(t=e.Errors)&&void 0!==t&&null!==(n=t.at(0))&&void 0!==n&&n.description?e.Errors.at(0).description:"CORE_COMMON_PROFILE_UPDATE_ERROR_WITH_PASSWORD"})});throw JSON.stringify({type:"error",message:"CORE_COMMON_PROFILE_ERROR_PASSWORD_NOT_MATCH"})}()}null!=t&&t.status&&"200"===t.status&&ve("success",_("CORE_COMMON_PROFILE_UPDATE_SUCCESS"),5e3)}()})},function(e){const t=JSON.parse(e);ve(t.type,_(t.message),5e3)});return Promise.resolve(n&&n.then?n.then(e):e(n))}catch(e){return Promise.reject(e)}};let ge=[];const{data:he}=Digit.Hooks.useGenderMDMS(C,"common-masters","GenderType");return he&&he.map(e=>{ge.push({i18nKey:"PT_COMMON_GENDER_"+e.code,code:""+e.code,value:""+e.code})}),ee?r.createElement(t.Loader,null):r.createElement("div",{className:"user-profile"},r.createElement("section",{style:{margin:"citizen"===E||ue?"8px":"24px"}},"citizen"===E||ue?r.createElement(t.BackButton,null):r.createElement(t.BreadCrumb,{crumbs:[{path:"/"+(null===(l=window)||void 0===l?void 0:l.contextPath)+"/employee",content:_("ES_COMMON_HOME"),show:!0},{path:"/"+(null===(u=window)||void 0===u?void 0:u.contextPath)+"/employee/user/profile",content:_("ES_COMMON_PAGE_1"),show:b.includes("/user/profile")}]})),r.createElement("div",{style:{display:"flex",flex:1,flexDirection:ie<768||"citizen"===E?"column":"row",margin:"citizen"===E?"8px":"16px",gap:"citizen"===E?"":"0 24px",boxShadow:"citizen"===E?"1px 1px 4px 0px rgba(0,0,0,0.2)":"",background:"citizen"===E?"white":"",borderRadius:"citizen"===E?"4px":"",maxWidth:"citizen"===E?"960px":""}},r.createElement("section",{style:{position:"relative",display:"flex",flex:"citizen"===E?1:2.5,justifyContent:"center",alignItems:"center",maxWidth:"100%",height:"376px",borderRadius:"4px",boxShadow:"citizen"===E?"":"1px 1px 4px 0px rgba(0,0,0,0.2)",border:("citizen"===E?"8px":"24px")+" solid #fff",background:"#EEEEEE",padding:"citizen"===E?"8px":"16px"}},r.createElement("div",{style:{position:"relative",height:"citizen"===E?"114px":"150px",width:"citizen"===E?"114px":"150px",margin:"16px"}},r.createElement("img",{style:{margin:"auto",borderRadius:"300px",justifyContent:"center",height:"100%",width:"100%"},src:F&&""!==F?F:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAO4AAADUCAMAAACs0e/bAAAAM1BMVEXK0eL////Dy97GzuD4+fvL0uPg5O7T2efb4OvR1+Xr7vTk5/Df4+37/P3v8fbO1eTt8PUsnq5FAAAGqElEQVR4nO2d25ajIBBFCajgvf//a0eMyZgEjcI5xgt7Hmatme507UaxuJXidiDqjmSgeVIMlB1ZR1WZAf2gbdu0QwixSYzjOJPmHurfEGEfY9XzjNGG9whQCeVAuv5xQEySLtR9hPuIcwj0EeroN5m3D1IbsbgHK0esiQ9MKsqXVr8Hm/a/Pulk6wihpCIXBw3dh7bTvRBt9+dC5NfS1VH3xETdM3MxXRN1T0zUPTNR98xcS1dlV9NNfx3DhkTdM6PKqHteVBF1z0vU5f0sKdpc2zWLKutXrjJjdLvpesRmukqYonauPhXpdsLb6CppmpnltsYIuY2yavi6Mi2/rzAWm1zUfF0limVLqkZyA+mDYevKBS37aGC+L1lX5e7uyU1Cv565uiua9k5LFqbqqrnu2I3m+jJ11ZoLeRtfmdB0Uw/ZDsP0VTxdn7a1VERfmq7XlXyn5D2QWLoq8bZlPoBJumphJjVBw/Ll6CoTZGsTDs4NrGqKbqBth8ZHJUi6cn168QmleSm6GmB7Kxm+6obXlf7PoDHosCwM3QpiS2legi6ocSl3L0G3BdneDDgwQdENfeY+SfDJBkF37ZB+GvwzA6/rMaafAn8143VhPZWdjMWG1oHXhdnemgPoAvLlB/iZyRTfVeF06wPoQhJmlm4bdcOAZRlRN5gcPc5SoPEQR1fDdbOo6wn+uYvXxY0QCLom6gYROKH+Aj5nvphuFXWDiLpRdxl/19LFT95k6CHCrnW7pCDqBn1i1PUFvii2c11oZOJ6usWeH0RRNzC4Zs+6FTi2nevCVwCjbugnXklX5fkfTldL8PEilUB1kfNyN1u9MME2sATr4lbuB7AjfLAuvsRm1A0g6gYRdcPAjvBlje2Z8brI8OC68AcRdlCkwLohx2mcZMjw9q+LzarQurjtnwPYAydX08WecECO/u6Ad0GBdYG7jO5gB4Ap+PwKcA9ZT43dn4/W9TyiPAn4OAJaF7h3uwe8StSCddFdM3jqFa2LvnnB5zzhuuBBAjY4gi50cg694gnXhTYvfMdrjtcFZhrwE9r41gUem8IXWMC3LrBzxh+a0gRd1N1LOK7M0IUUGuggvEmHoStA2/MJh7MpupiDU4TzjhxdzLAoO4ouZvqVURbFMHQlZD6SUeWHoguZsSLUGegrehA+FZFowPdUWTi6iMoZlIpGGUUXkDbjj/9ZOLqAQS/+GIKl5BQOCn/ycqpzkXSDm5dU7ZWkG7wUyGlcmm7g5Ux56AqirgoaJ7BeokPTDbp9CbVunjFxPrl7+HqnkrSq1Da7JX20f3dV8yJi6voO81mX8vV0mx3qUsZCPRfTlVRdz2EvdufYGDvNQvvwqHtmXd+a1ITinwNcXc+lT6JuzdT1XDyBn/x7wtX1HCQQdW9MXc8xArGrirowfLeUEbMqqq6f7TF1lfRdOuGNiGi6SpT+WxY06xUfNN2wBfyE9I4tlm7w5hvOPDNJN3yNiLMipji6gE3chKhouoCtN5x3QlF0EZt8OW/8ougitqJQlk1aii7iFC9l0MvRReyao7xNjKML2Z/PuHlzhi5mFxljiZeiC9rPTEisNEMX9KYAwo5Xhi7qaA3hamboYm7dG+NVrXhdaYDv5zFaQZsYrCtbbAGnjkQDX2+J1FXCwOsqWOpKoIQNTFdqYBWydxqNqUoG0pVpCS+H8kaJaGKErlIaXj7CRRE+gRWuKwW9YZ80oVOUgbpdT0zpnSZJTIiwCtJVelvXntr4P5j6BWfPb5Wcx84C4cq3hb11lco2u2Mdwp6XdJ/Ne3wb8DWdfiRenZaXrhLwOj4e+GQeHroy3YOspS7TlU28Wle2m2QUS0mqdcbrdNW+ZHsSsyK7tBfm0q/dWcv+Z3mytVx3t7KWulqUe6ilunu8jF8pFwgv1FXp3mUt35OtRbr7eM4u4Gs6vUBXgeuHc5kfE/cbvWZtkROLm1DMtLCy80tzsu2PRj0hTI8fvrQuvsjlJkyutszq+m423wHaLTyniy/XuiGZ84LuT+m5ZfNfRxyGs7LXZOvia7VujatUwVTrIt+Q/Csc7Tuhe+BOakT10b4TuoiiJjvgU9emTO42PwEfBa+cuodKkuf42DXr1D3JpXz73Hnn0j10evHKe+nufgfUm+7B84sX9FfdEzXux2DBpWuKokkCqN/5pa/8pmvnL+RGKCddCGmatiPyPB/+ekO/M/q/7uvbt22kTt3zEnXPzCV13T3Gel4/6NduDu66xRvlPNkM1RjjxUdv+4WhGx6TftD19Q/dfzpwcHO+rE3fAAAAAElFTkSuQmCC"}),r.createElement("button",{style:{position:"absolute",left:"50%",bottom:"-24px",transform:"translateX(-50%)"},onClick:()=>W(!z)},r.createElement(t.CameraIcon,null)))),r.createElement("section",{style:{display:"flex",flexDirection:"column",flex:"citizen"===E?1:7.5,width:"100%",borderRadius:"4px",height:"fit-content",boxShadow:"citizen"===E?"":"1px 1px 4px 0px rgba(0,0,0,0.2)",background:"white",padding:"citizen"===E?"8px":"24px",paddingBottom:"20px"}},"citizen"===E?r.createElement(r.Fragment,null,r.createElement(t.LabelFieldPair,null,r.createElement(t.CardLabel,{style:{}},""+_("CORE_COMMON_PROFILE_NAME"),"*"),r.createElement("div",{style:{width:"100%",maxWidth:"960px"}},r.createElement(t.TextInput,I({t:_,style:{width:"100%"},type:"text",isMandatory:!1,name:"name",value:D,onChange:e=>fe(e.target.value)},ce={isRequired:!0,pattern:"^[a-zA-Z-.`' ]*$",type:"tel",title:_("CORE_COMMON_PROFILE_NAME_ERROR_MESSAGE")},{disable:!1})),(null==le?void 0:le.userName)&&r.createElement(t.CardLabelError,null," ",_(null==le||null===(c=le.userName)||void 0===c?void 0:c.message)," "))),r.createElement(t.LabelFieldPair,null,r.createElement(t.CardLabel,{style:{}},""+_("CORE_COMMON_PROFILE_GENDER")),r.createElement(t.Dropdown,{style:{width:"100%"},className:"form-field",selected:1===(null==R?void 0:R.length)?R[0]:R,disable:1===(null==R?void 0:R.length)||!1,option:ge,select:se,value:R,optionKey:"code",t:_,name:"gender"})),r.createElement(t.LabelFieldPair,null,r.createElement(t.CardLabel,{style:{}},""+_("CORE_COMMON_PROFILE_EMAIL")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,{t:_,style:{width:"100%"},type:"email",isMandatory:!1,optionKey:"i18nKey",name:"email",value:A,onChange:e=>me(e.target.value),disabled:!1}),(null==le?void 0:le.emailAddress)&&r.createElement(t.CardLabelError,null," ",_(null==le||null===(s=le.emailAddress)||void 0===s?void 0:s.message)," "))),r.createElement("button",{onClick:pe,style:{marginTop:"24px",backgroundColor:"#F47738",width:"100%",height:"40px",color:"white",maxWidth:ue?"100%":"240px",borderBottom:"1px solid black"}},_("CORE_COMMON_SAVE"))):r.createElement(r.Fragment,null,r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+_("CORE_COMMON_PROFILE_NAME"),"*"),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,I({t:_,type:"text",isMandatory:!1,name:"name",value:D,onChange:e=>fe(e.target.value),placeholder:"Enter Your Name"},ce={isRequired:!0,pattern:"^[a-zA-Z-.`' ]*$",type:"text",title:_("CORE_COMMON_PROFILE_NAME_ERROR_MESSAGE")},{disabled:!1})),(null==le?void 0:le.userName)&&r.createElement(t.CardLabelError,{style:{margin:0,padding:0}}," ",_(null==le||null===(d=le.userName)||void 0===d?void 0:d.message)," "))),r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+_("CORE_COMMON_PROFILE_GENDER")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.Dropdown,{selected:1===(null==R?void 0:R.length)?R[0]:R,disable:1===(null==R?void 0:R.length)||!1,option:ge,select:se,value:R,optionKey:"code",t:_,name:"gender"}))),r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+_("CORE_COMMON_PROFILE_CITY")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,I({t:_,type:"text",isMandatory:!1,name:"city",value:_(Digit.Utils.locale.getTransformedLocale("TENANT_TENANTS_"+O)),onChange:e=>M(e.target.value),placeholder:"Enter Your City Name"},ce={isRequired:!0,type:"text",title:_("CORE_COMMON_PROFILE_CITY_ERROR_MESSAGE")},{disabled:!0})),r.createElement(t.CardLabelError,null))),r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},_("CORE_COMMON_PROFILE_MOBILE_NUMBER")+"*"),r.createElement("div",{style:{width:"100%"}},r.createElement(t.MobileNumber,{value:k,style:{width:"100%"},name:"mobileNumber",placeholder:"Enter a valid Mobile No.",onChange:e=>(e=>{U(e),"employee"!==E||new RegExp(/^[6-9]{1}[0-9]{9}$/).test(e)?ae({...le,mobileNumber:null}):ae({...le,mobileNumber:{type:"pattern",message:"CORE_COMMON_PROFILE_MOBILE_NUMBER_INVALID"}})})(e),disable:!0,required:!0,pattern:"[6-9]{1}[0-9]{9}",type:"tel",title:_("CORE_COMMON_PROFILE_MOBILE_NUMBER_INVALID")}),(null==le?void 0:le.mobileNumber)&&r.createElement(t.CardLabelError,{style:{margin:0,padding:0}}," ",_(null==le||null===(f=le.mobileNumber)||void 0===f?void 0:f.message)," "))),r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+_("CORE_COMMON_PROFILE_EMAIL")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,{t:_,type:"email",isMandatory:!1,placeholder:_("EMAIL_VALIDATION"),optionKey:"i18nKey",name:"email",value:A,onChange:e=>me(e.target.value),disabled:!1}),(null==le?void 0:le.emailAddress)&&r.createElement(t.CardLabelError,null," ",_(null==le||null===(m=le.emailAddress)||void 0===m?void 0:m.message)," "))),r.createElement(t.LabelFieldPair,null,r.createElement("div",{style:{width:"100%"}},0==H?r.createElement("a",{style:{color:"orange",cursor:"default",marginBottom:"5",cursor:"pointer"},onClick:()=>G(!H)},_("CORE_COMMON_CHANGE_PASSWORD")):null,H?r.createElement("div",{style:{marginTop:"10px"}},r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+_("CORE_COMMON_PROFILE_CURRENT_PASSWORD")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,{t:_,type:"password",isMandatory:!1,name:"name",pattern:"^([a-zA-Z0-9@#$%])+$",onChange:e=>{return Z(t=e.target.value),void(new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(t)?ae({...le,currentPassword:null}):ae({...le,currentPassword:{type:"pattern",message:"CORE_COMMON_PROFILE_PASSWORD_INVALID"}}));var t},disabled:!1}),(null==le?void 0:le.currentPassword)&&r.createElement(t.CardLabelError,null,_(null==le||null===(v=le.currentPassword)||void 0===v?void 0:v.message)))),r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+_("CORE_COMMON_PROFILE_NEW_PASSWORD")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,{t:_,type:"password",isMandatory:!1,name:"name",pattern:"^([a-zA-Z0-9@#$%])+$",onChange:e=>{return $(t=e.target.value),void(new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(t)?ae({...le,newPassword:null}):ae({...le,newPassword:{type:"pattern",message:"CORE_COMMON_PROFILE_PASSWORD_INVALID"}}));var t},disabled:!1}),(null==le?void 0:le.newPassword)&&r.createElement(t.CardLabelError,null,_(null==le||null===(p=le.newPassword)||void 0===p?void 0:p.message)))),r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+_("CORE_COMMON_PROFILE_CONFIRM_PASSWORD")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,{t:_,type:"password",isMandatory:!1,name:"name",pattern:"^([a-zA-Z0-9@#$%])+$",onChange:e=>{return K(t=e.target.value),void(new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(t)?ae({...le,confirmPassword:null}):ae({...le,confirmPassword:{type:"pattern",message:"CORE_COMMON_PROFILE_PASSWORD_INVALID"}}));var t},disabled:!1}),(null==le?void 0:le.confirmPassword)&&r.createElement(t.CardLabelError,null,_(null==le||null===(g=le.confirmPassword)||void 0===g?void 0:g.message))))):"")),"employee"===E&&ue?r.createElement("button",{onClick:pe,style:{marginTop:"24px",backgroundColor:"#F47738",width:"100%",height:"40px",color:"white",maxWidth:ue?"100%":"240px",borderBottom:"1px solid black",fontWeight:"700",fontSize:"17px"}},_("CORE_COMMON_SAVE")):null))),"employee"!==E||ue?null:r.createElement("div",{className:"action-bar-wrap"},r.createElement(t.SubmitBar,{t:_,label:_("CORE_COMMON_SAVE"),onSubmit:pe})),J&&r.createElement(t.Toast,{type:J.key,label:_("success"===J.key?"CORE_COMMON_PROFILE_UPDATE_SUCCESS":J.action),onClose:()=>Q(null),style:{maxWidth:"670px"}}),1==z?r.createElement(ne,{setProfilePic:function(e){try{function t(e){V(null==e?void 0:e.thumbs[0]),de()}return j(e),Promise.resolve(e?Promise.resolve(function(e,t){try{return Promise.resolve(Digit.UploadServices.Filefetch(e,t)).then(function(e){return e.data.fileStoreIds&&0!==e.data.fileStoreIds.length?{thumbs:e.data.fileStoreIds.map(e=>e.url.split(",")[3]),images:e.data.fileStoreIds.map(e=>Digit.Utils.getFileUrl(e.url))}:null})}catch(e){return Promise.reject(e)}}([e],C)).then(t):t(null))}catch(e){return Promise.reject(e)}},closeDrawer:de,userType:E,removeProfilePic:()=>{j(null),V(null)},showToast:ve}):"")},ie=e=>{var o,l,a;let{module:c}=e;const s=Digit.UserService.getUser(),{t:d}=((null==s||null===(o=s.info)||void 0===o?void 0:o.tenantId)||Digit.ULBService.getCurrentTenantId(),i.useTranslation()),f=Digit.SessionStorage.get("initData").stateInfo,m=Digit.StoreData.getCurrentLanguage(),[v,p]=n.useState(m),[g,h]=n.useState(!1),[E,y]=n.useState(""),_=()=>r.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.createElement("path",{d:"M12 24C5.38053 24 0 18.6143 0 12C0 5.38054 5.38053 1.90735e-06 12 1.90735e-06C18.6143 1.90735e-06 24 5.38054 24 12C24 18.6143 18.6143 24 12 24ZM16.3488 10.7852L11.3855 7.25251C11.1263 7.0701 10.8238 6.97889 10.5214 6.97889C10.291 6.97889 10.0557 7.03172 9.83976 7.14202C9.34054 7.40118 9.02857 7.91006 9.02857 8.46694L9.02877 15.5323C9.02877 16.0892 9.34076 16.5979 9.83996 16.8572C10.3344 17.1116 10.9296 17.0732 11.3857 16.7467L16.349 13.214C16.7426 12.9356 16.9778 12.4795 16.9778 11.9996C16.9776 11.5197 16.7426 11.0636 16.3489 10.7852L16.3488 10.7852Z",fill:"white"})),{isLoading:b,data:C}=Digit.Hooks.useGetHowItWorksJSON(Digit.ULBService.getStateId()),O=null==C||null===(l=C.MdmsRes["common-masters"])||void 0===l||null===(a=l.howItWorks[0])||void 0===a?void 0:a[""+c];return b?r.createElement(t.Loader,null):r.createElement(n.Fragment,null,r.createElement("div",{className:"how-it-works-page"},r.createElement(t.BackButton,null),r.createElement("div",{className:"how-it-works-page-header"},r.createElement(t.Header,null,d(O.screenHeader?O.screenHeader:"HOW_IT_WORKS"))),r.createElement("div",{className:"language-selector",style:{margin:"10px"}},[{label:"ENGLISH",value:"en_IN"},{label:"हिंदी",value:"hi_IN"}].map((e,t)=>r.createElement("div",{className:"language-button-container",key:t},r.createElement(u.CustomButton,{selected:e.value===v,text:e.label,onClick:()=>(e=>{p(e.value),Digit.LocalizationService.changeLanguage(e.value,f.code)})(e)})))),O.videosJson.map((e,t)=>r.createElement("div",null,r.createElement("div",{className:"WhatsNewCard",style:{float:"left",position:"relative",width:"100%",marginBottom:10}},r.createElement("div",{className:"video-icon",onClick:()=>{return t=e,y("hi_IN"===v?t.hi_IN:t.en_IN),void h(!0);var t}},r.createElement("div",{className:"vid-svg"},r.createElement(_,null))),r.createElement("div",{className:"how-it-works-header-description"},r.createElement("h2",null,d(e.headerLabel)),r.createElement("p",null,d(e.description)))))),O.pdfHeader&&O.pdfDesc&&r.createElement("div",{className:"WhatsNewCard",style:{position:"relative",width:"100%",marginBottom:10,display:"inline-block"}},r.createElement("div",{className:"how-it-works-pdf-section"},r.createElement("div",{className:"pdf-icon-header-desc"},r.createElement("div",{className:"pdf-icon"},r.createElement(t.PDFSvg,null)),r.createElement("div",{className:"pdf-header-desc"},r.createElement("h2",null,d(O.pdfHeader)),r.createElement("p",null,d(O.pdfDesc)))),r.createElement("div",{className:"download-icon"},r.createElement(t.DownloadImgIcon,null)))),g&&r.createElement("div",{className:"how-it-works-video-play"},r.createElement("div",{className:"close-button"},r.createElement(t.CloseSvg,{onClick:()=>{h(!1)}})),r.createElement("video",{width:500,height:500,controls:!0,autoPlay:!0},r.createElement("source",{src:E,type:"video/mp4"})))))},oe=[{texts:{header:"CS_LOGIN_PROVIDE_MOBILE_NUMBER",cardText:"CS_LOGIN_TEXT",nextText:"CS_COMMONS_NEXT",submitBarLabel:"CS_COMMONS_NEXT"},inputs:[{label:"CORE_COMMON_MOBILE_NUMBER",type:"text",name:"mobileNumber",error:"ERR_HRMS_INVALID_MOB_NO",validation:{required:!0,minLength:10,maxLength:10}}]},{texts:{header:"CS_LOGIN_OTP",cardText:"CS_LOGIN_OTP_TEXT",nextText:"CS_COMMONS_NEXT",submitBarLabel:"CS_COMMONS_NEXT"}},{texts:{header:"CS_LOGIN_PROVIDE_NAME",cardText:"CS_LOGIN_NAME_TEXT",nextText:"CS_COMMONS_NEXT",submitBarLabel:"CS_COMMONS_NEXT"},inputs:[{label:"CORE_COMMON_NAME",type:"text",name:"name",error:"CORE_COMMON_NAME_VALIDMSG",validation:{required:!0,minLength:1,pattern:/^[^{0-9}^\$\"<>?\\\\~!@#$%^()+={}\[\]*,/_:;“”‘’]{1,50}$/i}}]}],le=e=>{let{t:n,onSelect:i,mobileNumber:o,onMobileChange:l,config:a,canSubmit:u}=e;return r.createElement(t.FormStep,{isDisabled:!(10===o.length&&u),onSelect:i,config:a,t:n,componentInFront:"+91",onChange:l,value:o})},ae=e=>{let{config:n,onSelect:i,t:o,isDisabled:l}=e;return r.createElement(t.FormStep,{config:n,onSelect:i,t:o,isDisabled:l})},ue=e=>{let{config:i,otp:o,onOtpChange:l,onResend:a,onSelect:u,t:c,error:s,userType:d="citizen",canSubmit:f}=e;const[m,v]=n.useState(30);!function(e,t){const r=n.useRef();n.useEffect(()=>{r.current=e},[e]),n.useEffect(()=>{if(null!==t){const e=setInterval(function(){r.current()},t);return()=>clearInterval(e)}},[t])}(()=>{v(m-1)},m>0?1e3:null);const p=()=>{a(),v(2)};return"employee"===d?r.createElement(n.Fragment,null,r.createElement(t.OTPInput,{length:6,onChange:l,value:o}),m>0?r.createElement(t.CardText,null,c("CS_RESEND_ANOTHER_OTP")+" "+m+" "+c("CS_RESEND_SECONDS")):r.createElement("p",{className:"card-text-button resend-otp",onClick:p},c("CS_RESEND_OTP")),!s&&r.createElement(t.CardLabelError,null,c("CS_INVALID_OTP"))):r.createElement(t.FormStep,{onSelect:u,config:i,t:c,isDisabled:!(6===(null==o?void 0:o.length)&&f)},r.createElement(t.OTPInput,{length:6,onChange:l,value:o}),m>0?r.createElement(t.CardText,null,c("CS_RESEND_ANOTHER_OTP")+" "+m+" "+c("CS_RESEND_SECONDS")):r.createElement("p",{className:"card-text-button",onClick:p},c("CS_RESEND_OTP")),!s&&r.createElement(t.CardLabelError,null,c("CS_INVALID_OTP")))};var ce;const se={type:"register"},de={type:"login"},fe="/"+(null===(ce=window)||void 0===ce?void 0:ce.contextPath)+"/citizen",me=(e,t)=>(null==e?void 0:e.from)||(null==t?void 0:t.from)||fe,ve=e=>{var o,l;let{stateCode:u,isUserRegistered:c=!0}=e;const{t:s}=i.useTranslation(),d=a.useLocation(),{path:f}=a.useRouteMatch(),m=a.useHistory(),[v,p]=n.useState(null),[g,h]=n.useState(null),[E,y]=n.useState(!0),[_,b]=n.useState(null),[C,O]=n.useState(c?{}:null==d||null===(o=d.state)||void 0===o?void 0:o.data),[S,w]=n.useState(null),N=Digit.Hooks.useQueryParams(),[I,D]=n.useState(!1),[T,A]=n.useState(!0),[L,R]=n.useState(!0);n.useEffect(()=>{let e;return g&&(S&&(clearTimeout(S),w(null)),e=setTimeout(()=>{h("")},5e3),w(e)),()=>{e&&clearTimeout(e)}},[g]),n.useEffect(()=>{var e;if(!v)return;Digit.SessionStorage.set("citizen.userRequestObject",v),Digit.UserService.setUser(v),((e,t,n)=>{var r,i;let o=null===(r=JSON.parse(sessionStorage.getItem("Digit.initData")))||void 0===r||null===(i=r.value)||void 0===i?void 0:i.selectedLanguage;localStorage.setItem("Citizen.tenant-id",n),localStorage.setItem("tenant-id",n),localStorage.setItem("citizen.userRequestObject",JSON.stringify(e)),localStorage.setItem("locale",o),localStorage.setItem("Citizen.locale",o),localStorage.setItem("token",t),localStorage.setItem("Citizen.token",t),localStorage.setItem("user-info",JSON.stringify(e)),localStorage.setItem("Citizen.user-info",JSON.stringify(e))})(null==v?void 0:v.info,null==v?void 0:v.access_token,u);const t=(null===(e=d.state)||void 0===e?void 0:e.from)||fe;var n;Digit.ULBService.getCitizenCurrentTenant(!0)?m.replace(t):m.replace("/"+(null===(n=window)||void 0===n?void 0:n.contextPath)+"/citizen/select-location",{redirectBackTo:t})},[v]);const x=n.useMemo(()=>oe.map(e=>{const t={};for(const n in e.texts)t[n]=s(e.texts[n]);return{...e,texts:t}},[oe])),P=()=>Digit.UserService.getType(),M=function(e){return Promise.resolve(te(function(){return Promise.resolve(Digit.UserService.sendOtp(e,u)).then(function(e){return[e,null]})},function(e){return[null,e]}))};return r.createElement("div",{className:"citizen-form-wrapper"},r.createElement(a.Switch,null,r.createElement(t.AppContainer,null,r.createElement(t.BackButton,null),r.createElement(a.Route,{path:""+f,exact:!0},r.createElement(le,{onSelect:function(e){try{R(!1),O({...C,...e});const t={...e,tenantId:u,userType:P()};return Promise.resolve(c?Promise.resolve(M({otp:{...t,...de}})).then(function(e){var n;let[r,i]=e;var o,l,a;if(!i)return R(!0),void m.replace(f+"/otp",{from:me(d.state,N),role:null===(o=d.state)||void 0===o?void 0:o.role});R(!0),d.state&&"FSM_DSO"===d.state.role||m.push("/"+(null===(l=window)||void 0===l?void 0:l.contextPath)+"/citizen/register/name",{from:me(d.state,N),data:t}),null!==(n=d.state)&&void 0!==n&&n.role&&(R(!0),h("FSM_DSO"===(null===(a=d.state)||void 0===a?void 0:a.role)?s("ES_ERROR_DSO_LOGIN"):"User not registered."))}):Promise.resolve(M({otp:{...t,...se}})).then(function(e){let[t,n]=e;if(!n)return R(!0),void m.replace(f+"/otp",{from:me(d.state,N)});R(!0)}))}catch(e){return Promise.reject(e)}},config:x[0],mobileNumber:C.mobileNumber||"",onMobileChange:e=>{const{value:t}=e.target;O({...C,mobileNumber:t})},canSubmit:L,showRegisterLink:c&&!(null!==(l=d.state)&&void 0!==l&&l.role),t:s})),r.createElement(a.Route,{path:f+"/otp"},r.createElement(ue,{config:{...x[1],texts:{...x[1].texts,cardText:x[1].texts.cardText+" "+(C.mobileNumber||"")}},onOtpChange:e=>{O({...C,otp:e})},onResend:function(){try{const{mobileNumber:e}=C,t={mobileNumber:e,tenantId:u,userType:P()},n=function(){if(!c)return Promise.resolve(M({otp:{...t,...se}})).then(function(){});{const e=function(){if(c)return Promise.resolve(M({otp:{...t,...de}})).then(function(){})}();if(e&&e.then)return e.then(function(){})}}();return Promise.resolve(n&&n.then?n.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},onSelect:function(){try{return Promise.resolve(te(function(){y(!0),A(!1);const{mobileNumber:e,otp:t,name:n}=C;return function(){if(c){const n={username:e,password:t,tenantId:u,userType:P()};return Promise.resolve(Digit.UserService.authenticate(n)).then(function(e){var t,n,r;let{UserRequest:i,...o}=e;if(null!==(t=d.state)&&void 0!==t&&t.role){const e=i.roles.find(e=>e.code===d.state.role);if(!e||!e.code)return h(s("ES_ERROR_USER_NOT_PERMITTED")),void setTimeout(()=>m.replace(fe),5e3)}null!==(n=window)&&void 0!==n&&null!==(r=n.globalConfigs)&&void 0!==r&&r.getConfig("ENABLE_SINGLEINSTANCE")&&(i.tenantId=Digit.ULBService.getStateId()),p({info:i,...o})})}{const r=function(){if(!c)return Promise.resolve(Digit.UserService.registerUser({name:n,username:e,otpReference:t,tenantId:u},u)).then(function(e){var t,n;let{UserRequest:r,...i}=e;null!==(t=window)&&void 0!==t&&null!==(n=t.globalConfigs)&&void 0!==n&&n.getConfig("ENABLE_SINGLEINSTANCE")&&(r.tenantId=Digit.ULBService.getStateId()),p({info:r,...i})})}();if(r&&r.then)return r.then(function(){})}}()},function(){A(!0),y(!1)}))}catch(e){return Promise.reject(e)}},otp:C.otp,error:E,canSubmit:T,t:s})),r.createElement(a.Route,{path:f+"/name"},r.createElement(ae,{config:x[2],onSelect:function(e){try{const t={...C,tenantId:u,userType:P(),...e};return O({...C,...e}),D(!0),Promise.resolve(M({otp:{...t,...se}})).then(function(e){let[t,n]=e;t?(D(!1),m.replace(f+"/otp",{from:me(d.state,N)})):D(!1)})}catch(e){return Promise.reject(e)}},t:s,isDisabled:I})),g&&r.createElement(t.Toast,{type:"error",label:g,onClose:()=>h(null)}))))};var pe=e=>e instanceof HTMLElement;const ge={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"};var he=e=>null==e;const Ee=e=>"object"==typeof e;var ye=e=>!he(e)&&!Array.isArray(e)&&Ee(e)&&!(e instanceof Date),_e=e=>/^\w*$/.test(e),be=e=>e.filter(Boolean),Ce=e=>be(e.replace(/["|']/g,"").replace(/\[/g,".").replace(/\]/g,"").split("."));function Oe(e,t,n){let r=-1;const i=_e(t)?[t]:Ce(t),o=i.length,l=o-1;for(;++r<o;){const t=i[r];let o=n;if(r!==l){const n=e[t];o=ye(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}e[t]=o,e=e[t]}return e}var Se=function(e,t){void 0===t&&(t={});for(const n in e)_e(n)?t[n]=e[n]:Oe(t,n,e[n]);return t},we=e=>void 0===e,Ne=function(e,t,n){void 0===e&&(e={});const r=be(t.split(/[,[\].]+?/)).reduce((e,t)=>he(e)?e:e[t],e);return we(r)||r===e?we(e[t])?n:e[t]:r},Ie=(e,t)=>{pe(e)&&e.removeEventListener&&(e.removeEventListener("input",t),e.removeEventListener("change",t),e.removeEventListener("blur",t))};const De={isValid:!1,value:null};var Te=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.ref.checked?{isValid:!0,value:t.ref.value}:e,De):De,Ae=e=>"radio"===e.type,Le=e=>"file"===e.type,Re=e=>"checkbox"===e.type,xe=e=>"select-multiple"===e.type;const Pe={value:!1,isValid:!1},Me={value:!0,isValid:!0};var ke=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(e=>e&&e.ref.checked).map(e=>{let{ref:{value:t}}=e;return t});return{value:t,isValid:!!t.length}}const{checked:t,value:n,attributes:r}=e[0].ref;return t?r&&!we(r.value)?we(n)||""===n?Me:{value:n,isValid:!0}:Me:Pe}return Pe};function Ue(e,t,n,r,i){const o=e.current[t];if(o){const{ref:{value:e,disabled:t},ref:n,valueAsNumber:a,valueAsDate:u,setValueAs:c}=o;if(t&&r)return;return Le(n)?n.files:Ae(n)?Te(o.options).value:xe(n)?(l=n.options,[...l].filter(e=>{let{selected:t}=e;return t}).map(e=>{let{value:t}=e;return t})):Re(n)?ke(o.options).value:i?e:a?""===e?NaN:+e:u?n.valueAsDate:c?c(e):e}var l;if(n)return Ne(n.current,t)}function Be(e){return!e||e instanceof HTMLElement&&e.nodeType!==Node.DOCUMENT_NODE&&Be(e.parentNode)}var je=e=>ye(e)&&!Object.keys(e).length,Fe=e=>"boolean"==typeof e;function Ve(e,t){const n=_e(t)?[t]:Ce(t),r=1==n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=we(e)?r++:e[t[r++]];return e}(e,n);let i;r&&delete r[n[n.length-1]];for(let t=0;t<n.slice(0,-1).length;t++){let r,o=-1;const l=n.slice(0,-(t+1)),a=l.length-1;for(t>0&&(i=e);++o<l.length;){const t=l[o];r=r?r[t]:e[t],a===o&&(ye(r)&&je(r)||Array.isArray(r)&&!r.filter(e=>ye(e)&&!je(e)||Fe(e)).length)&&(i?delete i[t]:delete e[t]),i=r}}return e}const ze=(e,t)=>e&&e.ref===t;var We=e=>he(e)||!Ee(e);function He(e,t){if(We(e)||We(t))return t;for(const n in t){const r=e[n],i=t[n];try{e[n]=ye(r)&&ye(i)||Array.isArray(r)&&Array.isArray(i)?He(r,i):i}catch(e){}}return e}function Ge(e,t,r){if(We(e)||We(t)||e instanceof Date||t instanceof Date)return e===t;if(!n.isValidElement(e)){const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(const i of n){const n=e[i];if(!r||"ref"!==i){const e=t[i];if((ye(n)||Array.isArray(n))&&(ye(e)||Array.isArray(e))?!Ge(n,e,r):n!==e)return!1}}}return!0}function qe(e,t,n,r,i){let o=-1;for(;++o<e.length;){for(const r in e[o])Array.isArray(e[o][r])?(!n[o]&&(n[o]={}),n[o][r]=[],qe(e[o][r],Ne(t[o]||{},r,[]),n[o][r],n[o],r)):Ge(Ne(t[o]||{},r),e[o][r])?Oe(n[o]||{},r):n[o]=Object.assign(Object.assign({},n[o]),{[r]:!0});r&&!n.length&&delete r[i]}return n}var Ze=e=>"string"==typeof e,Xe=(e,t,n,r,i)=>{const o={};for(const t in e.current)(we(i)||(Ze(i)?t.startsWith(i):Array.isArray(i)&&i.find(e=>t.startsWith(e))))&&(o[t]=Ue(e,t,void 0,r));return n?Se(o):He(t,Se(o))},$e=e=>e instanceof RegExp,Ye=e=>ye(e)&&!$e(e)?e:{value:e,message:""},Ke=e=>"function"==typeof e,Je=e=>Ze(e)||n.isValidElement(e);function Qe(e,t,n){if(void 0===n&&(n="validate"),Je(e)||Fe(e)&&!e)return{type:n,message:Je(e)?e:"",ref:t}}var et=(e,t,n,r,i)=>t?Object.assign(Object.assign({},n[e]),{types:Object.assign(Object.assign({},n[e]&&n[e].types?n[e].types:{}),{[r]:i||!0})}):{},tt=function(e,t,n,r){let{ref:i,ref:{value:o},options:l,required:a,maxLength:u,minLength:c,min:s,max:d,pattern:f,validate:m}=n;try{let n=!1;const v=i.name,p={},g=Ae(i),h=Re(i),E=g||h,y=""===o,_=et.bind(null,v,t,p),b=function(e,t,n,r,o){void 0===r&&(r="maxLength"),void 0===o&&(o="minLength");const l=e?t:n;p[v]=Object.assign({type:e?r:o,message:l,ref:i},_(e?r:o,l))};if(a&&(!g&&!h&&(y||he(o))||Fe(o)&&!o||h&&!ke(l).isValid||g&&!Te(l).isValid)){const{value:n,message:r}=Je(a)?{value:!!a,message:a}:Ye(a);if(n&&(p[v]=Object.assign({type:"required",message:r,ref:E?((e.current[v].options||[])[0]||{}).ref:i},_("required",r)),!t))return Promise.resolve(p)}if(!(he(s)&&he(d)||""===o)){let e,n;const r=Ye(d),l=Ye(s);if(isNaN(o)){const t=i.valueAsDate||new Date(o);Ze(r.value)&&(e=t>new Date(r.value)),Ze(l.value)&&(n=t<new Date(l.value))}else{const t=i.valueAsNumber||parseFloat(o);he(r.value)||(e=t>r.value),he(l.value)||(n=t<l.value)}if((e||n)&&(b(!!e,r.message,l.message,"max","min"),!t))return Promise.resolve(p)}if(Ze(o)&&!y&&(u||c)){const e=Ye(u),n=Ye(c),r=!he(e.value)&&o.length>e.value,i=!he(n.value)&&o.length<n.value;if((r||i)&&(b(r,e.message,n.message),!t))return Promise.resolve(p)}if(Ze(o)&&f&&!y){const{value:e,message:n}=Ye(f);if($e(e)&&!e.test(o)&&(p[v]=Object.assign({type:"pattern",message:n,ref:i},_("pattern",n)),!t))return Promise.resolve(p)}const C=function(){if(m){const o=Ue(e,v,r,!1,!0),a=E&&l?l[0].ref:i;return Ke(m)?Promise.resolve(m(o)).then(function(e){const r=Qe(e,a);if(r&&(p[v]=Object.assign(Object.assign({},r),_("validate",r.message)),!t))return n=!0,p}):function(){if(ye(m)){let r=!1;function e(){if(!je(i)&&(p[v]=Object.assign({ref:a},i),!t))return n=!0,p}let i={};const l=ee(Object.entries(m),function(e){let[n,l]=e;if(je(i)||t)return Promise.resolve(l(o)).then(function(e){const r=Qe(e,a,n);r&&(i=Object.assign(Object.assign({},r),_(n,r.message)),t&&(p[v]=i))});r=!0},function(){return r});return l&&l.then?l.then(e):e()}}()}}();return Promise.resolve(C&&C.then?C.then(function(e){return n?e:p}):n?C:p)}catch(e){return Promise.reject(e)}};const nt=function(e,t,n){void 0===n&&(n=[]);for(const r in t){const i=e+(ye(t)?"."+r:"["+r+"]");We(t[r])?n.push(i):nt(i,t[r],n)}return n};var rt=(e,t,n,r,i)=>{let o=void 0;return n.add(t),je(e)||(o=Ne(e,t),(ye(o)||Array.isArray(o))&&nt(t,o).forEach(e=>n.add(e))),we(o)?i?r:Ne(r,t):o},it=e=>{let{isOnBlur:t,isOnChange:n,isOnTouch:r,isTouched:i,isReValidateOnBlur:o,isReValidateOnChange:l,isBlurEvent:a,isSubmitted:u,isOnAll:c}=e;return!c&&(!u&&r?!(i||a):(u?o:t)?!a:!(u?l:n)||a)},ot=e=>e.substring(0,e.indexOf("[")),lt=(e,t)=>[...e].some(e=>((e,t)=>RegExp(("^"+t+"([|.)\\d+").replace(/\[/g,"\\[").replace(/\]/g,"\\]")).test(e))(t,e)),at="undefined"!=typeof window&&"undefined"!=typeof document;function ut(e){var t;let n;if(We(e)||at&&(e instanceof File||pe(e)))return e;if(!["Set","Map","Object","Date","Array"].includes(null===(t=e.constructor)||void 0===t?void 0:t.name))return e;if(e instanceof Date)return n=new Date(e.getTime()),n;if(e instanceof Set){n=new Set;for(const t of e)n.add(t);return n}if(e instanceof Map){n=new Map;for(const t of e.keys())n.set(t,ut(e.get(t)));return n}n=Array.isArray(e)?[]:{};for(const t in e)n[t]=ut(e[t]);return n}var ct=e=>({isOnSubmit:!e||e===ge.onSubmit,isOnBlur:e===ge.onBlur,isOnChange:e===ge.onChange,isOnAll:e===ge.all,isOnTouch:e===ge.onTouched}),st=e=>Ae(e)||Re(e);const dt="undefined"==typeof window,ft=at?"Proxy"in window:"undefined"!=typeof Proxy,mt=n.createContext(null);mt.displayName="RHFContext";const vt=e=>{const{as:t,render:r}=e,i=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["rules","as","render","defaultValue","control","onFocus"]),{field:o,meta:l}=function(e){let{name:t,rules:r,defaultValue:i,control:o,onFocus:l}=e;const a=n.useContext(mt);if("production"!==process.env.NODE_ENV&&!o&&!a)throw new Error("📋 Controller is missing `control` prop. https://react-hook-form.com/api#Controller");const{defaultValuesRef:u,setValue:c,register:s,unregister:d,trigger:f,mode:m,reValidateMode:{isReValidateOnBlur:v,isReValidateOnChange:p},formState:g,formStateRef:{current:{isSubmitted:h,touched:E,errors:y}},updateFormState:_,readFormStateRef:b,fieldsRef:C,fieldArrayNamesRef:O,shallowFieldsStateRef:S}=o||a.control,w=!lt(O.current,t),N=()=>!we(Ne(S.current,t))&&w?Ne(S.current,t):we(i)?Ne(u.current,t):i,[I,D]=n.useState(N()),T=n.useRef(I),A=n.useRef({focus:()=>null}),L=n.useRef(l||(()=>{Ke(A.current.focus)&&A.current.focus(),"production"!==process.env.NODE_ENV&&(Ke(A.current.focus)||console.warn("📋 'ref' from Controller render prop must be attached to a React component or a DOM Element whose ref provides a 'focus()' method"))})),R=n.useCallback(e=>!it(Object.assign({isBlurEvent:e,isReValidateOnBlur:v,isReValidateOnChange:p,isSubmitted:h,isTouched:!!Ne(E,t)},m)),[v,p,h,E,t,m]),x=n.useCallback(e=>{let[t]=e;const n=(e=>We(e)||!ye(e.target)||ye(e.target)&&!e.type?e:we(e.target.value)?e.target.checked:e.target.value)(t);return D(n),T.current=n,n},[]),P=n.useCallback(e=>{if("production"!==process.env.NODE_ENV&&!t)return console.warn("📋 Field is missing `name` prop. https://react-hook-form.com/api#Controller");C.current[t]?C.current[t]=Object.assign({ref:C.current[t].ref},r):(s(Object.defineProperties({name:t,focus:L.current},{value:{set(e){D(e),T.current=e},get:()=>T.current}}),r),e=we(Ne(u.current,t))),e&&w&&D(N())},[r,t,s]);n.useEffect(()=>()=>d(t),[t]),n.useEffect(()=>{"production"!==process.env.NODE_ENV&&(we(I)&&console.warn("📋 "+t+" is missing in the 'defaultValue' prop of either its Controller (https://react-hook-form.com/api#Controller) or useForm (https://react-hook-form.com/api#useForm)"),!w&&we(i)&&console.warn("📋 Controller is missing `defaultValue` prop when using `useFieldArray`. https://react-hook-form.com/api#Controller")),P()},[P]),n.useEffect(()=>{!C.current[t]&&P(!0)});const M=n.useCallback(()=>{b.current.touched&&!Ne(E,t)&&(Oe(E,t,!0),_({touched:E})),R(!0)&&f(t)},[t,_,R,f,b]);return{field:{onChange:n.useCallback(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return c(t,x(n),{shouldValidate:R(),shouldDirty:!0})},[c,t,R]),onBlur:M,name:t,value:I,ref:A},meta:Object.defineProperties({invalid:!!Ne(y,t)},{isDirty:{get:()=>!!Ne(g.dirtyFields,t)},isTouched:{get:()=>!!Ne(g.touched,t)}})}}(e),a=Object.assign(Object.assign({},i),o);return t?n.isValidElement(t)?n.cloneElement(t,a):n.createElement(t,a):r?r(o,l):null},pt=e=>{let{control:n,t:i}=e;const o=window.Digit.Utils.browser.isMobile();return r.createElement(Fragment,null,r.createElement(t.SearchField,{className:"pt-form-field"},r.createElement("label",null,i("AUDIT_FROM_DATE_LABEL")),r.createElement(vt,{render:e=>r.createElement(t.DatePicker,{date:e.value,onChange:e.onChange}),name:"fromDate",control:n})),r.createElement(t.SearchField,{className:"pt-form-field"},r.createElement("label",null,i("AUDIT_TO_DATE_LABEL")),r.createElement(vt,{render:e=>r.createElement(t.DatePicker,{date:e.value,onChange:e.onChange}),name:"toDate",control:n})),r.createElement(t.SearchField,{className:"pt-search-action-submit"},r.createElement(t.Button,{style:{marginTop:o?"510px":"25px",marginLeft:o?"0":"-30px",maxWidth:o?"100%":"240px"},label:i("ES_COMMON_APPLY"),submit:!0})))},gt=e=>{var i;let{Controller:o,register:l,control:a,t:u,reset:c,previousPage:s,handleSubmit:d,tenantId:f,data:m,onSubmit:v,isLoading:p}=e;const[g,h]=n.useState([]),E=e=>r.createElement("div",{onClick:e.onClick},r.createElement(t.DownloadBtnCommon,null));n.useEffect(()=>{(null==m?void 0:m.length)>0&&h([null==m?void 0:m.map(e=>{let t={};return t[u("AUDIT_DATE_LABEL")]=y(null==e?void 0:e.timestamp),t[u("AUDIT_TIME_LABEL")]=_(null==e?void 0:e.timestamp),t[u("AUDIT_DATAVIEWED_LABEL")]=(null==e?void 0:e.dataView[0])+","+(null==e?void 0:e.dataView[1]),t[u("AUDIT_DATAVIEWED_BY_LABEL")]=null==e?void 0:e.dataViewedBy,t[u("AUDIT_ROLE_LABEL")]=null==e?void 0:e.roles.map(e=>e.name).join(","),{...t}})])},[m]);const y=e=>{if(null==e||null==e||""==e)return"NA";const t=new Date(e);let n=t.getMonth()+1,r=t.getDate();return n=(n>9?"":"0")+n,r=(r>9?"":"0")+r,r+"/"+n+"/"+t.getFullYear()},_=e=>{if(null==e||null==e||""==e)return"NA";const t=new Date(e);let n=t.getHours(),r=t.getMinutes(),i=n>12?"PM":"AM";return n=n>12?n-12:n,n=(n>9?"":"0")+n,r=(r>9?"":"0")+r,n+":"+r+" "+i},[b,C]=n.useReducer(function(e,t){switch(t.type){case"set":return t.payload;case"remove":return!1}},!1),O=()=>{C({type:"remove"})},S=()=>r.createElement("div",{className:"InboxMobilePopupCloseButtonWrapper",onClick:O},r.createElement(t.CloseSvg,null)),w={Controller:o,register:l,control:a,t:u,reset:c,previousPage:s},N=n.useCallback(e=>{let{currentlyActiveMobileModal:n,searchFormFieldsComponentProps:i,tenantId:o,...l}=e;return(e=>{let{currentlyActiveMobileModal:n,searchFormFieldsComponentProps:i,tenantId:o,...l}=e;const{closeMobilePopupModal:a}=l;switch(n){case"SearchFormComponent":return r.createElement(t.SearchForm,l,r.createElement(S,null),r.createElement("div",{className:"MobilePopupHeadingWrapper"},r.createElement("h2",null,u("PRIVACY_AUDIT_REPORT"),":")),r.createElement(pt,I({},i,{closeMobilePopupModal:a,tenantId:o,t:u})));default:return r.createElement("span",null)}})({currentlyActiveMobileModal:n,searchFormFieldsComponentProps:i,tenantId:o,...l})},[b]);null==m||null===(i=m.roles)||void 0===i||i.forEach(e=>{});const D=n.useMemo(()=>null!=m&&m.display||""===m?[]:null==m?void 0:m.map(e=>{var t;return{[u("AUDIT_DATE_LABEL")]:y(e.timestamp),[u("AUDIT_TIME_LABEL")]:_(e.timestamp),[u("AUDIT_DATAVIEWED_LABEL")]:e.dataView[0]+","+e.dataView[1],[u("AUDIT_DATAVIEWED_BY_LABEL")]:e.dataViewedBy,[u("AUDIT_ROLE_LABEL")]:null===(t=e.roles.slice(0,3))||void 0===t?void 0:t.map(e=>e.name).join(",")}}),[m]);return r.createElement(r.Fragment,null,r.createElement(t.BackButton,null),r.createElement("div",{className:"sideContent",style:{marginLeft:"70%",marginTop:"-12%"}},r.createElement(E,{className:"mrlg cursorPointer",onClick:()=>(e=>{if(void 0!==(null==e?void 0:e[0]))return Digit.Download.Excel(null==e?void 0:e[0],"AuditReport")})(g)})),r.createElement(t.Header,null,u("PRIVACY_AUDIT_REPORT"),":"),r.createElement("div",{className:"digit-search-box"},r.createElement(t.SearchAction,{text:u("ES_COMMON_SEARCH"),handleActionClick:()=>C({type:"set",payload:"SearchFormComponent"}),tenantId:f,t:u})),b?r.createElement(t.PopUp,null,r.createElement(N,{onSubmit:e=>{C({type:"remove"}),v(e)},handleSubmit:d,id:"search-form",className:"rm-mb form-field-flex-one inboxPopupMobileWrapper",searchFormFieldsComponentProps:w,currentlyActiveMobileModal:b,closeMobilePopupModal:O,tenantId:f})):null,p&&r.createElement(t.Loader,null),r.createElement(t.DetailsCard,{data:D}))},ht=e=>{let{tenantId:i,t:o,onSubmit:l,data:a,count:c}=e;const s=Digit.SessionStorage.get("AUDIT_APPLICATION_DETAIL")||{offset:0,limit:5,sortOrder:"DESC"},{register:d,control:f,handleSubmit:m,setValue:v,getValues:p,reset:g}=function(e){let{mode:t=ge.onSubmit,reValidateMode:r=ge.onChange,resolver:i,context:o,defaultValues:l={},shouldFocusError:a=!0,shouldUnregister:u=!0,criteriaMode:c}=void 0===e?{}:e;const s=n.useRef({}),d=n.useRef({}),f=n.useRef({}),m=n.useRef(new Set),v=n.useRef({}),p=n.useRef({}),g=n.useRef({}),h=n.useRef({}),E=n.useRef(l),y=n.useRef(!1),_=n.useRef(!1),b=n.useRef(),C=n.useRef({}),O=n.useRef({}),S=n.useRef(o),w=n.useRef(i),N=n.useRef(new Set),I=n.useRef(ct(t)),{isOnSubmit:D,isOnTouch:T}=I.current,A=c===ge.all,[L,R]=n.useState({isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touched:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!D,errors:{}}),x=n.useRef({isDirty:!ft,dirtyFields:!ft,touched:!ft||T,isValidating:!ft,isSubmitting:!ft,isValid:!ft}),P=n.useRef(L),M=n.useRef(),{isOnBlur:k,isOnChange:U}=n.useRef(ct(r)).current;S.current=o,w.current=i,P.current=L,C.current=u?{}:je(C.current)?ut(l):C.current;const B=n.useCallback(function(e){void 0===e&&(e={}),y.current||(P.current=Object.assign(Object.assign({},P.current),e),R(P.current))},[]),j=()=>x.current.isValidating&&B({isValidating:!0}),F=n.useCallback(function(e,t,n,r,i){void 0===n&&(n=!1),void 0===r&&(r={});let o=n||(e=>{let{errors:t,name:n,error:r,validFields:i,fieldsWithValidation:o}=e;const l=we(r),a=Ne(t,n);return l&&!!a||!l&&!Ge(a,r,!0)||l&&Ne(o,n)&&!Ne(i,n)})({errors:P.current.errors,error:t,name:e,validFields:h.current,fieldsWithValidation:g.current});const l=Ne(P.current.errors,e);t?(Ve(h.current,e),o=o||!l||!Ge(l,t,!0),Oe(P.current.errors,e,t)):((Ne(g.current,e)||w.current)&&(Oe(h.current,e,!0),o=o||l),Ve(P.current.errors,e)),(o&&!he(n)||!je(r)||x.current.isValidating)&&B(Object.assign(Object.assign(Object.assign({},r),w.current?{isValid:!!i}:{}),{isValidating:!1}))},[]),V=n.useCallback((e,t)=>{const{ref:n,options:r}=s.current[e],i=at&&pe(n)&&he(t)?"":t;Ae(n)?(r||[]).forEach(e=>{let{ref:t}=e;return t.checked=t.value===i}):Le(n)&&!Ze(i)?n.files=i:xe(n)?[...n.options].forEach(e=>e.selected=i.includes(e.value)):Re(n)&&r?r.length>1?r.forEach(e=>{let{ref:t}=e;return t.checked=Array.isArray(i)?!!i.find(e=>e===t.value):i===t.value}):r[0].ref.checked=!!i:n.value=i},[]),z=n.useCallback((e,t)=>{if(x.current.isDirty){const n=J();return e&&t&&Oe(n,e,t),!Ge(n,E.current)}return!1},[]),W=n.useCallback(function(e,t){if(void 0===t&&(t=!0),x.current.isDirty||x.current.dirtyFields){const n=!Ge(Ne(E.current,e),Ue(s,e,C)),r=Ne(P.current.dirtyFields,e),i=P.current.isDirty;n?Oe(P.current.dirtyFields,e,!0):Ve(P.current.dirtyFields,e);const o={isDirty:z(),dirtyFields:P.current.dirtyFields},l=x.current.isDirty&&i!==o.isDirty||x.current.dirtyFields&&r!==Ne(P.current.dirtyFields,e);return l&&t&&B(o),l?o:{}}return{}},[]),H=n.useCallback(function(e,t){try{return"production"===process.env.NODE_ENV||s.current[e]?Promise.resolve(tt(s,A,s.current[e],C)).then(function(n){const r=n[e];return F(e,r,t),we(r)}):(console.warn("📋 Field is missing with `name` attribute: ",e),Promise.resolve(!1))}catch(e){return Promise.reject(e)}},[F,A]),G=n.useCallback(function(e){try{return Promise.resolve(w.current(J(),S.current,A)).then(function(t){let{errors:n}=t;const r=P.current.isValid;if(Array.isArray(e)){const t=e.map(e=>{const t=Ne(n,e);return t?Oe(P.current.errors,e,t):Ve(P.current.errors,e),!t}).every(Boolean);return B({isValid:je(n),isValidating:!1}),t}{const t=Ne(n,e);return F(e,t,r!==je(n),{},je(n)),!t}})}catch(e){return Promise.reject(e)}},[F,A]),q=n.useCallback(function(e){try{let n=!1;function t(e){return n?e:Promise.resolve(H(r))}const r=e||Object.keys(s.current);if(j(),w.current)return Promise.resolve(G(r));const i=function(){if(Array.isArray(r))return!e&&(P.current.errors={}),Promise.resolve(Promise.all(r.map(function(e){try{return Promise.resolve(H(e,null))}catch(e){return Promise.reject(e)}}))).then(function(e){B({isValidating:!1});const t=e.every(Boolean);return n=!0,t})}();return Promise.resolve(i&&i.then?i.then(t):t(i))}catch(e){return Promise.reject(e)}},[G,H]),Z=n.useCallback((e,t,n)=>{let{shouldDirty:r,shouldValidate:i}=n;const o={};Oe(o,e,t);for(const n of nt(e,t))s.current[n]&&(V(n,Ne(o,n)),r&&W(n),i&&q(n))},[q,V,W]),X=n.useCallback((e,t,n)=>{if(!u&&!We(t)&&Oe(C.current,e,Array.isArray(t)?[...t]:Object.assign({},t)),s.current[e])V(e,t),n.shouldDirty&&W(e),n.shouldValidate&&q(e);else if(!We(t)&&(Z(e,t,n),N.current.has(e))){const r=ot(e)||e;Oe(d.current,e,t),O.current[r]({[r]:Ne(d.current,r)}),(x.current.isDirty||x.current.dirtyFields)&&n.shouldDirty&&(Oe(P.current.dirtyFields,e,((e,t,n)=>He(qe(e,t,n.slice(0,e.length)),qe(t,e,n.slice(0,e.length))))(t,Ne(E.current,e,[]),Ne(P.current.dirtyFields,e,[]))),B({isDirty:!Ge(Object.assign(Object.assign({},J()),{[e]:t}),E.current)}))}!u&&Oe(C.current,e,t)},[W,V,Z]),$=e=>_.current||m.current.has(e)||m.current.has((e.match(/\w+/)||[])[0]),Y=e=>{let t=!0;if(!je(v.current))for(const n in v.current)e&&v.current[n].size&&!v.current[n].has(e)&&!v.current[n].has(ot(e))||(p.current[n](),t=!1);return t};function K(e){if(!u){let t=ut(e);for(const e of N.current)_e(e)&&!t[e]&&(t=Object.assign(Object.assign({},t),{[e]:[]}));return t}return e}function J(e){if(Ze(e))return Ue(s,e,C);if(Array.isArray(e)){const t={};for(const n of e)Oe(t,n,Ue(s,n,C));return t}return K(Xe(s,ut(C.current),u))}b.current=b.current?b.current:function(e){let{type:t,target:n}=e;try{let e=n.name;const r=s.current[e];let i,o;return Promise.resolve(function(){if(r){function l(){!a&&Y(e),F(e,i,f,d,o)}const a="blur"===t,c=it(Object.assign({isBlurEvent:a,isReValidateOnChange:U,isReValidateOnBlur:k,isTouched:!!Ne(P.current.touched,e),isSubmitted:P.current.isSubmitted},I.current));let d=W(e,!1),f=!je(d)||!a&&$(e);if(a&&!Ne(P.current.touched,e)&&x.current.touched&&(Oe(P.current.touched,e,!0),d=Object.assign(Object.assign({},d),{touched:P.current.touched})),!u&&Re(n)&&Oe(C.current,e,Ue(s,e)),c)return!a&&Y(e),(!je(d)||f&&je(d))&&B(d);j();const m=w.current?Promise.resolve(w.current(J(),S.current,A)).then(function(t){let{errors:r}=t;const l=P.current.isValid;if(i=Ne(r,e),Re(n)&&!i&&w.current){const t=ot(e),n=Ne(r,t,{});n.type&&n.message&&(i=n),t&&(n||Ne(P.current.errors,t))&&(e=t)}o=je(r),l!==o&&(f=!0)}):Promise.resolve(tt(s,A,r,C)).then(function(t){i=t[e]});return m&&m.then?m.then(l):l()}}())}catch(e){return Promise.reject(e)}};const Q=n.useCallback(function(e){void 0===e&&(e={});try{const t=je(s.current)?E.current:{};return Promise.resolve(w.current(Object.assign(Object.assign(Object.assign({},t),J()),e),S.current,A)).then(function(e){let{errors:t}=e;const n=je(t);P.current.isValid!==n&&B({isValid:n})})}catch(e){return Promise.reject(e)}},[A]),te=n.useCallback((e,t)=>{!function(e,t,n,r,i,o){const{ref:l,ref:{name:a}}=n,u=e.current[a];if(!i){const t=Ue(e,a,r);!we(t)&&Oe(r.current,a,t)}l.type&&u?Ae(l)||Re(l)?Array.isArray(u.options)&&u.options.length?(be(u.options).forEach(function(e,n){void 0===e&&(e={}),(Be(e.ref)&&ze(e,e.ref)||o)&&(Ie(e.ref,t),Ve(u.options,"["+n+"]"))}),u.options&&!be(u.options).length&&delete e.current[a]):delete e.current[a]:(Be(l)&&ze(u,l)||o)&&(Ie(l,t),delete e.current[a]):delete e.current[a]}(s,b.current,e,C,u,t),u&&(Ve(h.current,e.ref.name),Ve(g.current,e.ref.name))},[u]),ne=n.useCallback(e=>{if(_.current)B();else{for(const t of m.current)if(t.startsWith(e)){B();break}Y(e)}},[]),re=n.useCallback((e,t)=>{e&&(te(e,t),u&&!be(e.options||[]).length&&(Ve(P.current.errors,e.ref.name),Oe(P.current.dirtyFields,e.ref.name,!0),B({isDirty:z()}),x.current.isValid&&w.current&&Q(),ne(e.ref.name)))},[Q,te]),ie=n.useCallback((e,t,n)=>{const r=n?v.current[n]:m.current;let i=Xe(s,ut(C.current),u,!1,e);if(Ze(e)){const n=ot(e)||e;return N.current.has(n)&&(i=Object.assign(Object.assign({},f.current),i)),rt(i,e,r,we(Ne(E.current,e))?t:Ne(E.current,e),!0)}const o=we(t)?E.current:t;return Array.isArray(e)?e.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:rt(i,t,r,o)}),{}):(_.current=we(n),Se(!je(i)&&i||o))},[]);function oe(e,t){if(void 0===t&&(t={}),"production"!==process.env.NODE_ENV){if(!e.name)return console.warn("📋 Field is missing `name` attribute",e,"https://react-hook-form.com/api#useForm");if(N.current.has(e.name.split(/\[\d+\]$/)[0])&&!RegExp(("^"+e.name.split(/\[\d+\]$/)[0]+"[\\d+].\\w+").replace(/\[/g,"\\[").replace(/\]/g,"\\]")).test(e.name))return console.warn('📋 `name` prop should be in object shape: name="test[index].name"',e,"https://react-hook-form.com/api#useFieldArray")}const{name:n,type:r,value:i}=e,o=Object.assign({ref:e},t),l=s.current,a=st(e),c=lt(N.current,n),d=t=>at&&(!pe(e)||t===e);let f,m=l[n],v=!0;if(m&&(a?Array.isArray(m.options)&&be(m.options).find(e=>i===e.ref.value&&d(e.ref)):d(m.ref)))return void(l[n]=Object.assign(Object.assign({},m),t));m=r?a?Object.assign({options:[...be(m&&m.options||[]),{ref:e}],ref:{type:r,name:n}},t):Object.assign({},o):o,l[n]=m;const p=we(Ne(C.current,n));je(E.current)&&p||(f=Ne(p?E.current:C.current,n),v=we(f),v||c||V(n,f)),je(t)||(Oe(g.current,n,!0),!D&&x.current.isValid&&tt(s,A,m,C).then(e=>{const t=P.current.isValid;je(e)?Oe(h.current,n,!0):Ve(h.current,n),t!==je(e)&&B()})),!u||c&&v||!c&&Ve(P.current.dirtyFields,n),r&&function(e,t,n){let{ref:r}=e;pe(r)&&n&&(r.addEventListener(t?"change":"input",n),r.addEventListener("blur",n))}(a&&m.options?m.options[m.options.length-1]:m,a||"select-one"===e.type,b.current)}const le=n.useCallback((e,t)=>function(n){try{n&&n.preventDefault&&(n.preventDefault(),n.persist());let r={},i=K(Xe(s,ut(C.current),u,!0));return x.current.isSubmitting&&B({isSubmitting:!0}),Promise.resolve(function(o,l){try{var u=function(){function o(){const o=function(){if(je(r)&&Object.keys(P.current.errors).every(e=>e in s.current))return B({errors:{},isSubmitting:!0}),Promise.resolve(e(i,n)).then(function(){});{function o(e){a&&((e,t)=>{for(const n in e)if(Ne(t,n)){const t=e[n];if(t){if(t.ref.focus&&we(t.ref.focus()))break;if(t.options){t.options[0].ref.focus();break}}}})(s.current,P.current.errors)}return P.current.errors=Object.assign(Object.assign({},P.current.errors),r),t?Promise.resolve(t(P.current.errors,n)).then(o):o()}}();if(o&&o.then)return o.then(function(){})}const l=w.current?Promise.resolve(w.current(i,S.current,A)).then(function(e){let{errors:t,values:n}=e;P.current.errors=r=t,i=n}):ee(Object.values(s.current),function(e){const t=function(){if(e){const{name:t}=e.ref;return Promise.resolve(tt(s,A,e,C)).then(function(e){e[t]?(Oe(r,t,e[t]),Ve(h.current,t)):Ne(g.current,t)&&(Ve(P.current.errors,t),Oe(h.current,t,!0))})}}();if(t&&t.then)return t.then(function(){})});return l&&l.then?l.then(o):o()}()}catch(e){return l(!0,e)}return u&&u.then?u.then(l.bind(null,!1),l.bind(null,!0)):l(!1,u)}(0,function(e,t){if(P.current.isSubmitting=!1,B({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:je(P.current.errors),submitCount:P.current.submitCount+1}),e)throw t;return t}))}catch(n){return Promise.reject(n)}},[a,A]);n.useEffect(()=>{i&&x.current.isValid&&Q(),M.current=M.current||!at?M.current:function(e,t){const n=new MutationObserver(()=>{for(const n of Object.values(e.current))if(n&&n.options)for(const e of n.options)e&&e.ref&&Be(e.ref)&&t(n);else n&&Be(n.ref)&&t(n)});return n.observe(window.document,{childList:!0,subtree:!0}),n}(s,re)},[re,E.current]),n.useEffect(()=>()=>{M.current&&M.current.disconnect(),y.current=!0,"production"===process.env.NODE_ENV&&Object.values(s.current).forEach(e=>re(e,!0))},[]),!i&&x.current.isValid&&(L.isValid=Ge(h.current,g.current)&&je(P.current.errors));const ae={trigger:q,setValue:n.useCallback(function(e,t,n){X(e,t,n||{}),$(e)&&B(),Y(e)},[X,q]),getValues:n.useCallback(J,[]),register:n.useCallback(function(e,t){if(!dt)if(Ze(e))oe({name:e},t);else{if(!ye(e)||!("name"in e))return t=>t&&oe(t,e);oe(e,t)}},[E.current]),unregister:n.useCallback(function(e){for(const t of Array.isArray(e)?e:[e])re(s.current[t],!0)},[]),formState:ft?new Proxy(L,{get:(e,t)=>{if("production"!==process.env.NODE_ENV&&"isValid"===t&&D&&console.warn("📋 `formState.isValid` is applicable with `onTouched`, `onChange` or `onBlur` mode. https://react-hook-form.com/api#formState"),t in e)return x.current[t]=!0,e[t]}}):L},ue=n.useMemo(()=>Object.assign({isFormDirty:z,updateWatchedValue:ne,shouldUnregister:u,updateFormState:B,removeFieldEventListener:te,watchInternal:ie,mode:I.current,reValidateMode:{isReValidateOnBlur:k,isReValidateOnChange:U},validateResolver:i?Q:void 0,fieldsRef:s,resetFieldArrayFunctionRef:O,useWatchFieldsRef:v,useWatchRenderFunctionsRef:p,fieldArrayDefaultValuesRef:d,validFieldsRef:h,fieldsWithValidationRef:g,fieldArrayNamesRef:N,readFormStateRef:x,formStateRef:P,defaultValuesRef:E,shallowFieldsStateRef:C,fieldArrayValuesRef:f},ae),[E.current,ne,u,te,ie]);return Object.assign({watch:function(e,t){return ie(e,t)},control:ue,handleSubmit:le,reset:n.useCallback(function(e,t){if(void 0===t&&(t={}),at)for(const e of Object.values(s.current))if(e){const{ref:t,options:n}=e,r=st(t)&&Array.isArray(n)?n[0].ref:t;if(pe(r))try{r.closest("form").reset();break}catch(e){}}s.current={},E.current=Object.assign({},e||E.current),e&&Y(""),Object.values(O.current).forEach(e=>Ke(e)&&e()),C.current=u?{}:ut(e||E.current),(e=>{let{errors:t,isDirty:n,isSubmitted:r,touched:i,isValid:o,submitCount:l,dirtyFields:a}=e;o||(h.current={},g.current={}),d.current={},m.current=new Set,_.current=!1,B({submitCount:l?P.current.submitCount:0,isDirty:!!n&&P.current.isDirty,isSubmitted:!!r&&P.current.isSubmitted,isValid:!!o&&P.current.isValid,dirtyFields:a?P.current.dirtyFields:{},touched:i?P.current.touched:{},errors:t?P.current.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})})(t)},[]),clearErrors:n.useCallback(function(e){e&&(Array.isArray(e)?e:[e]).forEach(e=>s.current[e]&&_e(e)?delete P.current.errors[e]:Ve(P.current.errors,e)),B({errors:e?P.current.errors:{}})},[]),setError:n.useCallback(function(e,t){const n=(s.current[e]||{}).ref;Oe(P.current.errors,e,Object.assign(Object.assign({},t),{ref:n})),B({isValid:!1}),t.shouldFocus&&n&&n.focus&&n.focus()},[]),errors:L.errors},ae)}({defaultValues:s}),h=e=>{if(null==e||null==e||""==e)return"NA";const t=new Date(e);let n=t.getMonth()+1,r=t.getDate();return n=(n>9?"":"0")+n,r=(r>9?"":"0")+r,r+"/"+n+"/"+t.getFullYear()},E=e=>{if(null==e||null==e||""==e)return"NA";const t=new Date(e);let n=t.getHours(),r=t.getMinutes(),i=n>12?"PM":"AM";return n=n>12?n-12:n,n=(n>9?"":"0")+n,r=(r>9?"":"0")+r,n+":"+r+" "+i},[y,_]=n.useState([]),b=e=>r.createElement("div",{onClick:e.onClick},r.createElement(u.DownloadBtnCommon,null));n.useEffect(()=>{d("offset",0),d("limit",5),d("sortOrder","DESC")},[d]),n.useEffect(()=>{(null==a?void 0:a.length)>0&&_([null==a?void 0:a.map(e=>{let t={};return t[o("AUDIT_DATE_LABEL")]=h(null==e?void 0:e.timestamp),t[o("AUDIT_TIME_LABEL")]=E(null==e?void 0:e.timestamp),t[o("AUDIT_DATAVIEWED_LABEL")]=(null==e?void 0:e.dataView[0])+","+(null==e?void 0:e.dataView[1]),t[o("AUDIT_DATAVIEWED_BY_LABEL")]=null==e?void 0:e.dataViewedBy,t[o("AUDIT_ROLE_LABEL")]=null==e?void 0:e.roles.map(e=>e.name).join(","),{...t}})])},[a]);const C=n.useCallback(e=>{0!==e.length&&(v("sortBy",e.id),v("sortOrder",e.desc?"DESC":"ASC"))},[]);function O(){v("offset",p("offset")-p("limit")),m(l)()}const S=window.Digit.Utils.browser.isMobile();if(S)return r.createElement(gt,{Controller:vt,register:d,control:f,t:o,reset:g,previousPage:O,handleSubmit:m,tenantId:i,data:a,onSubmit:l});const w=e=>r.createElement("span",{className:"cell-text"},e),N=n.useMemo(()=>[{Header:o("AUDIT_DATE_LABEL"),disableSortBy:!0,accessor:e=>{const t="NA"===e.timestamp?o("WS_NA"):h(e.timestamp);return w(""+t)}},{Header:o("AUDIT_TIME_LABEL"),disableSortBy:!0,accessor:e=>{const t="NA"===e.timestamp?o("WS_NA"):E(e.timestamp);return w(""+t)}},{Header:o(S?"AUDIT_DATAVIEWED_LABEL":"AUDIT_DATAVIEWED_PRIVACY"),disableSortBy:!0,accessor:e=>w(""+(null==e?void 0:e.dataView))},{Header:o(S?"AUDIT_DATAVIEWED_BY_LABEL":"AUDIT_DATAVIEWED_BY_PRIVACY"),disableSortBy:!0,accessor:e=>w(""+(null==e?void 0:e.dataViewedBy))},{Header:o("AUDIT_ROLE_LABEL"),disableSortBy:!0,accessor:e=>{var t;return w(""+(null==e||null===(t=e.roles.slice(0,3))||void 0===t?void 0:t.map(e=>e.name)))}}],[]);return r.createElement(r.Fragment,null,r.createElement("div",{style:{marginRight:"-70px"}}," ",r.createElement(t.BackButton,null)," "),r.createElement("div",{style:{marginTop:"30px",marginLeft:"30px"}}," ",r.createElement(t.Header,null,o("PRIVACY_AUDIT_REPORT"))," "),r.createElement(t.SearchForm,{className:"audit-card",onSubmit:l,handleSubmit:m},r.createElement(pt,{register:d,control:f,reset:g,tenantId:i,t:o,previousPage:O})),r.createElement("div",{style:{marginTop:"240px",marginLeft:"-55%",maxWidth:"80%",marginRight:"52px"}},null!=a&&a.display?r.createElement("div",{style:{marginTop:"20x",width:"1025px",marginLeft:"25px",backgroundColor:"white",height:"60px"}},o(a.display).split("\\n").map((e,t)=>r.createElement("p",{key:t,style:{textAlign:"center"}},e))):""!==a?r.createElement("div",{style:{backgroundColor:"white",marginRight:"-30px",marginLeft:"30px"}},r.createElement("div",{className:"sideContent",style:{float:"right",padding:"10px 30px"}},r.createElement(b,{className:"mrlg cursorPointer",onClick:()=>(e=>{if(void 0!==(null==e?void 0:e[0]))return Digit.Download.Excel(null==e?void 0:e[0],"AuditReport")})(y)})),r.createElement(u.Table,{t:o,data:a,totalRecords:c,columns:N,getCellProps:e=>({style:{minWidth:e.column.Header===o("ES_INBOX_APPLICATION_NO")?"240px":"",padding:"20px 18px",fontSize:"16px"}}),onPageSizeChange:function(e){v("limit",Number(e.target.value)),m(l)()},currentPage:p("offset")/p("limit"),onNextPage:function(){v("offset",p("offset")+p("limit")),m(l)()},onPrevPage:O,manualPagination:!1,pageSizeLimit:p("limit"),onSort:C,disableSort:!1,sortParams:[{id:p("sortBy"),desc:"DESC"===p("sortOrder")}]})):r.createElement(t.Loader,null)))},Et=e=>{var t,o;const{t:l}=i.useTranslation(),a=Digit.ULBService.getCitizenCurrentTenant(),[u,c]=n.useState({}),s=function(e,t){void 0===t&&(t="dayend");try{const n=e.match(/(\d{4})-(\d{1,2})-(\d{1,2})/),r=new Date(Date.UTC(n[1],n[2]-1,n[3]));return r.setMinutes(r.getMinutes()+r.getTimezoneOffset()),"dayend"===t&&(r.setHours(r.getHours()+24),r.setSeconds(r.getSeconds()-1)),r.getTime()}catch(t){return e}};n.useEffect(()=>{const e=Digit.SessionStorage.get("AUDIT_APPLICATION_DETAIL")||{};if(e){const t={...e};c(Object.keys(t).filter(e=>t[e]).reduce((e,n)=>({...e,[n]:"object"==typeof t[n]?t[n].code:t[n]}),{}))}},[]);const d={enabled:!!(u&&Object.keys(u).length>0)},f={...u},{isLoading:m,data:v}=Digit.Hooks.useAudit({tenantId:a,filters:{...f},config:d});return r.createElement(ht,{t:l,tenantId:a,onSubmit:function(e){Digit.SessionStorage.set("AUDIT_APPLICATION_DETAIL",{offset:0,limit:5,sortBy:"commencementDate",sortOrder:"DESC"});const t={...e,fromDate:s(null==e?void 0:e.fromDate),toDate:s(null==e?void 0:e.toDate)};c(Object.keys(t).filter(e=>t[e]).reduce((e,n)=>({...e,[n]:t[n]}),{}))},data:m?"":(null==v||null===(t=v.ElasticSearchData)||void 0===t?void 0:t.length)>0?null==v?void 0:v.ElasticSearchData:{display:"ES_COMMON_NO_DATA"},count:null==v||null===(o=v.ElasticSearchData)||void 0===o?void 0:o.length})},yt=e=>{var n,o,l,a,u,c,s,d,f,m,v,p,g,h,E,y;let{moduleCode:_}=e;const{t:b}=i.useTranslation(),C=Digit.ULBService.getCitizenCurrentTenant(),{isLoading:O,data:S}=Digit.Hooks.useStaticData(Digit.ULBService.getStateId()),{isLoading:w,error:N,data:I}=Digit.Hooks.useDynamicData({moduleCode:_,tenantId:C,filters:{},t:b}),D=e=>{let{module:n,styles:i}=e;switch(n){case"TL":return r.createElement(t.CaseIcon,{className:"fill-path-primary-main",styles:i});case"PT":return r.createElement(t.PTIcon,{className:"fill-path-primary-main",styles:i});case"MCOLLECT":return r.createElement(t.MCollectIcon,{className:"fill-path-primary-main",styles:i});case"PGR":return r.createElement(t.ComplaintIcon,{className:"fill-path-primary-main",styles:i});default:return r.createElement(t.CaseIcon,{className:"fill-path-primary-main",styles:i})}},T=null==S||null===(n=S.MdmsRes["common-masters"])||void 0===n||null===(o=n.StaticData[0])||void 0===o?void 0:o[""+_],A=e=>{let{module:n}=e;switch(n){case"PT":case"WS":return r.createElement("span",{className:"timerIcon"},r.createElement(t.TimerIcon,null));default:return null}},L=e=>{let{module:n}=e;switch(n){case"PT":return r.createElement("span",{className:"rupeeSymbol"},r.createElement(t.RupeeSymbol,null));case"WS":return r.createElement("span",{className:"timerIcon"},r.createElement(t.TimerIcon,null));default:return null}},R=e=>{switch(e){case"TL":case"PT":case"MCOLLECT":return{staticCommonContent:b("COMMON_VALIDITY"),validity:(null==T?void 0:T.validity)+b("1"===(null==T?void 0:T.validity)?"COMMON_DAY":"COMMON_DAYS")};case"PGR":return{staticCommonContent:b("ACTION_TEST_COMPLAINT_TYPES")};case"OBPS":return{staticCommonContent:b("BUILDING_PLAN_PERMIT_VALIDITY"),validity:(null==T?void 0:T.validity)+" "+b("1"===(null==T?void 0:T.validity)?"COMMON_DAY":"COMMON_DAYS")};default:return{staticCommonContent:""}}},x=e=>{switch(e){case"PT":return{staticDataOne:(null==T?void 0:T.staticDataOne)+" "+b("COMMON_DAYS"),staticDataOneHeader:b("APPLICATION_PROCESSING_TIME"),staticDataTwo:null==T?void 0:T.staticDataTwo,staticDataTwoHeader:b("APPLICATION_PROCESSING_FEE")};case"WS":return{staticDataOne:"",staticDataOneHeader:b("PAY_WATER_CHARGES_BY")+" "+(null==T?void 0:T.staticDataOne)+" "+b("COMMON_DAYS")+" "+b("OF_BILL_GEN_TO_AVOID_LATE_FEE"),staticDataTwo:(null==T?void 0:T.staticDataTwo)+" "+b("COMMON_DAYS"),staticDataTwoHeader:b("APPLICATION_PROCESSING_TIME")};default:return{}}};return O||w?r.createElement(t.Loader,null):T?r.createElement(r.Fragment,null,T&&null!=T&&T.payViaWhatsApp?r.createElement(t.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"}},r.createElement("div",{className:"pay-whatsapp-card",onClick:()=>{window.open(null==T?void 0:T.payViaWhatsApp)}},r.createElement("div",{className:"pay-whatsapp-text"},b("PAY_VIA_WHATSAPP")),r.createElement("div",{className:"whatsAppIconG"},r.createElement(t.WhatsappIconGreen,null)))):null,T&&null!=T&&T.helpline?r.createElement(t.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"}},r.createElement("div",{className:"static-home-Card"},r.createElement("div",{className:"static-home-Card-header"},b("CALL_CENTER_HELPLINE")),r.createElement("div",{className:"helplineIcon"},r.createElement(t.HelpLineIcon,null))),r.createElement("div",{className:"call-center-card-text"},null!=T&&null!==(l=T.helpline)&&void 0!==l&&l.contactOne?r.createElement("div",{className:"call-center-card-content"},r.createElement("a",{href:"tel:"+(null==T||null===(a=T.helpline)||void 0===a?void 0:a.contactOne)},null==T||null===(u=T.helpline)||void 0===u?void 0:u.contactOne)):null,null!=T&&null!==(c=T.helpline)&&void 0!==c&&c.contactTwo?r.createElement("div",{className:"call-center-card-content"},r.createElement("a",{href:"tel:"+(null==T||null===(s=T.helpline)||void 0===s?void 0:s.contactTwo)},null==T||null===(d=T.helpline)||void 0===d?void 0:d.contactTwo)):null)):null,T&&null!=T&&T.serviceCenter?r.createElement(t.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"}},r.createElement("div",{className:"static-home-Card"},r.createElement("div",{className:"static-home-Card-header"},b("CITIZEN_SERVICE_CENTER")),r.createElement("div",{className:"serviceCentrIcon"},r.createElement(t.ServiceCenterIcon,null))),r.createElement("div",{className:"service-center-details-card"},r.createElement("div",{className:"service-center-details-text"},null==T?void 0:T.serviceCenter)),null!=T&&T.viewMapLocation?r.createElement("div",{className:"link"},r.createElement("a",{href:null==T?void 0:T.viewMapLocation},b("VIEW_ON_MAP"))):null):r.createElement("div",null),r.createElement(t.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"}},N||null==I||null===(null==I?void 0:I.dynamicDataOne)?r.createElement("div",null):r.createElement("div",{className:"dynamicDataCard"},r.createElement("div",{className:"dynamicData"},r.createElement(D,{module:_,styles:{width:"24px",height:"24px"}}),r.createElement("span",{className:"dynamicData-content"},null==I?void 0:I.dynamicDataOne))),N||null==I||null===(null==I?void 0:I.dynamicDataTwo)?r.createElement("div",null):r.createElement("div",{className:"dynamicDataCard"},r.createElement("div",{className:"dynamicData"},r.createElement(D,{module:_,styles:{width:"24px",height:"24px"}}),r.createElement("span",{className:"dynamicData-content"},null==I?void 0:I.dynamicDataTwo))),T&&null!=T&&T.staticDataOne?r.createElement("div",{className:"staticDataCard"},r.createElement("div",{className:"staticData"},r.createElement(A,{module:_}),r.createElement("span",{className:"static-data-content"},r.createElement("span",{className:"static-data-content-first",style:{marginTop:""===(null===(f=x(_))||void 0===f?void 0:f.staticDataOne)?"8px":"unset"}},null===(m=x(_))||void 0===m?void 0:m.staticDataOneHeader),r.createElement("span",{className:"static-data-content-second"},""+(null===(v=x(_))||void 0===v?void 0:v.staticDataOne))))):r.createElement("div",null),T&&null!=T&&T.staticDataTwo?r.createElement("div",{className:"staticDataCard"},r.createElement("div",{className:"staticData"},r.createElement(L,{module:_}),r.createElement("span",{className:"static-data-content"},r.createElement("span",{className:"static-data-content-first"},null===(p=x(_))||void 0===p?void 0:p.staticDataTwoHeader),r.createElement("span",{className:"static-data-content-second"},null===(g=x(_))||void 0===g?void 0:g.staticDataTwo)))):r.createElement("div",null),T&&null!=T&&T.validity?r.createElement("div",{className:"staticDataCard"},r.createElement("div",{className:"staticData"},r.createElement("span",{className:"validityIcon"},r.createElement(t.ValidityTimeIcon,null)),r.createElement("span",{className:"static-data-content"},r.createElement("span",{className:"static-data-content-first"},null===(h=R(_))||void 0===h?void 0:h.staticCommonContent),r.createElement("span",{className:"static-data-content-second"},null===(E=R(_))||void 0===E?void 0:E.validity)))):r.createElement("div",null),N||null==I||null==I||!I.staticData||null===(null==I?void 0:I.staticData)?r.createElement("div",null):r.createElement("div",{className:"staticDataCard"},r.createElement("div",{className:"staticData"},"PGR"===_?r.createElement(D,{module:_,styles:{width:"24px",height:"24px",marginLeft:"13px",marginTop:"12px"}}):r.createElement("span",{className:"validityIcon"},r.createElement(t.ValidityTimeIcon,null)),r.createElement("span",{className:"static-data-content"},r.createElement("span",{className:"static-data-content-first"},null===(y=R(_))||void 0===y?void 0:y.staticCommonContent),r.createElement("span",{className:"static-data-content-second"},null==I?void 0:I.staticData)))))):r.createElement(r.Fragment,null)};var _t,bt,Ct,Ot,St;const wt=[(null===(_t=window)||void 0===_t?void 0:_t.contextPath)+"/citizen/register/name","/"+(null===(bt=window)||void 0===bt?void 0:bt.contextPath)+"/citizen/select-language","/"+(null===(Ct=window)||void 0===Ct?void 0:Ct.contextPath)+"/citizen/select-location","/"+(null===(Ot=window)||void 0===Ot?void 0:Ot.contextPath)+"/citizen/login","/"+(null===(St=window)||void 0===St?void 0:St.contextPath)+"/citizen/register/otp"],Nt=(e,t)=>t.filter(t=>e.map(e=>e.code).includes(t.code)),It=e=>{var n,o,l;let{stateInfo:u,userDetails:c,CITIZEN:s,cityDetails:d,mobileView:f,handleUserDropdownSelection:v,logoUrl:h,stateCode:E,modules:_,appTenants:b,pathname:C,initData:O}=e;const{isLoading:S,data:w,isFetched:N}=Digit.Hooks.useCustomMDMS(Digit.ULBService.getStateId(),"ACCESSCONTROL-ACTIONS-TEST",[{name:"actions-test",filter:"[?(@.url == '"+window.contextPath+"-card')]"}],{select:e=>{var t,n;return null==e||null===(t=e["ACCESSCONTROL-ACTIONS-TEST"])||void 0===t||null===(n=t["actions-test"])||void 0===n?void 0:n.filter(e=>!0===e.enabled).reduce((e,t)=>{var n;return e[t.parentModule]=(null===(n=e[t.parentModule])||void 0===n?void 0:n.length)>0?[t,...e[t.parentModule]]:[t],e},{})}}),I=Digit.Hooks.useRouteSubscription(C),{t:D}=i.useTranslation(),{path:T}=a.useRouteMatch(),A=a.useHistory(),R=wt.some(e=>window.location.href.includes(e)),x=_.map((e,t)=>{let{code:n,tenants:i}=e;const o=Digit.ComponentRegistryService.getComponent(n+"Module");return o?r.createElement(a.Route,{key:t,path:T+"/"+n.toLowerCase()},r.createElement(o,{stateCode:E,moduleCode:n,userType:"citizen",tenants:Nt(i,b)})):null}),P=_.map((e,n)=>{let{code:i,bannerImage:o}=e,l=(Digit.ComponentRegistryService.getComponent(i+"Links"),N?g(w,i,D):void 0);return"ACTION_TEST_WS"===(null==l?void 0:l.header)&&(null==l||l.links.sort((e,t)=>t.orderNumber-e.orderNumber)),r.createElement(r.Fragment,null,r.createElement(a.Route,{key:n,path:T+"/"+i.toLowerCase()+"-home"},r.createElement("div",{className:"moduleLinkHomePage"},r.createElement("img",{src:o||(null==u?void 0:u.bannerUrl),alt:"noimagefound"}),r.createElement(t.BackButton,{className:"moduleLinkHomePageBackButton"}),r.createElement("h1",null,D("MODULE_"+i.toUpperCase())),r.createElement("div",{className:"moduleLinkHomePageModuleLinks"},l&&r.createElement(t.CitizenHomeCard,{header:D(null==l?void 0:l.header),links:null==l?void 0:l.links,Icon:()=>r.createElement("span",null),Info:"OBPS"===i?()=>r.createElement(t.CitizenInfoLabel,{style:{margin:"0px",padding:"10px"},info:D("CS_FILE_APPLICATION_INFO_LABEL"),text:D("BPA_CITIZEN_HOME_STAKEHOLDER_INCLUDES_INFO_LABEL")}):null,isInfo:"OBPS"===i})),r.createElement(yt,{moduleCode:null==i?void 0:i.toUpperCase()}))),r.createElement(a.Route,{key:"faq"+n,path:T+"/"+i.toLowerCase()+"-faq"},r.createElement(q,{module:null==i?void 0:i.toUpperCase()})),r.createElement(a.Route,{key:"hiw"+n,path:T+"/"+i.toLowerCase()+"-how-it-works"},r.createElement(ie,{module:null==i?void 0:i.toUpperCase()})))});return r.createElement("div",{className:I},r.createElement(H,{t:D,stateInfo:u,userDetails:c,CITIZEN:s,cityDetails:d,mobileView:f,handleUserDropdownSelection:v,logoUrl:h,showSidebar:!0,linkData:w,islinkDataLoading:S}),r.createElement("div",{className:"main center-container citizen-home-container mb-25"},R?null:r.createElement("div",{className:"SideBarStatic"},r.createElement(L,{linkData:w,islinkDataLoading:S})),r.createElement(a.Switch,null,r.createElement(a.Route,{exact:!0,path:T},r.createElement(Z,null)),r.createElement(a.Route,{exact:!0,path:T+"/select-language"},r.createElement(X,null)),r.createElement(a.Route,{exact:!0,path:T+"/select-location"},r.createElement($,null)),r.createElement(a.Route,{path:T+"/error"},r.createElement(m,{initData:O,goToHome:()=>{var e,t,n,r;A.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/"+(null===(t=Digit)||void 0===t||null===(n=t.UserService)||void 0===n||null===(r=n.getType)||void 0===r?void 0:r.call(n)))}})),r.createElement(a.Route,{path:T+"/all-services"},r.createElement(y,{userType:"citizen",modules:_,getCitizenMenu:w,fetchedCitizen:N,isLoading:S})),r.createElement(a.Route,{path:T+"/login"},r.createElement(ve,{stateCode:E})),r.createElement(a.Route,{path:T+"/register"},r.createElement(ve,{stateCode:E,isUserRegistered:!1})),r.createElement(a.Route,{path:T+"/user/profile"},r.createElement(re,{stateCode:E,userType:"citizen",cityDetails:d})),r.createElement(a.Route,{path:T+"/Audit"},r.createElement(Et,null)),r.createElement(p,{initData:O},x,P))),r.createElement("div",{className:"citizen-home-footer",style:window.location.href.includes("citizen/obps")?{zIndex:"-1"}:{}},r.createElement("img",{alt:"Powered by DIGIT",src:null===(n=window)||void 0===n||null===(o=n.globalConfigs)||void 0===o||null===(l=o.getConfig)||void 0===l?void 0:l.call(o,"DIGIT_FOOTER"),style:{height:"1.2em",cursor:"pointer"},onClick:()=>{var e,t,n;window.open(null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_HOME_URL"),"_blank").focus()}})))};var Dt="function"==typeof Symbol&&Symbol.for,Tt=Dt?Symbol.for("react.element"):60103,At=Dt?Symbol.for("react.portal"):60106,Lt=Dt?Symbol.for("react.fragment"):60107,Rt=Dt?Symbol.for("react.strict_mode"):60108,xt=Dt?Symbol.for("react.profiler"):60114,Pt=Dt?Symbol.for("react.provider"):60109,Mt=Dt?Symbol.for("react.context"):60110,kt=Dt?Symbol.for("react.async_mode"):60111,Ut=Dt?Symbol.for("react.concurrent_mode"):60111,Bt=Dt?Symbol.for("react.forward_ref"):60112,jt=Dt?Symbol.for("react.suspense"):60113,Ft=Dt?Symbol.for("react.suspense_list"):60120,Vt=Dt?Symbol.for("react.memo"):60115,zt=Dt?Symbol.for("react.lazy"):60116,Wt=Dt?Symbol.for("react.block"):60121,Ht=Dt?Symbol.for("react.fundamental"):60117,Gt=Dt?Symbol.for("react.responder"):60118,qt=Dt?Symbol.for("react.scope"):60119;function Zt(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case Tt:switch(e=e.type){case kt:case Ut:case Lt:case xt:case Rt:case jt:return e;default:switch(e=e&&e.$$typeof){case Mt:case Bt:case zt:case Vt:case Pt:return e;default:return t}}case At:return t}}}function Xt(e){return Zt(e)===Ut}var $t={AsyncMode:kt,ConcurrentMode:Ut,ContextConsumer:Mt,ContextProvider:Pt,Element:Tt,ForwardRef:Bt,Fragment:Lt,Lazy:zt,Memo:Vt,Portal:At,Profiler:xt,StrictMode:Rt,Suspense:jt,isAsyncMode:function(e){return Xt(e)||Zt(e)===kt},isConcurrentMode:Xt,isContextConsumer:function(e){return Zt(e)===Mt},isContextProvider:function(e){return Zt(e)===Pt},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===Tt},isForwardRef:function(e){return Zt(e)===Bt},isFragment:function(e){return Zt(e)===Lt},isLazy:function(e){return Zt(e)===zt},isMemo:function(e){return Zt(e)===Vt},isPortal:function(e){return Zt(e)===At},isProfiler:function(e){return Zt(e)===xt},isStrictMode:function(e){return Zt(e)===Rt},isSuspense:function(e){return Zt(e)===jt},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===Lt||e===Ut||e===xt||e===Rt||e===jt||e===Ft||"object"==typeof e&&null!==e&&(e.$$typeof===zt||e.$$typeof===Vt||e.$$typeof===Pt||e.$$typeof===Mt||e.$$typeof===Bt||e.$$typeof===Ht||e.$$typeof===Gt||e.$$typeof===qt||e.$$typeof===Wt)},typeOf:Zt},Yt=k(function(e,t){"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,n=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,l=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function _(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:var m=e.type;switch(m){case c:case s:case i:case l:case o:case f:return m;default:var g=m&&m.$$typeof;switch(g){case u:case d:case p:case v:case a:return g;default:return t}}case r:return t}}}var b=s,C=u,O=a,S=n,w=d,N=i,I=p,D=v,T=r,A=l,L=o,R=f,x=!1;function P(e){return _(e)===s}t.AsyncMode=c,t.ConcurrentMode=b,t.ContextConsumer=C,t.ContextProvider=O,t.Element=S,t.ForwardRef=w,t.Fragment=N,t.Lazy=I,t.Memo=D,t.Portal=T,t.Profiler=A,t.StrictMode=L,t.Suspense=R,t.isAsyncMode=function(e){return x||(x=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),P(e)||_(e)===c},t.isConcurrentMode=P,t.isContextConsumer=function(e){return _(e)===u},t.isContextProvider=function(e){return _(e)===a},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return _(e)===d},t.isFragment=function(e){return _(e)===i},t.isLazy=function(e){return _(e)===p},t.isMemo=function(e){return _(e)===v},t.isPortal=function(e){return _(e)===r},t.isProfiler=function(e){return _(e)===l},t.isStrictMode=function(e){return _(e)===o},t.isSuspense=function(e){return _(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===s||e===l||e===o||e===f||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===v||e.$$typeof===a||e.$$typeof===u||e.$$typeof===d||e.$$typeof===h||e.$$typeof===E||e.$$typeof===y||e.$$typeof===g)},t.typeOf=_}()}),Kt=k(function(e){e.exports="production"===process.env.NODE_ENV?$t:Yt}),Jt=Object.getOwnPropertySymbols,Qt=Object.prototype.hasOwnProperty,en=Object.prototype.propertyIsEnumerable;function tn(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var nn=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,i=tn(e),o=1;o<arguments.length;o++){for(var l in n=Object(arguments[o]))Qt.call(n,l)&&(i[l]=n[l]);if(Jt){r=Jt(n);for(var a=0;a<r.length;a++)en.call(n,r[a])&&(i[r[a]]=n[r[a]])}}return i},rn="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",on=Function.call.bind(Object.prototype.hasOwnProperty),ln=function(){};if("production"!==process.env.NODE_ENV){var an=rn,un={},cn=on;ln=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function sn(e,t,n,r,i){if("production"!==process.env.NODE_ENV)for(var o in e)if(cn(e,o)){var l;try{if("function"!=typeof e[o]){var a=Error((r||"React class")+": "+n+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw a.name="Invariant Violation",a}l=e[o](t,o,r,n,null,an)}catch(e){l=e}if(!l||l instanceof Error||ln((r||"React class")+": type specification of "+n+" `"+o+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof l+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),l instanceof Error&&!(l.message in un)){un[l.message]=!0;var u=i?i():"";ln("Failed "+n+" type: "+l.message+(null!=u?u:""))}}}sn.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(un={})};var dn=sn,fn=function(){};function mn(){return null}function vn(){}function pn(){}"production"!==process.env.NODE_ENV&&(fn=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),pn.resetWarningCache=vn;var gn=k(function(e){e.exports="production"!==process.env.NODE_ENV?function(e,t){var n="function"==typeof Symbol&&Symbol.iterator,r={array:a("array"),bigint:a("bigint"),bool:a("boolean"),func:a("function"),number:a("number"),object:a("object"),string:a("string"),symbol:a("symbol"),any:l(mn),arrayOf:function(e){return l(function(t,n,r,i,l){if("function"!=typeof e)return new o("Property `"+l+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a))return new o("Invalid "+i+" `"+l+"` of type `"+s(a)+"` supplied to `"+r+"`, expected an array.");for(var u=0;u<a.length;u++){var c=e(a,u,r,i,l+"["+u+"]",rn);if(c instanceof Error)return c}return null})},element:l(function(t,n,r,i,l){var a=t[n];return e(a)?null:new o("Invalid "+i+" `"+l+"` of type `"+s(a)+"` supplied to `"+r+"`, expected a single ReactElement.")}),elementType:l(function(e,t,n,r,i){var l=e[t];return Kt.isValidElementType(l)?null:new o("Invalid "+r+" `"+i+"` of type `"+s(l)+"` supplied to `"+n+"`, expected a single ReactElement type.")}),instanceOf:function(e){return l(function(t,n,r,i,l){var a;return t[n]instanceof e?null:new o("Invalid "+i+" `"+l+"` of type `"+((a=t[n]).constructor&&a.constructor.name?a.constructor.name:"<<anonymous>>")+"` supplied to `"+r+"`, expected instance of `"+(e.name||"<<anonymous>>")+"`.")})},node:l(function(e,t,n,r,i){return c(e[t])?null:new o("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(e){return l(function(t,n,r,i,l){if("function"!=typeof e)return new o("Property `"+l+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var a=t[n],u=s(a);if("object"!==u)return new o("Invalid "+i+" `"+l+"` of type `"+u+"` supplied to `"+r+"`, expected an object.");for(var c in a)if(on(a,c)){var d=e(a,c,r,i,l+"."+c,rn);if(d instanceof Error)return d}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&fn(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),mn;function t(t,n,r,l,a){for(var u=t[n],c=0;c<e.length;c++)if(i(u,e[c]))return null;var s=JSON.stringify(e,function(e,t){return"symbol"===d(t)?String(t):t});return new o("Invalid "+l+" `"+a+"` of value `"+String(u)+"` supplied to `"+r+"`, expected one of "+s+".")}return l(t)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&fn("Invalid argument supplied to oneOfType, expected an instance of array."),mn;for(var t=0;t<e.length;t++){var n=e[t];if("function"!=typeof n)return fn("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+f(n)+" at index "+t+"."),mn}return l(function(t,n,r,i,l){for(var a=[],u=0;u<e.length;u++){var c=(0,e[u])(t,n,r,i,l,rn);if(null==c)return null;c.data&&on(c.data,"expectedType")&&a.push(c.data.expectedType)}return new o("Invalid "+i+" `"+l+"` supplied to `"+r+"`"+(a.length>0?", expected one of type ["+a.join(", ")+"]":"")+".")})},shape:function(e){return l(function(t,n,r,i,l){var a=t[n],c=s(a);if("object"!==c)return new o("Invalid "+i+" `"+l+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");for(var f in e){var m=e[f];if("function"!=typeof m)return u(r,i,l,f,d(m));var v=m(a,f,r,i,l+"."+f,rn);if(v)return v}return null})},exact:function(e){return l(function(t,n,r,i,l){var a=t[n],c=s(a);if("object"!==c)return new o("Invalid "+i+" `"+l+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var f=nn({},t[n],e);for(var m in f){var v=e[m];if(on(e,m)&&"function"!=typeof v)return u(r,i,l,m,d(v));if(!v)return new o("Invalid "+i+" `"+l+"` key `"+m+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var p=v(a,m,r,i,l+"."+m,rn);if(p)return p}return null})}};function i(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function o(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function l(e){function t(t,n,r,i,l,a,u){if(i=i||"<<anonymous>>",a=a||r,u!==rn){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}return null==n[r]?t?new o(null===n[r]?"The "+l+" `"+a+"` is marked as required in `"+i+"`, but its value is `null`.":"The "+l+" `"+a+"` is marked as required in `"+i+"`, but its value is `undefined`."):null:e(n,r,i,l,a)}process;var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function a(e){return l(function(t,n,r,i,l,a){var u=t[n];return s(u)!==e?new o("Invalid "+i+" `"+l+"` of type `"+d(u)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null})}function u(e,t,n,r,i){return new o((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function c(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(c);if(null===t||e(t))return!0;var r=function(e){var t=e&&(n&&e[n]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(!r)return!1;var i,o=r.call(t);if(r!==t.entries){for(;!(i=o.next()).done;)if(!c(i.value))return!1}else for(;!(i=o.next()).done;){var l=i.value;if(l&&!c(l[1]))return!1}return!0;default:return!1}}function s(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function d(e){if(null==e)return""+e;var t=s(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function f(e){var t=d(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return o.prototype=Error.prototype,r.checkPropTypes=dn,r.resetWarningCache=dn.resetWarningCache,r.PropTypes=r,r}(Kt.isElement):function(){function e(e,t,n,r,i,o){if(o!==rn){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:pn,resetWarningCache:vn};return n.PropTypes=n,n}()});const hn=e=>{let{children:t}=e;return r.createElement("div",{className:"banner banner-container"},t)},En=()=>{var e;const{data:n,isLoading:o}=Digit.Hooks.useStore.getInitData(),{stateInfo:l}=n||{},{t:a}=i.useTranslation();return o?r.createElement(t.Loader,null):r.createElement("div",{className:"bannerHeader"},r.createElement("img",{className:"bannerLogo",src:null==l?void 0:l.logoUrl}),r.createElement("p",null,a("TENANT_TENANTS_"+(null==l||null===(e=l.code)||void 0===e?void 0:e.toUpperCase()))))},yn=e=>{var i,o,l;let{config:c,t:s}=e;const[d,f]=n.useState(null),{mobile_number:m,tenantId:v}=Digit.Hooks.useQueryParams(),p=a.useHistory(),[g,h]=n.useState(""),[E,y]=n.useState(!0),[_,b]=n.useState(null),C=()=>Digit.UserService.getType();n.useEffect(()=>{var e,t;if(!d)return void Digit.UserService.setType("employee");Digit.UserService.setUser(d);const n=(null===(e=location.state)||void 0===e?void 0:e.from)||"/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/employee";p.replace(n)},[d]);const O=()=>{b(null)},[S,w,N]=c.inputs,I=[{body:[{label:s(S.label),type:S.type,populators:{name:S.name},isMandatory:!0},{label:s(w.label),type:w.type,populators:{name:w.name},isMandatory:!0},{label:s(N.label),type:N.type,populators:{name:N.name},isMandatory:!0}]}];return r.createElement(hn,null,r.createElement("div",{className:"employeeBackbuttonAlign"},r.createElement(t.BackButton,{variant:"white",style:{borderBottom:"none"}})),r.createElement(u.FormComposer,{onSubmit:function(e){try{return Promise.resolve(te(function(){if(e.newPassword!==e.confirmPassword)return b(s("ERR_PASSWORD_DO_NOT_MATCH"));const t={...e,otpReference:g,tenantId:v,type:C().toUpperCase()};return Promise.resolve(Digit.UserService.changePassword(t,v)).then(function(e){(()=>{var e;p.replace("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/user/login")})()})},function(e){var t,n,r,i,o;b((null==e||null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.error)||void 0===r||null===(i=r.fields)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.message)||s("ES_SOMETHING_WRONG")),setTimeout(O,5e3)}))}catch(e){return Promise.reject(e)}},noBoxShadow:!0,inline:!0,submitInForm:!0,config:I,label:c.texts.submitButtonLabel,cardStyle:{maxWidth:"408px",margin:"auto"},className:"employeeChangePassword"},r.createElement(En,null),r.createElement(u.CardSubHeader,{style:{textAlign:"center"}}," ",c.texts.header," "),r.createElement(t.CardText,null,s("CS_LOGIN_OTP_TEXT")+" ",r.createElement("b",null," ",""+s("+ 91 - ")," ",m)),r.createElement(ue,{t:s,userType:"employee",otp:g,onOtpChange:h,error:E,onResend:function(){try{function e(){setTimeout(O,5e3)}const t={otp:{mobileNumber:m,userType:C().toUpperCase(),type:"passwordreset",tenantId:v}},n=te(function(){return Promise.resolve(Digit.UserService.sendOtp(t,v)).then(function(){b(s("ES_OTP_RESEND"))})},function(e){var t,n;b((null==e||null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.error_description)||s("ES_INVALID_LOGIN_CREDENTIALS"))});return Promise.resolve(n&&n.then?n.then(e):e())}catch(e){return Promise.reject(e)}}})),_&&r.createElement(t.Toast,{type:"error",label:s(_),onClose:O}),r.createElement("div",{className:"EmployeeLoginFooter"},r.createElement("img",{alt:"Powered by DIGIT",src:null===(i=window)||void 0===i||null===(o=i.globalConfigs)||void 0===o||null===(l=o.getConfig)||void 0===l?void 0:l.call(o,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:()=>{var e,t,n;window.open(null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_HOME_URL"),"_blank").focus()}})," "))};yn.propTypes={loginParams:gn.any},yn.defaultProps={loginParams:null};const _n=[{texts:{header:"CORE_COMMON_RESET_PASSWORD_LABEL",submitButtonLabel:"CORE_COMMON_CHANGE_PASSWORD"},inputs:[{label:"CORE_LOGIN_USERNAME",type:"text",name:"userName",error:"ERR_HRMS_INVALID_USERNAME"},{label:"CORE_LOGIN_NEW_PASSWORD",type:"password",name:"newPassword",error:"CORE_COMMON_REQUIRED_ERRMSG"},{label:"CORE_LOGIN_CONFIRM_NEW_PASSWORD",type:"password",name:"confirmPassword",error:"CORE_COMMON_REQUIRED_ERRMSG"}]}],bn=()=>{const{t:e}=i.useTranslation(),{path:t}=a.useRouteMatch(),o=n.useMemo(()=>_n.map(t=>{const n={};for(const r in t.texts)n[r]=e(t.texts[r]);return{...t,texts:n}},[_n]));return r.createElement(a.Switch,null,r.createElement(a.Route,{path:""+t,exact:!0},r.createElement(yn,{config:o[0],t:e})))},Cn=[{texts:{header:"CORE_COMMON_FORGOT_PASSWORD_LABEL",description:"ES_FORGOT_PASSWORD_DESC",submitButtonLabel:"CORE_COMMON_CONTINUE"},inputs:[{label:"CORE_COMMON_MOBILE_NUMBER",type:"text",name:"mobileNumber",error:"ERR_HRMS_INVALID_MOBILE_NUMBER"},{label:"CORE_COMMON_CITY",type:"custom",name:"city",error:"ERR_HRMS_INVALID_CITY"}]}],On=e=>{var i,o,l;let{config:c,t:s}=e;const{data:d,isLoading:f}=Digit.Hooks.useTenants(),[m,v]=n.useState(null),p=a.useHistory(),[g,h]=n.useState(null);n.useEffect(()=>{var e,t;if(!m)return void Digit.UserService.setType("employee");Digit.UserService.setUser(m);const n=(null===(e=location.state)||void 0===e?void 0:e.from)||"/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/employee";p.replace(n)},[m]);const E=()=>{h(null)},[y,_]=c.inputs,b=[{body:[{label:s(y.label),type:y.type,populators:{name:y.name,componentInFront:"+91"},isMandatory:!0},{label:s(_.label),type:_.type,populators:{name:_.name,customProps:{},component:(e,n)=>r.createElement(t.Dropdown,I({option:d,optionKey:"name",id:_.name,className:"login-city-dd",select:t=>{e.onChange(t)}},n))},isMandatory:!0}]}];return f?r.createElement(t.Loader,null):r.createElement(hn,null,r.createElement("div",{className:"employeeBackbuttonAlign"},r.createElement(t.BackLink,null)),r.createElement(u.FormComposer,{onSubmit:function(e){try{if(!e.city)return alert("Please Select City!"),Promise.resolve();const t={otp:{mobileNumber:e.mobileNumber,userType:Digit.UserService.getType().toUpperCase(),type:"passwordreset",tenantId:e.city.code}},n=te(function(){return Promise.resolve(Digit.UserService.sendOtp(t,e.city.code)).then(function(){var t;p.push("/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/employee/user/change-password?mobile_number="+e.mobileNumber+"&tenantId="+e.city.code)})},function(e){var t,n,r,i,o;h((null==e||null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.error)||void 0===r||null===(i=r.fields)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.message)||"Invalid login credentials!"),setTimeout(E,5e3)});return Promise.resolve(n&&n.then?n.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},noBoxShadow:!0,inline:!0,submitInForm:!0,config:b,label:c.texts.submitButtonLabel,secondaryActionLabel:c.texts.secondaryButtonLabel,onSecondayActionClick:()=>{var e;p.replace("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/login")},heading:c.texts.header,description:c.texts.description,headingStyle:{textAlign:"center"},cardStyle:{maxWidth:"408px",margin:"auto"},className:"employeeForgotPassword"},r.createElement(En,null)),g&&r.createElement(t.Toast,{type:"error",label:s(g),onClose:E}),r.createElement("div",{className:"EmployeeLoginFooter"},r.createElement("img",{alt:"Powered by DIGIT",src:null===(i=window)||void 0===i||null===(o=i.globalConfigs)||void 0===o||null===(l=o.getConfig)||void 0===l?void 0:l.call(o,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:()=>{var e,t,n;window.open(null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_HOME_URL"),"_blank").focus()}})," "))};On.propTypes={loginParams:gn.any},On.defaultProps={loginParams:null};const Sn=()=>{const{t:e}=i.useTranslation(),{path:t}=a.useRouteMatch(),o=n.useMemo(()=>Cn.map(t=>{const n={};for(const r in t.texts)n[r]=e(t.texts[r]);return{...t,texts:n}},[Cn]));return r.createElement(a.Switch,null,r.createElement(a.Route,{path:""+t,exact:!0},r.createElement(On,{config:o[0],t:e})))},wn=(e,t)=>t.filter(t=>{var n;return null==e||null===(n=e.map)||void 0===n?void 0:n.call(e,e=>e.code).includes(t.code)}),Nn=e=>{var t;let{stateCode:n,userType:i,modules:o,appTenants:l,additionalComponent:u}=e;Digit;const{path:c}=a.useRouteMatch(),s=a.useLocation(),d=Digit.UserService.getUser();var f;if(!d||null==d||!d.access_token||null==d||!d.info)return r.createElement(a.Redirect,{to:{pathname:"/"+(null===(f=window)||void 0===f?void 0:f.contextPath)+"/employee/user/login",state:{from:s.pathname+s.search}}});const m=o.map((e,t)=>{var o;let{code:u,tenants:s}=e;const d=Digit.ComponentRegistryService.getComponent(u+"Module");return r.createElement(a.Route,{key:t,path:c+"/"+u.toLowerCase()},d?r.createElement(d,{stateCode:n,moduleCode:u,userType:i,tenants:wn(s,l)}):r.createElement(a.Redirect,{to:"/"+(null===(o=window)||void 0===o?void 0:o.contextPath)+"/employee/user/error?type=notfound&module="+u}))});return r.createElement("div",{className:"ground-container digit-home-ground"},r.createElement(a.Switch,null,m,r.createElement(a.Route,{path:c+"/login"},r.createElement(a.Redirect,{to:{pathname:"/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/employee/user/login",state:{from:s.pathname+s.search}}})),r.createElement(a.Route,{path:c+"/forgot-password"},r.createElement(Sn,null)),r.createElement(a.Route,{path:c+"/change-password"},r.createElement(bn,null)),r.createElement(a.Route,null,r.createElement(y,{userType:i,modules:o,additionalComponent:u}))))},In={label:"English",value:Digit.Utils.getDefaultLanguage()},Dn=()=>{var e,o,l,c,s;const{data:d,isLoading:f}=Digit.Hooks.useStore.getInitData(),{t:m}=i.useTranslation(),v=a.useHistory(),{languages:p,stateInfo:g}=d||{};let h=p;h&&0!=(null===(e=h)||void 0===e?void 0:e.length)||(h=[In]);const E=Digit.StoreData.getCurrentLanguage(),[y,_]=n.useState(E);return f?r.createElement(t.Loader,null):r.createElement(hn,null,r.createElement(t.Card,{className:"bannerCard removeBottomMargin languageSelection"},r.createElement("div",{className:"bannerHeader"},r.createElement("img",{className:"bannerLogo",src:null==g?void 0:g.logoUrl,alt:"Digit"}),r.createElement("p",null,m("TENANT_TENANTS_"+(null==g||null===(o=g.code)||void 0===o?void 0:o.toUpperCase())))),r.createElement("div",{className:"language-selector",style:{justifyContent:"space-around",marginBottom:"24px",padding:"0 5%"}},h.map((e,t)=>r.createElement("div",{className:"language-button-container",key:t},r.createElement(u.CustomButton,{selected:e.value===y,text:e.label,onClick:()=>(e=>{_(e.value),Digit.LocalizationService.changeLanguage(e.value,g.code)})(e)})))),r.createElement(t.SubmitBar,{style:{width:"100%"},label:m("CORE_COMMON_CONTINUE"),onSubmit:e=>{var t;v.push("/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/employee/user/login")}})),r.createElement("div",{className:"EmployeeLoginFooter"},r.createElement("img",{alt:"Powered by DIGIT",src:null===(l=window)||void 0===l||null===(c=l.globalConfigs)||void 0===c||null===(s=c.getConfig)||void 0===s?void 0:s.call(c,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:()=>{var e,t,n;window.open(null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_HOME_URL"),"_blank").focus()}})," "))},Tn=[{texts:{header:"CORE_COMMON_LOGIN",submitButtonLabel:"CORE_COMMON_CONTINUE",secondaryButtonLabel:"CORE_COMMON_FORGOT_PASSWORD"},inputs:[{label:"CORE_LOGIN_USERNAME",type:"text",key:"username",isMandatory:!0,populators:{name:"username",validation:{required:!0},error:"ERR_USERNAME_REQUIRED"}},{label:"CORE_LOGIN_PASSWORD",type:"password",key:"password",isMandatory:!0,populators:{name:"password",validation:{required:!0},error:"ERR_PASSWORD_REQUIRED"}},{isMandatory:!0,type:"dropdown",key:"city",label:"CORE_COMMON_CITY",disable:!1,populators:{name:"city",optionsKey:"name",error:"ERR_HRMS_INVALID_CITY",mdmsConfig:{masterName:"tenants",moduleName:"tenant",localePrefix:"TENANT_TENANTS",select:"(data)=>{ return Array.isArray(data['tenant'].tenants) && Digit.Utils.getUnique(data['tenant'].tenants).map(ele=>({code:ele.code,name:Digit.Utils.locale.getTransformedLocale('TENANT_TENANTS_'+ele.code)}))}"}}}]}],An=e=>{var i,o,l,u,c,s,d,f,m,v,p,g,h;let{config:E,t:y,isDisabled:_}=e;const{isLoading:b}=Digit.Hooks.useTenants(),{isLoading:C}=Digit.Hooks.useStore.getInitData(),[O,S]=n.useState(null),[w,N]=n.useState(null),[I,D]=n.useState(!1),T=a.useHistory();n.useEffect(()=>{var e,t,n,r,i,o,l,a,u,c,s,d,f,m,v,p,g,h;if(!O)return;Digit.SessionStorage.set("citizen.userRequestObject",O);const E=null==O||null===(e=O.info)||void 0===e||null===(t=e.roles)||void 0===t?void 0:t.filter(e=>e.tenantId===Digit.SessionStorage.get("Employee.tenantId"));(null==O||null===(n=O.info)||void 0===n||null===(r=n.roles)||void 0===r?void 0:r.length)>0&&(O.info.roles=E),Digit.UserService.setUser(O),((e,t)=>{var n;let r=(null===(n=JSON.parse(sessionStorage.getItem("Digit.locale")))||void 0===n?void 0:n.value)||Digit.Utils.getDefaultLanguage();localStorage.setItem("Employee.tenant-id",null==e?void 0:e.tenantId),localStorage.setItem("tenant-id",null==e?void 0:e.tenantId),localStorage.setItem("citizen.userRequestObject",JSON.stringify(e)),localStorage.setItem("locale",r),localStorage.setItem("Employee.locale",r),localStorage.setItem("token",t),localStorage.setItem("Employee.token",t),localStorage.setItem("user-info",JSON.stringify(e)),localStorage.setItem("Employee.user-info",JSON.stringify(e))})(null==O?void 0:O.info,null==O?void 0:O.access_token);let y="/"+(null===(i=window)||void 0===i?void 0:i.contextPath)+"/employee";var _,b,C,S,w,N,I;null!==(o=window)&&void 0!==o&&null!==(l=o.location)&&void 0!==l&&null!==(a=l.href)&&void 0!==a&&a.includes("from=")&&(y=decodeURIComponent(null===(_=window)||void 0===_||null===(b=_.location)||void 0===b||null===(C=b.href)||void 0===C||null===(S=C.split("from="))||void 0===S?void 0:S[1])||"/"+(null===(w=window)||void 0===w?void 0:w.contextPath)+"/employee"),null!=O&&null!==(u=O.info)&&void 0!==u&&u.roles&&(null==O||null===(c=O.info)||void 0===c||null===(s=c.roles)||void 0===s?void 0:s.length)>0&&null!=O&&null!==(d=O.info)&&void 0!==d&&null!==(f=d.roles)&&void 0!==f&&f.every(e=>"NATADMIN"===e.code)&&(y="/"+(null===(N=window)||void 0===N?void 0:N.contextPath)+"/employee/dss/landing/NURT_DASHBOARD"),null!=O&&null!==(m=O.info)&&void 0!==m&&m.roles&&(null==O||null===(v=O.info)||void 0===v||null===(p=v.roles)||void 0===p?void 0:p.length)>0&&null!=O&&null!==(g=O.info)&&void 0!==g&&null!==(h=g.roles)&&void 0!==h&&h.every(e=>"STADMIN"===e.code)&&(y="/"+(null===(I=window)||void 0===I?void 0:I.contextPath)+"/employee/dss/landing/home"),T.replace(y)},[O]);const A=()=>{N(null)},L={code:Digit.ULBService.getStateId(),name:Digit.Utils.locale.getTransformedLocale("TENANT_TENANTS_"+Digit.ULBService.getStateId())};let R=[{body:null==E?void 0:E.inputs}];const{mode:x}=Digit.Hooks.useQueryParams();return"admin"===x&&0==(null==R||null===(i=R[0])||void 0===i||null===(o=i.body)||void 0===o||null===(l=o[2])||void 0===l?void 0:l.disable)&&null==(null==R||null===(u=R[0])||void 0===u||null===(c=u.body)||void 0===c||null===(s=c[2])||void 0===s||null===(d=s.populators)||void 0===d?void 0:d.defaultValue)&&(R[0].body[2].disable=!0,R[0].body[2].isMandatory=!1,R[0].body[2].populators.defaultValue=L),b||C?r.createElement(t.Loader,null):r.createElement(hn,null,r.createElement("div",{className:"employeeBackbuttonAlign"},r.createElement(t.BackLink,null)),r.createElement(t.FormComposerV2,{onSubmit:function(e){try{var t;function n(){D(!1)}D(!0);const r={...e,userType:"EMPLOYEE"};r.tenantId=(null==e||null===(t=e.city)||void 0===t?void 0:t.code)||Digit.ULBService.getStateId(),delete r.city;const i=te(function(){return Promise.resolve(Digit.UserService.authenticate(r)).then(function(e){let{UserRequest:t,...n}=e;Digit.SessionStorage.set("Employee.tenantId",null==t?void 0:t.tenantId),S({info:t,...n})})},function(e){var t,n;N((null==e||null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.error_description)||"ES_ERROR_USER_NOT_PERMITTED"==(null==e?void 0:e.message)&&y("ES_ERROR_USER_NOT_PERMITTED")||y("INVALID_LOGIN_CREDENTIALS")),setTimeout(A,5e3)});return Promise.resolve(i&&i.then?i.then(n):n())}catch(e){return Promise.reject(e)}},isDisabled:_||I,noBoxShadow:!0,inline:!0,submitInForm:!0,config:R,label:null==E||null===(f=E.texts)||void 0===f?void 0:f.submitButtonLabel,secondaryActionLabel:null==E||null===(m=E.texts)||void 0===m?void 0:m.secondaryButtonLabel,onSecondayActionClick:()=>{var e;T.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/user/forgot-password")},onFormValueChange:(e,t,n)=>{const r=R[0].body.map(e=>e.key).some(e=>{const n=t[e];return null==n||""===n||"check"===e&&!1===n||"captcha"===e&&!1===n});D(r)},heading:null==E||null===(v=E.texts)||void 0===v?void 0:v.header,className:"loginFormStyleEmployee",cardSubHeaderClassName:"loginCardSubHeaderClassName",cardClassName:"loginCardClassName",buttonClassName:"buttonClassName"},r.createElement(En,null)),w&&r.createElement(t.Toast,{type:"error",label:y(w),onClose:A}),r.createElement("div",{className:"employee-login-home-footer",style:{backgroundColor:"unset"}},r.createElement("img",{alt:"Powered by DIGIT",src:null===(p=window)||void 0===p||null===(g=p.globalConfigs)||void 0===g||null===(h=g.getConfig)||void 0===h?void 0:h.call(g,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:()=>{var e,t,n;window.open(null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_HOME_URL"),"_blank").focus()}})," "))};An.propTypes={loginParams:gn.any},An.defaultProps={loginParams:null};const Ln=()=>{const{t:e}=i.useTranslation(),{path:t}=a.useRouteMatch(),[o,l]=n.useState(Tn),{data:u,isLoading:c}=Digit.Hooks.useCommonMDMS(Digit.ULBService.getStateId(),"commonUiConfig",["LoginConfig"],{select:e=>{var t;return{config:null==e||null===(t=e.commonUiConfig)||void 0===t?void 0:t.LoginConfig}},retry:!1});n.useEffect(()=>{l(0==c&&null!=u&&u.config?null==u?void 0:u.config:Tn)},[u,c]);const s=n.useMemo(()=>o.map(t=>{const n={};for(const r in t.texts)n[r]=e(t.texts[r]);return{...t,texts:n}},[o]));return r.createElement(a.Switch,null,r.createElement(a.Route,{path:""+t,exact:!0},r.createElement(An,{config:s[0],t:e})))},Rn=["user/profile","user/error"],xn=e=>{var o,l,u,c,s,d;let{stateInfo:f,userDetails:v,CITIZEN:g,cityDetails:h,mobileView:E,handleUserDropdownSelection:y,logoUrl:_,DSO:b,stateCode:C,modules:O,appTenants:S,initData:w}=e;const N=a.useHistory(),{t:I}=i.useTranslation(),{path:D}=a.useRouteMatch(),T=a.useLocation(),A=null==T||null===(o=T.pathname)||void 0===o?void 0:o.includes("language-selection"),L=Rn.some(e=>{var t;return null==T||null===(t=T.pathname)||void 0===t?void 0:t.includes(e)});n.useEffect(()=>{Digit.UserService.setType("employee")},[]);const R=null==w||null===(l=w.modules)||void 0===l||null===(u=l.filter(e=>null==e?void 0:e.additionalComponent))||void 0===u?void 0:u.map(e=>null==e?void 0:e.additionalComponent);return r.createElement("div",{className:"employee"},r.createElement(a.Switch,null,r.createElement(a.Route,{path:D+"/user"},L&&r.createElement(H,{t:I,stateInfo:f,userDetails:v,CITIZEN:g,cityDetails:h,mobileView:E,handleUserDropdownSelection:y,logoUrl:_,showSidebar:!!L,showLanguageChange:!A}),r.createElement("div",{className:L?"grounded-container":"loginContainer",style:L?{padding:0,paddingTop:"80px",marginLeft:E?"":"64px"}:{"--banner-url":"url("+(null==f?void 0:f.bannerUrl)+")",padding:"0px"}},r.createElement(a.Switch,null,r.createElement(a.Route,{path:D+"/user/login"},r.createElement(Ln,null)),r.createElement(a.Route,{path:D+"/user/forgot-password"},r.createElement(Sn,null)),r.createElement(a.Route,{path:D+"/user/change-password"},r.createElement(bn,null)),r.createElement(t.PrivateRoute,{path:D+"/user/profile"},r.createElement(re,{stateCode:C,userType:"employee",cityDetails:h})),r.createElement(a.Route,{path:D+"/user/error"},r.createElement(m,{initData:w,goToHome:()=>{var e,t,n,r;N.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/"+(null===(t=Digit)||void 0===t||null===(n=t.UserService)||void 0===n||null===(r=n.getType)||void 0===r?void 0:r.call(n)))}})),r.createElement(a.Route,{path:D+"/user/language-selection"},r.createElement(Dn,null)),r.createElement(a.Route,null,r.createElement(a.Redirect,{to:D+"/user/language-selection"}))))),r.createElement(a.Route,null,r.createElement(H,{t:I,stateInfo:f,userDetails:v,CITIZEN:g,cityDetails:h,mobileView:E,handleUserDropdownSelection:y,logoUrl:_,modules:O}),r.createElement("div",{className:"main "+(b?"m-auto":"")+" digit-home-main"},r.createElement("div",{className:"employee-app-wrapper digit-home-app-wrapper"},r.createElement(p,{initData:w},r.createElement(Nn,{stateCode:C,userType:"employee",modules:O,appTenants:S,additionalComponent:R}))),r.createElement("div",{className:"employee-home-footer"},r.createElement("img",{alt:"Powered by DIGIT",src:null===(c=window)||void 0===c||null===(s=c.globalConfigs)||void 0===s||null===(d=s.getConfig)||void 0===d?void 0:d.call(s,"DIGIT_FOOTER"),style:{height:"1.1em",cursor:"pointer"},onClick:()=>{var e,t,n;window.open(null===(e=window)||void 0===e||null===(t=e.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_HOME_URL"),"_blank").focus()}})))),r.createElement(a.Route,null,r.createElement(a.Redirect,{to:D+"/user/language-selection"}))))},Pn=e=>{var t,i,o,l;let{stateCode:u,modules:c,appTenants:s,logoUrl:d,initData:f,defaultLanding:m="citizen"}=e;const v=a.useHistory(),{pathname:p}=a.useLocation(),g=window.innerWidth,h=Digit.ULBService.getCurrentUlb(),E=Digit.UserService.getUser(),{data:y}=Digit.Hooks.useStore.getInitData(),{stateInfo:_}=y||{},b=Digit.UserService.hasAccess(["FSM_DSO"]);let C="CITIZEN"===(null==E||null===(t=E.info)||void 0===t?void 0:t.type)||!window.location.pathname.split("/").includes("employee");window.location.pathname.split("/").includes("employee")&&(C=!1),n.useEffect(()=>{var e,t,n;null!=p&&p.includes("application-details")||(null!=p&&p.includes("inbox")||Digit.SessionStorage.del("fsm/inbox/searchParams"),null!=p&&p.includes("search")&&Digit.SessionStorage.del("fsm/search/searchParams")),null!=p&&p.includes("dss")||Digit.SessionStorage.del("DSS_FILTERS"),(null==p?void 0:p.toString())==="/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee"&&(Digit.SessionStorage.del("SEARCH_APPLICATION_DETAIL"),Digit.SessionStorage.del("WS_EDIT_APPLICATION_DETAILS")),(null==p?void 0:p.toString())!=="/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/citizen"&&(null==p?void 0:p.toString())!=="/"+(null===(n=window)||void 0===n?void 0:n.contextPath)+"/employee"||Digit.SessionStorage.del("WS_DISCONNECTION")},[p]),v.listen(()=>{var e;null===(e=window)||void 0===e||e.scrollTo({top:0,left:0,behavior:"smooth"})});const O={stateInfo:_,userDetails:E,CITIZEN:C,cityDetails:h,mobileView:g<=640,handleUserDropdownSelection:e=>{e.func()},logoUrl:d,DSO:b,stateCode:u,modules:c,appTenants:s,sourceUrl:window.location.origin+"/citizen",pathname:p,initData:f};return r.createElement(a.Switch,null,r.createElement(a.Route,{path:"/"+(null===(i=window)||void 0===i?void 0:i.contextPath)+"/employee"},r.createElement(xn,O)),r.createElement(a.Route,{path:"/"+(null===(o=window)||void 0===o?void 0:o.contextPath)+"/citizen"},r.createElement(It,O)),r.createElement(a.Route,null,r.createElement(a.Redirect,{to:"/"+(null===(l=window)||void 0===l?void 0:l.contextPath)+"/"+m})))},Mn=[d],kn=("object"==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({}):s.compose)(s.applyMiddleware(...Mn)),Un=e=>{var o,l,a,u,c,s,d,f,m,v;let{onSelect:p,...g}=e;const{t:h}=i.useTranslation(),E=Digit.ULBService.getCurrentTenantId(),[y,_]=n.useState(!1),[b,C]=n.useState(!1),{data:O}=Digit.Hooks.useCustomMDMS(E,"commonUiConfig",[{name:"PrivacyPolicy"}]);return n.useEffect(()=>{p("check",y)},[y]),r.createElement(r.Fragment,null,r.createElement("div",{className:"digit-privacy-checkbox"},r.createElement(t.CheckBox,{label:h("ES_BY_CLICKING"),checked:y,onChange:e=>{_(e.target.checked)}}),r.createElement(t.Button,{label:h("ES_PRIVACY_POLICY"),variation:"link",size:"medium",onClick:()=>{C(!0)},style:{marginBottom:"1.18rem",paddingLeft:"unset"}})),b&&r.createElement(t.PopUp,{type:"default",className:"privacy-popUpClass",footerclassName:"popUpFooter",heading:h(null==O||null===(o=O.commonUiConfig)||void 0===o||null===(l=o.PrivacyPolicy)||void 0===l||null===(a=l[0])||void 0===a||null===(u=a.texts)||void 0===u||null===(c=u[0])||void 0===c?void 0:c.header),onOverlayClick:()=>{C(!1)},footerChildren:[r.createElement(t.Button,{type:"button",size:"large",variation:"secondary",label:h("DIGIT_I_DO_NOT_ACCEPT"),onClick:()=>{_(!1),C(!1)}}),r.createElement(t.Button,{type:"button",size:"large",variation:"primary",label:h("DIGIT_I_ACCEPT"),className:"accept-class",onClick:()=>{_(!0),C(!1)}})],sortFooterChildren:!0,onClose:()=>{C(!1)}},null==O||null===(s=O.commonUiConfig)||void 0===s||null===(d=s.PrivacyPolicy)||void 0===d||null===(f=d[0])||void 0===f||null===(m=f.texts)||void 0===m||null===(v=m[0])||void 0===v?void 0:v.descriptions.map((e,t)=>r.createElement("div",{key:t,style:{fontWeight:e.isBold?700:400}},h(e.text)))))},Bn=e=>{var n;let{stateCode:o,enabledModules:u,moduleReducers:c,defaultLanding:d}=e;const{isLoading:f,data:m={}}=Digit.Hooks.useInitStore(o,u);if(f)return r.createElement(t.Loader,{page:!0});const v=function(e,t){return void 0===t&&(t={}),s.createStore(((e,t)=>{return s.combineReducers({common:(n=e,function(e,t){switch(void 0===e&&(e=n),t.type){case"LANGUAGE_SELECT":return{...e,selectedLanguage:t.payload};default:return e}}),...t});var n})(e,t),kn)}(m,c(m))||{};return i.getI18n(),Digit.ComponentRegistryService.getComponent("PrivacyComponent")||Digit.ComponentRegistryService.setComponent("PrivacyComponent",Un),r.createElement(l.Provider,{store:v},r.createElement(a.BrowserRouter,null,r.createElement(t.BodyContainer,null,r.createElement(Pn,{initData:m,stateCode:o,modules:null==m?void 0:m.modules,appTenants:m.tenants,logoUrl:null==m||null===(n=m.stateInfo)||void 0===n?void 0:n.logoUrl,defaultLanding:d}))))},jn={SelectOtp:ue,ChangeCity:b,ChangeLanguage:C,PrivacyComponent:Un};exports.DigitUI=e=>{let{stateCode:t,registry:i,enabledModules:l,moduleReducers:a,defaultLanding:u}=e;const[c,s]=n.useState(Digit.Utils.getPrivacyObject()||{}),d=(Digit.UserService.getType(),new o.QueryClient({defaultOptions:{queries:{staleTime:9e5,cacheTime:3e6,retry:!1,retryDelay:e=>Infinity}}})),f=Digit.Contexts.ComponentProvider,m=Digit.Contexts.PrivacyProvider;return Digit.UserService.hasAccess(["FSM_DSO"]),r.createElement("div",null,r.createElement(p,null,r.createElement(o.QueryClientProvider,{client:d},r.createElement(f.Provider,{value:i},r.createElement(m.Provider,{value:{privacy:null==c?void 0:c[window.location.pathname],resetPrivacy:e=>{Digit.Utils.setPrivacyObject({}),s({})},getPrivacy:()=>{const e=Digit.Utils.getPrivacyObject();return s(e),e},updatePrivacyDescoped:e=>{const t=Digit.Utils.getAllPrivacyObject(),n={...t,[window.location.pathname]:e};Digit.Utils.setPrivacyObject({...n}),s((null==t?void 0:t[window.location.pathname])||{})},updatePrivacy:(e,t)=>{s(Digit.Utils.updatePrivacy(e,t)||{})}}},r.createElement(Bn,{stateCode:t,enabledModules:l,moduleReducers:a,defaultLanding:u}))))))},exports.initCoreComponents=()=>{Object.entries(jn).forEach(e=>{let[t,n]=e;Digit.ComponentRegistryService.setComponent(t,n)})};
|