@egovernments/digit-ui-module-core 1.8.0-beta.13 → 1.8.0-beta.15

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.
Files changed (3) hide show
  1. package/README.md +126 -109
  2. package/dist/index.js +1 -1
  3. package/package.json +35 -35
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-react-components"),n=require("react"),r=e(n),i=require("react-i18next"),o=require("react-query"),a=require("react-redux"),l=require("react-router-dom"),u=e(require("react-tooltip")),c=require("redux"),s=e(require("redux-thunk"));function d(){return(d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function f(e,t){return(f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function v(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return m(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var g={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"}},h=function(e){var t=Digit.Hooks.useQueryParams().type,n=g[void 0===t?"error":t],o=i.useTranslation().t;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:function(){e.goToHome()}},o(n.buttonInfo))))},E=function(){var e,t,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)},y=function(e){var t,n;function i(t){var n;return(n=e.call(this,t)||this).state={error:null,errorStack:null,hasError:!1},n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n),i.getDerivedStateFromError=function(e){return{error:null==e?void 0:e.message,hasError:!0,errorStack:null==e?void 0:e.stack}};var o=i.prototype;return o.componentDidCatch=function(e,t){this.setState({error:null==e?void 0:e.message,hasError:!0,errorStack:null==e?void 0:e.stack})},o.render=function(){return this.state.hasError?r.createElement("div",{className:"error-boundary"},r.createElement(E,null),r.createElement(h,{initData:this.props.initData})):this.props.children},i}(r.Component),_=function(e,t,n){var r=null==e?void 0:e[""+t];r&&r.map(function(e){e.link=e.navigationURL,e.i18nKey=n(e.name)});var i,o={links:null==r?void 0:r.reverse(),header:Digit.Utils.locale.getTransformedLocale("ACTION_TEST_"+t),iconName:"CITIZEN_"+t+"_ICON"};return"FSM"===t&&[{role:"FSM_DSO",from:"/"+(null===(i=window)||void 0===i?void 0:i.contextPath)+"/citizen/fsm/dso-dashboard",dashoardLink:"CS_LINK_DSO_DASHBOARD",loginLink:"CS_LINK_LOGIN_DSO"}].map(function(e){var t,r,i,a=e.from,l=e.loginLink,u=e.dashoardLink;Digit.UserService.hasAccess(e.role)?null==o||null===(t=o.links)||void 0===t||t.push({link:a,i18nKey:n(u)}):null==o||null===(r=o.links)||void 0===r||r.push({link:"/"+(null===(i=window)||void 0===i?void 0:i.contextPath)+"/citizen/login",state:{role:"FSM_DSO",from:a},i18nKey:n(l)})}),o},b=function(e){var n=e.modules,o=e.getCitizenMenu,a=e.fetchedCitizen,l=e.isLoading,u=n.filter(function(e){return"Payment"===e.code})[0],c=n.filter(function(e){return"Payment"!==e.code}),s=[u].concat(c),d=i.useTranslation().t;return l?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"},s.filter(function(e){return e}).map(function(e,n){var i,l,u,c,s,f,v,m=e.code;return a&&(u=a?_(o,m,d):void 0),(null===(i=u)||void 0===i||null===(l=i.links)||void 0===l?void 0:l.length)>0?r.createElement(t.CitizenHomeCard,{header:d(null===(c=u)||void 0===c?void 0:c.header),links:null===(s=u)||void 0===s||null===(f=s.links)||void 0===f||null===(v=f.filter(function(e){return null==e?void 0:e.link}))||void 0===v?void 0:v.sort(function(e,t){return(null==e?void 0:e.orderNumber)-(null==t?void 0:t.orderNumber)}),Icon:function(){return function(e){switch(e){case"PT":return r.createElement(t.PTIcon,{className:"fill-path-primary-main"});case"WS":return r.createElement(t.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(t.PGRIcon,{className:"fill-path-primary-main"});case"TL":return r.createElement(t.TLIcon,{className:"fill-path-primary-main"});case"OBPS":return r.createElement(t.OBPSIcon,{className:"fill-path-primary-main"});case"Bills":return r.createElement(t.BillsIcon,{className:"fill-path-primary-main"});default:return r.createElement(t.PTIcon,{className:"fill-path-primary-main"})}}(m)},Info:"OBPS"===m?function(){return 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"===m}):r.createElement(r.Fragment,null)}))))},O=function(e){var t=e.additionalComponent;return r.createElement(n.Fragment,null,r.createElement("div",{className:"employee-app-container"},r.createElement("div",{className:"ground-container moduleCardWrapper gridModuleWrapper"},e.modules.map(function(e,t){var n=Digit.ComponentRegistryService.getComponent(e.code+"Card")||function(){return r.createElement(r.Fragment,null)};return r.createElement(n,{key:t})}))),t&&(null==t?void 0:t.length)>0&&t.map(function(e){var t="string"==typeof e?Digit.ComponentRegistryService.getComponent(e):null;return t?r.createElement("div",{className:"additional-component-wrapper"},r.createElement(t,null)):null}))},C=function(e){var t=e.modules,n=e.additionalComponent;return"citizen"===e.userType?r.createElement(b,{modules:t,getCitizenMenu:e.getCitizenMenu,fetchedCitizen:e.fetchedCitizen,isLoading:e.isLoading}):r.createElement(O,{modules:t,additionalComponent:n})},w=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},S=function(e){var i,o=n.useState(null),a=o[0],u=o[1],c=n.useState([]),s=c[0],d=c[1],f=(n.useState([]),l.useHistory());return n.useEffect(function(){var e,t,n=Digit.SessionStorage.get("citizen.userRequestObject"),r=[],i=[];null==n||null===(e=n.info)||void 0===e||null===(t=e.roles)||void 0===t||t.forEach(function(e){return r.push(e.tenantId)});var o=r.filter(function(e,t,n){return n.indexOf(e)===t});null==o||o.forEach(function(e){var t;i.push({label:"TENANT_TENANTS_"+(null===(t=w(e,".","_"))||void 0===t?void 0:t.toUpperCase()),value:e})}),null==i||i.filter(function(e){return e.value==Digit.SessionStorage.get("Employee.tenantId")}),d(i)},[a]),r.createElement("div",{style:null!=e&&e.mobileView?{color:"#767676"}:{}},r.createElement(t.Dropdown,{t:null==e?void 0:e.t,option:s,selected:s.find(function(e){return e.value===(null==a?void 0:a.value)}),optionKey:"label",select:function(e){var t,n,r,i,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(function(t){return 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),u(e),window.location.href.includes("/"+(null===(i=window)||void 0===i?void 0:i.contextPath)+"/employee/")){var l,c,s=(null===(l=location.state)||void 0===l?void 0:l.from)||"/"+(null===(c=window)||void 0===c?void 0:c.contextPath)+"/employee";f.replace(s)}window.location.reload()},freeze:!0,customSelector:r.createElement("label",{className:"cp"},null==e?void 0:e.t("TENANT_TENANTS_"+(null===(i=w(Digit.SessionStorage.get("Employee.tenantId"),".","_"))||void 0===i?void 0:i.toUpperCase())))}))},N=function(e){var i=e.dropdown||!1,o=Digit.Hooks.useStore.getInitData(),a=o.isLoading,l=o.data||{},u=l.languages,c=l.stateInfo,s=Digit.StoreData.getCurrentLanguage(),d=n.useState(s),f=d[0],v=d[1],m=function(e){v(e.value),Digit.LocalizationService.changeLanguage(e.value,c.code)};return a?null:i?r.createElement("div",null,r.createElement(t.Dropdown,{option:u,selected:u.find(function(e){return e.value===s}),optionKey:"label",select:m,freeze:!0,customSelector:r.createElement("label",{className:"cp"},u.find(function(e){return e.value===f}).label)})):r.createElement(r.Fragment,null,r.createElement("div",{style:{marginBottom:"5px"}},"Language"),r.createElement("div",{className:"language-selector"},u.map(function(e,n){return r.createElement("div",{className:"language-button-container",key:n},r.createElement(t.CustomButton,{selected:e.value===f,text:e.label,onClick:function(){return m(e)}}))})))},I=function(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())},D=function(e){var n,i,o,a,u,c,s,d,f=e.t,v=e.stateInfo,m=e.toggleSidebar,p=e.isSidebarOpen,g=e.handleLogout,h=e.userDetails,E=e.CITIZEN,y=e.cityDetails,_=e.mobileView,b=e.userOptions,O=e.handleUserDropdownSelection,C=e.logoUrl,w=e.showLanguageChange,D=void 0===w||w,T=r.useState(null),A=T[0],L=T[1];r.useEffect(function(){try{var e,t=Digit.ULBService.getCurrentTenantId(),n=null==h||null===(e=h.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,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!==A,null==h||null===(n=h.info)||void 0===n?void 0:n.uuid]);var R,x,P,M,k,U,j=Digit.ULBService.getCitizenCurrentTenant(!0),B=l.useHistory(),F=l.useLocation().pathname,V=Digit.Hooks.useNotificationCount({tenantId:j,config:{enabled:"EMPLOYEE"!==(null===(R=Digit.UserService)||void 0===R||null===(x=R.getUser())||void 0===x||null===(P=x.info)||void 0===P?void 0:P.type)&&"CITIZEN"===(null===(M=Digit.UserService)||void 0===M||null===(k=M.getUser())||void 0===k||null===(U=k.info)||void 0===U?void 0:U.type)&&!!j}}),z=V.data,W=(void 0===z?{}:z).unreadCount;if(E)return r.createElement("div",null,r.createElement(t.TopBar,{img:null==v?void 0:v.logoUrlWhite,isMobile:!0,toggleSidebar:function(){Digit.clikOusideFired?Digit.clikOusideFired=!1:m(!0)},logoUrl:null==v?void 0:v.logoUrlWhite,onLogout:g,userDetails:h,notificationCount:W<99?W:99,notificationCountLoaded:V.isSuccess,cityOfCitizenShownBesideLogo:f(j),onNotificationIconClick:function(){var e;B.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/citizen/engagement/notifications")},hideNotificationIconOnSomeUrlsWhenNotLoggedIn:function(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)}(F),changeLanguage:_?null:r.createElement(N,{dropdown:!0})}));var H=!(null==h||!h.access_token),G=null===(i=Digit.ComponentRegistryService)||void 0===i?void 0:i.getComponent("CustomEmployeeTopBar");return G?r.createElement(G,{t:f,stateInfo:v,toggleSidebar:m,isSidebarOpen:p,handleLogout:g,userDetails:h,CITIZEN:E,cityDetails:y,mobileView:_,userOptions:b,handleUserDropdownSelection:O,logoUrl:C,showLanguageChange:D,loggedin:H}):r.createElement("div",{className:"topbar"},_?r.createElement(t.Hamburger,{handleClick:m,color:"#9E9E9E"}):null,r.createElement("img",{className:"city",src:H?null==y?void 0:y.logoId:null==v?void 0:v.statelogo}),r.createElement("span",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"}},H&&(null!=y&&null!==(o=y.city)&&void 0!==o&&o.ulbGrade?r.createElement("p",{className:"ulb",style:_?{fontSize:"14px",display:"inline-block"}:{}},f(null==y?void 0:y.i18nKey).toUpperCase()," ",f("ULBGRADE_"+(null==y||null===(a=y.city)||void 0===a?void 0:a.ulbGrade.toUpperCase().replace(" ","_").replace(".","_"))).toUpperCase()):r.createElement("img",{className:"state",src:C})),!H&&r.createElement("p",{className:"ulb",style:_?{fontSize:"14px",display:"inline-block"}:{}},f("MYCITY_"+(null==v||null===(u=v.code)||void 0===u?void 0:u.toUpperCase())+"_LABEL")," ",f("MYCITY_STATECODE_LABEL")),!_&&r.createElement("div",{className:_?"right":"flex-right right w-80 column-gap-15",style:H?{}:{width:"80%"}},r.createElement("div",{className:"left"},!window.location.href.includes("employee/user/login")&&!window.location.href.includes("employee/user/language-selection")&&r.createElement(S,{dropdown:!0,t:f})),r.createElement("div",{className:"left"},D&&r.createElement(N,{dropdown:!0})),(null==h?void 0:h.access_token)&&r.createElement("div",{className:"left"},r.createElement(t.Dropdown,{option:b,optionKey:"name",select:O,showArrow:!0,freeze:!0,style:_?{right:0}:{},optionCardStyles:{overflow:"revert",display:"table"},topbarOptionsClassName:"topbarOptionsClassName",customSelector:null==A?r.createElement(I,{name:(null==h||null===(c=h.info)||void 0===c?void 0:c.name)||(null==h||null===(s=h.info)||void 0===s||null===(d=s.userInfo)||void 0===d?void 0:d.name)||"Employee"}):r.createElement("img",{src:A,style:{height:"48px",width:"48px",borderRadius:"50%"}})})),r.createElement("img",{className:"state",src:C}))))},T=function(e,n,i,o){var a,l;return[{type:"link",element:"HOME",text:e("COMMON_BOTTOM_NAVIGATION_HOME"),link:o?"/"+(null===(a=window)||void 0===a?void 0:a.contextPath)+"/employee":"/"+(null===(l=window)||void 0===l?void 0:l.contextPath)+"/citizen",icon:"HomeIcon",populators:{onClick:n}},{type:"component",element:"LANGUAGE",action:r.createElement(N,null),icon:"LanguageIcon"},{id:"login-btn",element:"LOGIN",text:e("CORE_COMMON_LOGIN"),icon:r.createElement(t.LogoutIcon,{className:"icon"}),populators:{onClick:i}}]},A="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",L=function(e){return r.createElement("h1",{className:"heading-m"},e.label)},R=function(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},r.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),r.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}))},x=function(e){return r.createElement("div",{onClick:null==e?void 0:e.onClick,style:null!=e&&e.isMobileView?{padding:5}:null},null!=e&&e.isMobileView?r.createElement(t.CloseSvg,null):r.createElement("div",{className:"icon-bg-secondary",style:{backgroundColor:"#505A5F"}}," ",r.createElement(R,null)," "))},P=function(e){var n=e.onSelect,o=e.onCancel,a=e.onDismiss,l=i.useTranslation().t,u=r.useState(window.innerWidth<=780),c=u[0],s=u[1],d=function(){window.innerWidth<=780?c||s(!0):c&&s(!1)};return r.useEffect(function(){return window.addEventListener("resize",function(){d()}),function(){window.addEventListener("resize",function(){d()})}}),c?r.createElement(t.Modal,{popupStyles:{height:"174px",maxHeight:"174px",width:"324px",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},popupModuleActionBarStyles:{display:"flex",flex:1,justifyContent:"flex-start",width:"100%",position:"absolute",left:0,bottom:0,padding:"18px"},style:{flex:1},popupModuleMianStyles:{padding:"18px"},headerBarMain:r.createElement(L,{label:l("CORE_LOGOUT_WEB_HEADER")}),headerBarEnd:r.createElement(x,{onClick:a,isMobileView:c}),actionCancelLabel:l("CORE_LOGOUT_CANCEL"),actionCancelOnSubmit:o,actionSaveLabel:l("CORE_LOGOUT_WEB_YES"),actionSaveOnSubmit:n,formId:"modal-action"},r.createElement("div",null,r.createElement(t.CardText,{style:{margin:0}},l("CORE_LOGOUT_WEB_CONFIRMATION_MESSAGE")+" "))):r.createElement(t.Modal,{popupModuleMianStyles:{paddingTop:"30px"},headerBarMain:r.createElement(L,{label:l("CORE_LOGOUT_WEB_HEADER")}),headerBarEnd:r.createElement(x,{onClick:a,isMobileView:!1}),actionCancelLabel:l("CORE_LOGOUT_CANCEL"),actionCancelOnSubmit:o,actionSaveLabel:l("CORE_LOGOUT_WEB_YES"),actionSaveOnSubmit:n,formId:"modal-action"},r.createElement("div",null,r.createElement(t.CardText,{style:{marginBottom:"54px",marginLeft:"8px",marginRight:"8px"}},l("CORE_LOGOUT_WEB_CONFIRMATION_MESSAGE")+" ",r.createElement("strong",null,l("CORE_LOGOUT_MESSAGE"),"?"))))},M=function(e){var t=e.info,n=e.t;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:A})),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(S,{t:n,mobileView:!0}))},k={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"})},U=function(e){var o,a,u,c=e.linkData,s=e.islinkDataLoading,f=i.useTranslation().t,v=l.useHistory(),m=l.useLocation().pathname,p=Digit.Hooks.useStore.getInitData(),g=p.data,h=p.isFetched,E=(g||{}).stateInfo,y=Digit.UserService.getUser(),_=window.Digit.Utils.browser.isMobile(),b=n.useState(!1)[0],O=n.useState(!1)[1],C=n.useState(!1),w=C[0],S=C[1],N=function(){S(!1)};if(s)return r.createElement(t.Loader,null);var I=function(){var e;v.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/citizen/user/profile")},D=[].concat(T(f,I,function(){var e;v.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/citizen/login")},b));D=D.filter(function(e){return"LANGUAGE"!==e.element}),Digit.ULBService.getCurrentTenantId();var A,L=function(e){var t,n,i,o=e.item,a=(null==o?void 0:o.icon)||(null===(t=o.icon)||void 0===t||null===(n=t.type)||void 0===n?void 0:n.name),u=a?k[a]:k.BillsIcon;i="component"===o.type?o.action:o.text;var c=function(){return r.createElement("span",d({className:"menu-item"},o.populators),u,r.createElement("div",{className:"menu-label"},i))};return"external-link"===o.type?r.createElement("a",{href:o.link},r.createElement(c,null)):"link"===o.type?r.createElement(l.Link,{to:null==o?void 0:o.link},r.createElement(c,null)):r.createElement(c,null)};return h&&y&&y.access_token&&(A=r.createElement(M,{info:null==y?void 0:y.info,stateName:null==E?void 0:E.name,t:f}),D=D.filter(function(e){return"login-btn"!==(null==e?void 0:e.id)}),D=[].concat(D,[{text:f("EDIT_PROFILE"),element:"PROFILE",icon:"EditPencilIcon",populators:{onClick:I}},{text:f("CORE_COMMON_LOGOUT"),element:"LOGOUT",icon:"LogoutIcon",populators:{onClick:function(){O(!1),S(!0)}}},{text:r.createElement(r.Fragment,null,f("CS_COMMON_HELPLINE"),r.createElement("div",{className:"telephone",style:{marginTop:"-10%"}},null==g?void 0:g.tenants.map(function(e){}),r.createElement("div",{className:"link"},r.createElement("a",{href:"tel:"+(null==g?void 0:g.tenants[0].contactNumber)},null==g?void 0:g.tenants[0].contactNumber)))),element:"Helpline",icon:"Phone"}])),null===(o=Object.keys(c))||void 0===o||null===(a=o.sort(function(e,t){return t.localeCompare(e)}))||void 0===a||a.map(function(e){var t,n,r,i,o,a;(null===(t=c[e][0])||void 0===t?void 0:t.sidebar)===window.contextPath+"-links"&&D.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:f("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===(a=c[e][0])||void 0===a?void 0:a.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:_?"calc(100vh - 56px)":"auto",zIndex:"99"}},A,r.createElement("div",{className:"drawer-desktop"},null===(u=D)||void 0===u?void 0:u.map(function(e,t){return r.createElement("div",{className:"sidebar-list "+(m===(null==e?void 0:e.link)||m===(null==e?void 0:e.sidebarURL)?"active":""),key:t},r.createElement(L,{item:e}))}))),r.createElement("div",null,w&&r.createElement(P,{onSelect:function(){Digit.UserService.logout(),S(!1)},onCancel:N,onDismiss:N}))))},j=function(e){var t,n=e.info,i=e.t,o=r.useState(null),a=o[0],l=o[1];r.useEffect(function(){try{var 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,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!==a]);var u=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:a||A,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")&&!u&&r.createElement(S,{t:i,mobileView:!0}))},B=function(){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:function(){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()}})," ")},F=function(e){var o=e.isOpen,a=e.isMobile,u=void 0!==a&&a,c=e.toggleSidebar,s=e.onLogout,f=e.isEmployee,v=void 0!==f&&f,m=e.linkData,p=e.islinkDataLoading,g=Digit.Hooks.useStore.getInitData(),h=g.data,E=g.isFetched,y=(h||{}).stateInfo,_=Digit.UserService.getUser(),b=n.useState(""),O=b[0],C=b[1],w=i.useTranslation().t,S=l.useHistory(),N=function(){Digit.clikOusideFired=!0,c(!1)},I=Digit.Hooks.useAccessControl(),D=I.isLoading,A=I.data;if(Digit.ULBService.getCurrentTenantId(),p||D)return r.createElement(t.Loader,null);var L,R=[].concat(T(w,N,function(){var e;S.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/citizen/login"),N()},v));E&&_&&_.access_token&&(L=r.createElement(j,{info:null==_?void 0:_.info,stateName:null==y?void 0:y.name,t:w}),R=R.filter(function(e){return"login-btn"!==(null==e?void 0:e.id)}),R=[].concat(R,[{text:w("EDIT_PROFILE"),element:"PROFILE",icon:"EditPencilIcon",populators:{onClick:function(){var e,t,n=v?"/"+(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";S.push(n),N()}}},{text:w("CORE_COMMON_LOGOUT"),element:"LOGOUT",icon:"LogoutIcon",populators:{onClick:s}},{text:r.createElement(r.Fragment,null,w("CS_COMMON_HELPLINE"),r.createElement("div",{className:"telephone",style:{marginTop:"-10%"}},null==h?void 0:h.tenants.map(function(e){}),r.createElement("div",{className:"link"},r.createElement("a",{href:"tel:"+(null==h?void 0:h.tenants[0].contactNumber)},null==h?void 0:h.tenants[0].contactNumber)))),element:"Helpline",icon:"Phone"}]));var x={};if(v){var P;null==A||A.actions.filter(function(e){return"url"===e.url&&"Home"!==e.displayName}).forEach(function(e){var t;if(""==O&&""!==e.path){var n=e.path.split(".")[0];"TradeLicense"===n&&(n="Trade License"),x[n]?x[n].push(e):x[n]=[e]}else if(""!==e.path&&null!=e&&null!==(t=e.displayName)&&void 0!==t&&t.toLowerCase().includes(O.toLowerCase())){var r=e.path.split(".")[0];"TradeLicense"===r&&(r="Trade License"),x[r]?x[r].push(e):x[r]=[e]}});for(var M=Object.keys(x),k=function(e){var t,n,r,i,o,a,l,u,c,s,f,v=null===(t=x[M[e]][0])||void 0===t||null===(n=t.displayName)||void 0===n||null===(r=n.toUpperCase())||void 0===r?void 0:r.replace(/[ -]/g,"_"),m=null===(i=M[e])||void 0===i||null===(o=i.toUpperCase())||void 0===o?void 0:o.replace(/[ -]/g,"_");-1===x[M[e]][0].path.indexOf(".")?R.splice(1,0,{type:"link",text:w("ACTION_TEST_"+v),link:null===(a=x[M[e]][0])||void 0===a?void 0:a.navigationURL,icon:null===(l=x[M[e]][0])||void 0===l||null===(u=l.leftIcon)||void 0===u||null===(c=u.split)||void 0===c?void 0:c.call(u,":")[1],populators:{onClick:function(){var t;S.push(null===(t=x[M[e]][0])||void 0===t?void 0:t.navigationURL),N()}}}):R.splice(1,0,{type:"dynamic",moduleName:w("ACTION_TEST_"+m),links:null===(s=x[M[e]])||void 0===s?void 0:s.map(function(e){var t,n;return d({},e,{displayName:w("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===(f=x[M[e]][1])||void 0===f?void 0:f.leftIcon})},F=0;F<M.length;F++)k(F);var V=R.findIndex(function(e){return"HOME"===e.element}),z=R.splice(V,1),W=R.findIndex(function(e){return"LANGUAGE"===e.element}),H=R.splice(W,(null===(P=R)||void 0===P?void 0:P.length)-W);R.sort(function(e,t){return("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==z?void 0:z[0])&&R.splice(0,0,z[0]),R=(null==H?void 0:H.length)>0?R.concat(H):R}else{var G,q;null===(G=Object.keys(m))||void 0===G||null===(q=G.sort(function(e,t){return t.localeCompare(e)}))||void 0===q||q.map(function(e){var t,n,r,i,o,a;"digit-ui-links"===(null===(t=m[e][0])||void 0===t?void 0:t.sidebar)&&R.splice(1,0,{type:null!==(n=m[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:w("ACTION_TEST_"+Digit.Utils.locale.getTransformedLocale(e)),links:m[e],icon:null===(o=m[e][0])||void 0===o?void 0:o.leftIcon,link:null===(a=m[e][0])||void 0===a?void 0:a.sidebarURL})})}return S.location.pathname.includes("/openlink")&&(L=r.createElement("span",null),R=R.filter(function(e){return"LANGUAGE"===e.element})),u?r.createElement(t.NavBar,{open:o,toggleSidebar:c,profileItem:L,onClose:N,menuItems:R,Footer:r.createElement(B,null),isEmployee:v,search:O,setSearch:C}):r.createElement(U,{logout:s})},V="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function z(e,t){return e(t={exports:{}},t.exports),t.exports}z(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]",a="[object Array]",l="[object Boolean]",u="[object Date]",c="[object Error]",s="[object Function]",d="[object GeneratorFunction]",f="[object Map]",v="[object Number]",m="[object Object]",p="[object RegExp]",g="[object Set]",h="[object String]",E="[object Symbol]",y="[object WeakMap]",_="[object ArrayBuffer]",b="[object DataView]",O="[object Float32Array]",C="[object Float64Array]",w="[object Int8Array]",S="[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,M=RegExp(x.source),k=RegExp(P.source),U=/<%-([\s\S]+?)%>/g,j=/<%([\s\S]+?)%>/g,B=/<%=([\s\S]+?)%>/g,F=/\.|\[(?:[^[\]]*|(["'])(?:(?!\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,ae=/^(?:0|[1-9]\d*)$/,le=/[\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+"]",ve="["+se+"]",me="\\d+",pe="[a-z\\xdf-\\xf6\\xf8-\\xff]",ge="[^\\ud800-\\udfff"+de+me+"\\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]",Oe="(?:"+pe+"|"+ge+")",Ce="(?:"+be+"|"+ge+")",we="(?:"+ve+"|"+he+")?",Se="[\\ufe0e\\ufe0f]?"+we+"(?:\\u200d(?:"+[Ee,ye,_e].join("|")+")[\\ufe0e\\ufe0f]?"+we+")*",Ne="(?:"+["[\\u2700-\\u27bf]",ye,_e].join("|")+")"+Se,Ie="(?:"+[Ee+ve+"?",ve,ye,_e,"[\\ud800-\\udfff]"].join("|")+")",De=RegExp("['’]","g"),Te=RegExp(ve,"g"),Ae=RegExp(he+"(?="+he+")|"+Ie+Se,"g"),Le=RegExp([be+"?"+pe+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[fe,be,"$"].join("|")+")",Ce+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[fe,be+Oe,"$"].join("|")+")",be+"?"+Oe+"+(?:['’](?: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_])",me,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[O]=ke[C]=ke[w]=ke[S]=ke[N]=ke[I]=ke["[object Uint8ClampedArray]"]=ke[D]=ke[T]=!0,ke[o]=ke[a]=ke[_]=ke[l]=ke[b]=ke[u]=ke[c]=ke[s]=ke[f]=ke[v]=ke[m]=ke[p]=ke[g]=ke[h]=ke[y]=!1;var Ue={};Ue[o]=Ue[a]=Ue[_]=Ue[b]=Ue[l]=Ue[u]=Ue[O]=Ue[C]=Ue[w]=Ue[S]=Ue[N]=Ue[f]=Ue[v]=Ue[m]=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 je={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Be=parseFloat,Fe=parseInt,Ve="object"==typeof V&&V&&V.Object===Object&&V,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 a=e[i];t(r,a,n(a),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 at(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function lt(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 vt(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 mt=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?wt(e,t)/n:NaN}function bt(e){return function(t){return null==t?void 0:t[e]}}function Ot(e){return function(t){return null==e?void 0:e[t]}}function Ct(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}function wt(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 St(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=Ot({"À":"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=Ot({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Mt(e){return"\\"+je[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 jt(e,t){return function(n){return e(t(n))}}function Bt(e,t){for(var n=-1,i=e.length,o=0,a=[];++n<i;){var l=e[n];l!==t&&l!==r||(e[n]=r,a[o++]=n)}return a}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):mt(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=Ot({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),qt=function e(t){var V,Z=(t=null==t?We:qt.defaults(We.Object(),t,qt.pick(We,Pe))).Array,se=t.Date,de=t.Error,fe=t.Function,ve=t.Math,me=t.Object,pe=t.RegExp,ge=t.String,he=t.TypeError,Ee=Z.prototype,ye=me.prototype,_e=t["__core-js_shared__"],be=fe.prototype.toString,Oe=ye.hasOwnProperty,Ce=0,we=(V=/[^.]+$/.exec(_e&&_e.keys&&_e.keys.IE_PROTO||""))?"Symbol(src)_1."+V:"",Se=ye.toString,Ne=be.call(me),Ie=We._,Ae=pe("^"+be.call(Oe).replace(H,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Re=qe?t.Buffer:void 0,je=t.Symbol,Ve=t.Uint8Array,ze=Re?Re.allocUnsafe:void 0,He=jt(me.getPrototypeOf,me),Ge=me.create,Ze=ye.propertyIsEnumerable,Xe=Ee.splice,mt=je?je.isConcatSpreadable:void 0,Ot=je?je.iterator:void 0,Zt=je?je.toStringTag:void 0,Xt=function(){try{var e=Ji(me,"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=ve.ceil,Qt=ve.floor,en=me.getOwnPropertySymbols,tn=Re?Re.isBuffer:void 0,nn=t.isFinite,rn=Ee.join,on=jt(me.keys,me),an=ve.max,ln=ve.min,un=se.now,cn=t.parseInt,sn=ve.random,dn=Ee.reverse,fn=Ji(t,"DataView"),vn=Ji(t,"Map"),mn=Ji(t,"Promise"),pn=Ji(t,"Set"),gn=Ji(t,"WeakMap"),hn=Ji(me,"create"),En=gn&&new gn,yn={},_n=Do(fn),bn=Do(vn),On=Do(mn),Cn=Do(pn),wn=Do(gn),Sn=je?je.prototype:void 0,Nn=Sn?Sn.valueOf:void 0,In=Sn?Sn.toString:void 0;function Dn(e){if(Ga(e)&&!Pa(e)&&!(e instanceof Rn)){if(e instanceof Ln)return e;if(Oe.call(e,"__wrapped__"))return To(e)}return new Ln(e)}var Tn=function(){function e(){}return function(t){if(!Ha(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 jn(e,t){var n=Pa(e),r=!n&&xa(e),i=!n&&!r&&ja(e),o=!n&&!r&&!i&&Qa(e),a=n||r||i||o,l=a?St(e.length,ge):[],u=l.length;for(var c in e)!t&&!Oe.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||oo(c,u))||l.push(c);return l}function Bn(e){var t=e.length;return t?e[Mr(0,t-1)]:void 0}function Fn(e,t){return Co(gi(e),$n(t,0,e.length))}function Vn(e){return Co(gi(e))}function zn(e,t,n){(void 0!==n&&!Aa(e[t],n)||void 0===n&&!(t in e))&&Zn(e,t,n)}function Wn(e,t,n){var r=e[t];Oe.call(e,t)&&Aa(r,n)&&(void 0!==n||t in e)||Zn(e,t,n)}function Hn(e,t){for(var n=e.length;n--;)if(Aa(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,bl(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:gl(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,a){var c,y=1&t,A=2&t,L=4&t;if(n&&(c=i?n(e,r,i,a):n(e)),void 0!==c)return c;if(!Ha(e))return e;var R=Pa(e);if(R){if(c=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Oe.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(ja(e))return si(e,y);if(x==m||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,Ol(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 l: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 O:case C:case w:case S:case N:case I:case"[object Uint8ClampedArray]":case D:case T:return fi(e,n);case f:return new r;case v: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?me(Nn.call(e)):{}}}(e,x,y)}}a||(a=new Un);var M=a.get(e);if(M)return M;a.set(e,c),Ya(e)?e.forEach(function(r){c.add(Yn(r,t,n,r,e,a))}):qa(e)&&e.forEach(function(r,i){c.set(i,Yn(r,t,n,i,e,a))});var k=R?void 0:(L?A?Gi:Hi:A?Ol:bl)(e);return rt(k||e,function(r,i){k&&(r=e[i=r]),Wn(c,i,Yn(r,t,n,i,e,a))}),c}function Kn(e,t,n){var r=n.length;if(null==e)return!r;for(e=me(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=lt,a=!0,l=e.length,u=[],c=t.length;if(!l)return u;n&&(t=ct(t,It(n))),r?(o=ut,a=!1):t.length>=200&&(o=Tt,a=!1,t=new kn(t));e:for(;++i<l;){var s=e[i],d=null==n?s:n(s);if(s=r||0!==s?s:0,a&&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:U,evaluate:j,interpolate:B,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 Oe.call(t,e)?t[e]:void 0},xn.prototype.has=function(e){var t=this.__data__;return hn?void 0!==t[e]:Oe.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(vn||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(!vn||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],a=t(o);if(null!=a&&(void 0===l?a==a&&!Ja(a):n(a,l)))var l=a,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,a=e.length;for(n||(n=io),i||(i=[]);++o<a;){var l=e[o];t>0&&n(l)?t>1?or(l,t-1,n,r,i):st(i,l):r||(i[i.length]=l)}return i}var ar=bi(),lr=bi(!0);function ur(e,t){return e&&ar(e,t,bl)}function cr(e,t){return e&&lr(e,t,bl)}function sr(e,t){return at(t,function(t){return Va(e[t])})}function dr(e,t){for(var n=0,r=(t=ai(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 Pa(e)?r:st(r,n(e))}function vr(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Zt&&Zt in me(e)?function(e){var t=Oe.call(e,Zt),n=e[Zt];try{e[Zt]=void 0;var r=!0}catch(e){}var i=Se.call(e);return r&&(t?e[Zt]=n:delete e[Zt]),i}(e):function(e){return Se.call(e)}(e)}function mr(e,t){return e>t}function pr(e,t){return null!=e&&Oe.call(e,t)}function gr(e,t){return null!=e&&t in me(e)}function hr(e,t,n){for(var r=n?ut:lt,i=e[0].length,o=e.length,a=o,l=Z(o),u=Infinity,c=[];a--;){var s=e[a];a&&t&&(s=ct(s,It(t))),u=ln(s.length,u),l[a]=!n&&(t||i>=120&&s.length>=120)?new kn(a&&s):void 0}s=e[0];var d=-1,f=l[0];e:for(;++d<i&&c.length<u;){var v=s[d],m=t?t(v):v;if(v=n||0!==v?v:0,!(f?Tt(f,m):r(c,m,n))){for(a=o;--a;){var p=l[a];if(!(p?Tt(p,m):r(e[a],m,n)))continue e}f&&f.push(m),c.push(v)}}return c}function Er(e,t,n){var r=null==(e=po(e,t=ai(t,e)))?e:e[Io(Fo(t))];return null==r?void 0:tt(r,e,n)}function yr(e){return Ga(e)&&vr(e)==o}function _r(e,t,n,r,i){return e===t||(null==e||null==t||!Ga(e)&&!Ga(t)?e!=e&&t!=t:function(e,t,n,r,i,s){var d=Pa(e),y=Pa(t),O=d?a:to(e),C=y?a:to(t),w=(O=O==o?m:O)==m,S=(C=C==o?m:C)==m,N=O==C;if(N&&ja(e)){if(!ja(t))return!1;d=!0,w=!1}if(N&&!w)return s||(s=new Un),d||Qa(e)?zi(e,t,n,r,i,s):function(e,t,n,r,i,o,a){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 l:case u:case v:return Aa(+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=a.get(e);if(d)return d==t;r|=2,a.set(e,t);var m=zi(s(e),s(t),r,i,o,a);return a.delete(e),m;case E:if(Nn)return Nn.call(e)==Nn.call(t)}return!1}(e,t,O,n,r,i,s);if(!(1&n)){var I=w&&Oe.call(e,"__wrapped__"),D=S&&Oe.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 a=1&n,l=Hi(e),u=l.length;if(u!=Hi(t).length&&!a)return!1;for(var c=u;c--;){var s=l[c];if(!(a?s in t:Oe.call(t,s)))return!1}var d=o.get(e),f=o.get(t);if(d&&f)return d==t&&f==e;var v=!0;o.set(e,t),o.set(t,e);for(var m=a;++c<u;){var p=e[s=l[c]],g=t[s];if(r)var h=a?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)){v=!1;break}m||(m="constructor"==s)}if(v&&!m){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||(v=!1)}return o.delete(e),o.delete(t),v}(e,t,n,r,i,s))}(e,t,n,r,_r,i))}function br(e,t,n,r){var i=n.length,o=i,a=!r;if(null==e)return!o;for(e=me(e);i--;){var l=n[i];if(a&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<o;){var u=(l=n[i])[0],c=e[u],s=l[1];if(a&&l[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 Or(e){return!(!Ha(e)||(t=e,we&&we in t))&&(Va(e)?Ae:ie).test(Do(e));var t}function Cr(e){return"function"==typeof e?e:null==e?Zl:"object"==typeof e?Pa(e)?Dr(e[0],e[1]):Ir(e):nu(e)}function wr(e){if(!so(e))return on(e);var t=[];for(var n in me(e))Oe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Sr(e,t){return e<t}function Nr(e,t){var n=-1,r=ka(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]?vo(t[0][0],t[0][1]):function(n){return n===e||br(n,e,t)}}function Dr(e,t){return lo(e)&&fo(t)?vo(Io(e),t):function(n){var r=gl(n,e);return void 0===r&&r===t?hl(n,e):_r(t,r,3)}}function Tr(e,t,n,r,i){e!==t&&ar(t,function(o,a){if(i||(i=new Un),Ha(o))!function(e,t,n,r,i,o,a){var l=ho(e,n),u=ho(t,n),c=a.get(u);if(c)zn(e,n,c);else{var s=o?o(l,u,n+"",e,t,a):void 0,d=void 0===s;if(d){var f=Pa(u),v=!f&&ja(u),m=!f&&!v&&Qa(u);s=u,f||v||m?Pa(l)?s=l:Ua(l)?s=gi(l):v?(d=!1,s=si(u,!0)):m?(d=!1,s=fi(u,!0)):s=[]:Xa(u)||xa(u)?(s=l,xa(l)?s=ll(l):Ha(l)&&!Va(l)||(s=ro(u))):d=!1}d&&(a.set(u,s),i(s,u,r,o,a),a.delete(u)),zn(e,n,s)}}(e,t,a,n,Tr,r,i);else{var l=r?r(ho(e,a),o,a+"",e,t,i):void 0;void 0===l&&(l=o),zn(e,a,l)}},Ol)}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 Pa(e)?function(t){return dr(t,1===e.length?e[0]:e)}:e}):[Zl];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,a=i.length,l=n.length;++r<a;){var u=vi(i[r],o[r]);if(u)return r>=l?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 a=t[r],l=dr(e,a);n(l,a)&&Fr(o,ai(a,e),l)}return o}function xr(e,t,n,r){var i=r?Et:ht,o=-1,a=t.length,l=e;for(e===t&&(t=gi(t)),n&&(l=ct(e,It(n)));++o<a;)for(var u=0,c=t[o],s=n?n(c):c;(u=i(l,s,u,r))>-1;)l!==e&&Xe.call(l,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(mo(e,t,Zl),e+"")}function jr(e){return Bn(Al(e))}function Br(e,t){var n=Al(e);return Co(n,$n(t,0,n.length))}function Fr(e,t,n,r){if(!Ha(e))return e;for(var i=-1,o=(t=ai(t,e)).length,a=o-1,l=e;null!=l&&++i<o;){var u=Io(t[i]),c=n;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;if(i!=a){var s=l[u];void 0===(c=r?r(s,u,l):void 0)&&(c=Ha(s)?s:oo(t[i+1])?[]:{})}Wn(l,u,c),l=l[u]}return e}var Vr=En?function(e,t){return En.set(e,t),e}:Zl,zr=Xt?function(e,t){return Xt(e,"toString",{configurable:!0,enumerable:!1,value:Hl(t),writable:!0})}:Zl;function Wr(e){return Co(Al(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,a=e[o];null!==a&&!Ja(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return Zr(e,t,Zl,n)}function Zr(e,t,n,r){var i=0,o=null==e?0:e.length;if(0===o)return 0;for(var a=(t=n(t))!=t,l=null===t,u=Ja(t),c=void 0===t;i<o;){var s=Qt((i+o)/2),d=n(e[s]),f=void 0!==d,v=null===d,m=d==d,p=Ja(d);if(a)var g=r||m;else g=c?m&&(r||f):l?m&&f&&(r||!v):u?m&&f&&!v&&(r||!p):!v&&!p&&(r?d<=t:d<t);g?i=s+1:o=s}return ln(o,4294967294)}function Xr(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],l=t?t(a):a;if(!n||!Aa(l,u)){var u=l;o[i++]=0===a?0:a}}return o}function $r(e){return"number"==typeof e?e:Ja(e)?NaN:+e}function Yr(e){if("string"==typeof e)return e;if(Pa(e))return ct(e,Yr)+"";if(Ja(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=lt,o=e.length,a=!0,l=[],u=l;if(n)a=!1,i=ut;else if(o>=200){var c=t?null:ki(e);if(c)return Ft(c);a=!1,i=Tt,u=new kn}else u=t?[]:l;e:for(;++r<o;){var s=e[r],d=t?t(s):s;if(s=n||0!==s?s:0,a&&d==d){for(var f=u.length;f--;)if(u[f]===d)continue e;t&&u.push(d),l.push(s)}else i(u,d,n)||(u!==l&&u.push(d),l.push(s))}return l}function Jr(e,t){return null==(e=po(e,t=ai(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 a=e[i],l=-1;++l<r;)l!=i&&(o[i]=Qn(o[i]||a,e[l],t,n));return Kr(or(o,1),t,n)}function ri(e,t,n){for(var r=-1,i=e.length,o=t.length,a={};++r<i;)n(a,e[r],r<o?t[r]:void 0);return a}function ii(e){return Ua(e)?e:[]}function oi(e){return"function"==typeof e?e:Zl}function ai(e,t){return Pa(e)?e:lo(e,t)?[e]:No(ul(e))}var li=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 vi(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=e==e,o=Ja(e),a=void 0!==t,l=null===t,u=t==t,c=Ja(t);if(!l&&!c&&!o&&e>t||o&&a&&u&&!l&&!c||r&&a&&u||!n&&u||!i)return 1;if(!r&&!o&&!c&&e<t||c&&n&&i&&!r&&!o||l&&n&&i||!a&&i||!u)return-1}return 0}function mi(e,t,n,r){for(var i=-1,o=e.length,a=n.length,l=-1,u=t.length,c=an(o-a,0),s=Z(u+c),d=!r;++l<u;)s[l]=t[l];for(;++i<a;)(d||i<o)&&(s[n[i]]=e[i]);for(;c--;)s[l++]=e[i++];return s}function pi(e,t,n,r){for(var i=-1,o=e.length,a=-1,l=n.length,u=-1,c=t.length,s=an(o-l,0),d=Z(s+c),f=!r;++i<s;)d[i]=e[i];for(var v=i;++u<c;)d[v+u]=t[u];for(;++a<l;)(f||i<o)&&(d[v+n[a]]=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,a=t.length;++o<a;){var l=t[o],u=r?r(n[l],e[l],l,n,e):void 0;void 0===u&&(u=e[l]),i?Zn(n,l,u):Wn(n,l,u)}return n}function Ei(e,t){return function(n,r){var i=Pa(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,a=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,a&&ao(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=me(t);++r<i;){var l=n[r];l&&e(t,l,r,o)}return t})}function _i(e,t){return function(n,r){if(null==n)return n;if(!ka(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=me(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function bi(e){return function(t,n,r){for(var i=-1,o=me(t),a=r(t),l=a.length;l--;){var u=a[e?l:++i];if(!1===n(o[u],u,o))break}return t}}function Oi(e){return function(t){var n=kt(t=ul(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 Ci(e){return function(t){return dt(Vl(xl(t).replace(De,"")),e,"")}}function wi(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 Ha(r)?r:n}}function Si(e){return function(t,n,r){var i=me(t);if(!ka(t)){var o=$i(n,3);t=bl(t),n=function(e){return o(i[e],e,i)}}var a=e(t,n,r);return a>-1?i[o?t[a]:a]: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 a=t[i];if("function"!=typeof a)throw new he(n);if(o&&!l&&"wrapper"==Zi(a))var l=new Ln([],!0)}for(i=l?i:r;++i<r;){var u=Zi(a=t[i]),c="wrapper"==u?qi(a):void 0;l=c&&uo(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?l[Zi(c[0])].apply(l,c[3]):1==a.length&&uo(a)?l[u]():l.thru(a)}return function(){var e=arguments,n=e[0];if(l&&1==e.length&&Pa(n))return l.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,a,l,u,c){var s=128&t,d=1&t,f=2&t,v=24&t,m=512&t,p=f?void 0:wi(e);return function g(){for(var h=arguments.length,E=Z(h),y=h;y--;)E[y]=arguments[y];if(v)var _=Xi(g),b=Rt(E,_);if(r&&(E=mi(E,r,i,v)),o&&(E=pi(E,o,a,v)),h-=b,v&&h<c){var O=Bt(E,_);return Pi(e,t,Ii,g.placeholder,n,E,O,l,u,c-h)}var C=d?n:this,w=f?C[e]:e;return h=E.length,l?E=go(E,l):m&&h>1&&E.reverse(),s&&u<h&&(E.length=u),this&&this!==We&&this instanceof g&&(w=p||wi(w)),w.apply(C,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&&ao(t,n,r)&&(n=r=void 0),t=rl(t),void 0===n?(n=t,t=0):n=rl(n),function(e,t,n,r){for(var i=-1,o=an(Jt((t-e)/(n||1)),0),a=Z(o);o--;)a[r?o:++i]=e,e+=n;return a}(t,n,r=void 0===r?t<n?1:-1:rl(r),e)}}function xi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=al(t),n=al(n)),e(t,n)}}function Pi(e,t,n,r,i,o,a,l,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?a:void 0,s?void 0:o,s?void 0:a,l,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=ve[e];return function(e,n){if(e=al(e),(n=null==n?0:ln(il(n),292))&&nn(e)){var r=(ul(e)+"e").split("e");return+((r=(ul(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)}:Jl;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 ji(e,t,i,o,a,l,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=a=void 0),u=void 0===u?u:an(il(u),0),c=void 0===c?c:il(c),d-=a?a.length:0,64&t){var f=o,v=a;o=a=void 0}var m=s?void 0:qi(e),p=[e,t,i,o,a,f,v,l,u,c];if(m&&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 a=t[3];if(a){var l=e[3];e[3]=l?mi(l,a,t[4]):a,e[4]=l?Bt(e[3],r):t[4]}(a=t[5])&&(e[5]=(l=e[5])?pi(l,a,t[6]):a,e[6]=l?Bt(e[5],r):t[6]),(a=t[7])&&(e[7]=a),128&i&&(e[8]=null==e[8]?t[8]:ln(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(p,m),e=p[0],t=p[1],i=p[2],o=p[3],a=p[4],!(c=p[9]=void 0===p[9]?s?0:e.length:an(p[9]-d,0))&&24&t&&(t&=-25),t&&1!=t)g=8==t||16==t?function(e,t,n){var r=wi(e);return function i(){for(var o=arguments.length,a=Z(o),l=o,u=Xi(i);l--;)a[l]=arguments[l];var c=o<3&&a[0]!==u&&a[o-1]!==u?[]:Bt(a,u);if((o-=c.length)<n)return Pi(e,t,Ii,i.placeholder,void 0,a,c,void 0,void 0,n-o);var s=this&&this!==We&&this instanceof i?r:e;return tt(s,this,a)}}(e,t,c):32!=t&&33!=t||a.length?Ii.apply(void 0,p):function(e,t,n,r){var i=1&t,o=wi(e);return function t(){for(var a=-1,l=arguments.length,u=-1,c=r.length,s=Z(c+l),d=this&&this!==We&&this instanceof t?o:e;++u<c;)s[u]=r[u];for(;l--;)s[u++]=arguments[++a];return tt(d,i?n:this,s)}}(e,t,i,o);else var g=function(e,t,n){var r=1&t,i=wi(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((m?Vr:Eo)(g,p),e,t)}function Bi(e,t,n,r){return void 0===e||Aa(e,ye[n])&&!Oe.call(r,n)?t:e}function Fi(e,t,n,r,i,o){return Ha(e)&&Ha(t)&&(o.set(t,e),Tr(e,t,void 0,Fi,o),o.delete(t)),e}function Vi(e){return Xa(e)?void 0:e}function zi(e,t,n,r,i,o){var a=1&n,l=e.length,u=t.length;if(l!=u&&!(a&&u>l))return!1;var c=o.get(e),s=o.get(t);if(c&&s)return c==t&&s==e;var d=-1,f=!0,v=2&n?new kn:void 0;for(o.set(e,t),o.set(t,e);++d<l;){var m=e[d],p=t[d];if(r)var g=a?r(p,m,d,t,e,o):r(m,p,d,e,t,o);if(void 0!==g){if(g)continue;f=!1;break}if(v){if(!vt(t,function(e,t){if(!Tt(v,t)&&(m===e||i(m,e,n,r,o)))return v.push(t)})){f=!1;break}}else if(m!==p&&!i(m,p,n,r,o)){f=!1;break}}return o.delete(e),o.delete(t),f}function Wi(e){return _o(mo(e,void 0,Mo),e+"")}function Hi(e){return fr(e,bl,Qi)}function Gi(e){return fr(e,Ol,eo)}var qi=En?function(e){return En.get(e)}:Jl;function Zi(e){for(var t=e.name+"",n=yn[t],r=Oe.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(Oe.call(Dn,"placeholder")?Dn:e).placeholder}function $i(){var e=Dn.iteratee||Xl;return e=e===Xl?Cr: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=bl(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 Or(n)?n:void 0}var Qi=en?function(e){return null==e?[]:(e=me(e),at(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=vr;function no(e,t,n){for(var r=-1,i=(t=ai(t,e)).length,o=!1;++r<i;){var a=Io(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Wa(i)&&oo(a,i)&&(Pa(e)||xa(e))}function ro(e){return"function"!=typeof e.constructor||so(e)?{}:Tn(He(e))}function io(e){return Pa(e)||xa(e)||!!(mt&&e&&e[mt])}function oo(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ae.test(e))&&e>-1&&e%1==0&&e<t}function ao(e,t,n){if(!Ha(n))return!1;var r=typeof t;return!!("number"==r?ka(n)&&oo(t,n.length):"string"==r&&t in n)&&Aa(n[t],e)}function lo(e,t){if(Pa(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Ja(e))||z.test(e)||!F.test(e)||null!=t&&e in me(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||vn&&to(new vn)!=f||mn&&"[object Promise]"!=to(mn.resolve())||pn&&to(new pn)!=g||gn&&to(new gn)!=y)&&(to=function(e){var t=vr(e),n=t==m?e.constructor:void 0,r=n?Do(n):"";if(r)switch(r){case _n:return b;case bn:return f;case On:return"[object Promise]";case Cn:return g;case wn:return y}return t});var co=_e?Va:au;function so(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ye)}function fo(e){return e==e&&!Ha(e)}function vo(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in me(n))}}function mo(e,t,n){return t=an(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=an(r.length-t,0),a=Z(o);++i<o;)a[i]=r[t+i];i=-1;for(var l=Z(t+1);++i<t;)l[i]=r[i];return l[t]=n(a),tt(e,this,l)}}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=ln(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=Oo(Vr),yo=Kt||function(e,t){return We.setTimeout(e,t)},_o=Oo(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]&&!lt(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match($);return t?t[1].split(Y):[]}(r),n)))}function Oo(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 Co(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),a=e[o];e[o]=e[n],e[n]=a}return e.length=t,e}var wo,So,No=(wo=wa(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===So.size&&So.clear(),e}),So=wo.cache,wo);function Io(e){if("string"==typeof e||Ja(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 Ua(e)?Qn(e,or(t,1,Ua,!0)):[]}),Lo=Ur(function(e,t){var n=Fo(t);return Ua(n)&&(n=void 0),Ua(e)?Qn(e,or(t,1,Ua,!0),$i(n,2)):[]}),Ro=Ur(function(e,t){var n=Fo(t);return Ua(n)&&(n=void 0),Ua(e)?Qn(e,or(t,1,Ua,!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:il(n);return i<0&&(i=an(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=il(n),i=n<0?an(r+i,0):ln(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):[]}),jo=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)):[]}),Bo=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(vi)),r});function Ho(e){return null==e?e:dn.call(e)}var Go=Ur(function(e){return Kr(or(e,1,Ua,!0))}),qo=Ur(function(e){var t=Fo(e);return Ua(t)&&(t=void 0),Kr(or(e,1,Ua,!0),$i(t,2))}),Zo=Ur(function(e){var t=Fo(e);return t="function"==typeof t?t:void 0,Kr(or(e,1,Ua,!0),void 0,t)});function Xo(e){if(!e||!e.length)return[];var t=0;return e=at(e,function(e){if(Ua(e))return t=an(e.length,t),!0}),St(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 Ua(e)?Qn(e,t):[]}),Ko=Ur(function(e){return ni(at(e,Ua))}),Jo=Ur(function(e){var t=Fo(e);return Ua(t)&&(t=void 0),ni(at(e,Ua),$i(t,2))}),Qo=Ur(function(e){var t=Fo(e);return t="function"==typeof t?t:void 0,ni(at(e,Ua),void 0,t)}),ea=Ur(Xo),ta=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 na(e){var t=Dn(e);return t.__chain__=!0,t}function ra(e,t){return t(e)}var ia=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:ra,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)}),oa=Ei(function(e,t,n){Oe.call(e,n)?++e[n]:Zn(e,n,1)}),aa=Si(xo),la=Si(Po);function ua(e,t){return(Pa(e)?rt:er)(e,$i(t,3))}function ca(e,t){return(Pa(e)?it:tr)(e,$i(t,3))}var sa=Ei(function(e,t,n){Oe.call(e,n)?e[n].push(t):Zn(e,n,[t])}),da=Ur(function(e,t,n){var r=-1,i="function"==typeof t,o=ka(e)?Z(e.length):[];return er(e,function(e){o[++r]=i?tt(t,e,n):Er(e,t,n)}),o}),fa=Ei(function(e,t,n){Zn(e,n,t)});function va(e,t){return(Pa(e)?ct:Nr)(e,$i(t,3))}var ma=Ei(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),pa=Ur(function(e,t){if(null==e)return[];var n=t.length;return n>1&&ao(e,t[0],t[1])?t=[]:n>2&&ao(t[0],t[1],t[2])&&(t=[t[0]]),Lr(e,or(t,1),[])}),ga=Yt||function(){return We.Date.now()};function ha(e,t,n){return t=n?void 0:t,ji(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function Ea(e,t){var r;if("function"!=typeof t)throw new he(n);return e=il(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=void 0),r}}var ya=Ur(function(e,t,n){var r=1;if(n.length){var i=Bt(n,Xi(ya));r|=32}return ji(e,r,t,n,i)}),_a=Ur(function(e,t,n){var r=3;if(n.length){var i=Bt(n,Xi(_a));r|=32}return ji(t,r,e,n,i)});function ba(e,t,r){var i,o,a,l,u,c,s=0,d=!1,f=!1,v=!0;if("function"!=typeof e)throw new he(n);function m(t){var n=i,r=o;return i=o=void 0,s=t,l=e.apply(r,n)}function p(e){return s=e,u=yo(h,t),d?m(e):l}function g(e){var n=e-c;return void 0===c||n>=t||n<0||f&&e-s>=a}function h(){var e=ga();if(g(e))return E(e);u=yo(h,function(e){var n=t-(e-c);return f?ln(n,a-(e-s)):n}(e))}function E(e){return u=void 0,v&&i?m(e):(i=o=void 0,l)}function y(){var e=ga(),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),m(c)}return void 0===u&&(u=yo(h,t)),l}return t=al(t)||0,Ha(r)&&(d=!!r.leading,a=(f="maxWait"in r)?an(al(r.maxWait)||0,t):a,v="trailing"in r?!!r.trailing:v),y.cancel=function(){void 0!==u&&ci(u),s=0,i=c=o=u=void 0},y.flush=function(){return void 0===u?l:E(ga())},y}var Oa=Ur(function(e,t){return Jn(e,1,t)}),Ca=Ur(function(e,t,n){return Jn(e,al(t)||0,n)});function wa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new he(n);var r=function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return r.cache=new(wa.Cache||Mn),r}function Sa(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)}}wa.Cache=Mn;var Na=li(function(e,t){var n=(t=1==t.length&&Pa(t[0])?ct(t[0],It($i())):ct(or(t,1),It($i()))).length;return Ur(function(r){for(var i=-1,o=ln(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return tt(e,this,r)})}),Ia=Ur(function(e,t){return ji(e,32,void 0,t,Bt(t,Xi(Ia)))}),Da=Ur(function(e,t){return ji(e,64,void 0,t,Bt(t,Xi(Da)))}),Ta=Wi(function(e,t){return ji(e,256,void 0,void 0,void 0,t)});function Aa(e,t){return e===t||e!=e&&t!=t}var La=xi(mr),Ra=xi(function(e,t){return e>=t}),xa=yr(function(){return arguments}())?yr:function(e){return Ga(e)&&Oe.call(e,"callee")&&!Ze.call(e,"callee")},Pa=Z.isArray,Ma=$e?It($e):function(e){return Ga(e)&&vr(e)==_};function ka(e){return null!=e&&Wa(e.length)&&!Va(e)}function Ua(e){return Ga(e)&&ka(e)}var ja=tn||au,Ba=Ye?It(Ye):function(e){return Ga(e)&&vr(e)==u};function Fa(e){if(!Ga(e))return!1;var t=vr(e);return t==c||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Xa(e)}function Va(e){if(!Ha(e))return!1;var t=vr(e);return t==s||t==d||"[object AsyncFunction]"==t||"[object Proxy]"==t}function za(e){return"number"==typeof e&&e==il(e)}function Wa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Ha(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ga(e){return null!=e&&"object"==typeof e}var qa=Ke?It(Ke):function(e){return Ga(e)&&to(e)==f};function Za(e){return"number"==typeof e||Ga(e)&&vr(e)==v}function Xa(e){if(!Ga(e)||vr(e)!=m)return!1;var t=He(e);if(null===t)return!0;var n=Oe.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&be.call(n)==Ne}var $a=Je?It(Je):function(e){return Ga(e)&&vr(e)==p},Ya=Qe?It(Qe):function(e){return Ga(e)&&to(e)==g};function Ka(e){return"string"==typeof e||!Pa(e)&&Ga(e)&&vr(e)==h}function Ja(e){return"symbol"==typeof e||Ga(e)&&vr(e)==E}var Qa=et?It(et):function(e){return Ga(e)&&Wa(e.length)&&!!ke[vr(e)]},el=xi(Sr),tl=xi(function(e,t){return e<=t});function nl(e){if(!e)return[];if(ka(e))return Ka(e)?Wt(e):gi(e);if(Ot&&e[Ot])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ot]());var t=to(e);return(t==f?Ut:t==g?Ft:Al)(e)}function rl(e){return e?(e=al(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function il(e){var t=rl(e),n=t%1;return t==t?n?t-n:t:0}function ol(e){return e?$n(il(e),0,4294967295):0}function al(e){if("number"==typeof e)return e;if(Ja(e))return NaN;if(Ha(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ha(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 ll(e){return hi(e,Ol(e))}function ul(e){return null==e?"":Yr(e)}var cl=yi(function(e,t){if(so(t)||ka(t))hi(t,bl(t),e);else for(var n in t)Oe.call(t,n)&&Wn(e,n,t[n])}),sl=yi(function(e,t){hi(t,Ol(t),e)}),dl=yi(function(e,t,n,r){hi(t,Ol(t),e,r)}),fl=yi(function(e,t,n,r){hi(t,bl(t),e,r)}),vl=Wi(Xn),ml=Ur(function(e,t){e=me(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&ao(t[0],t[1],i)&&(r=1);++n<r;)for(var o=t[n],a=Ol(o),l=-1,u=a.length;++l<u;){var c=a[l],s=e[c];(void 0===s||Aa(s,ye[c])&&!Oe.call(e,c))&&(e[c]=o[c])}return e}),pl=Ur(function(e){return e.push(void 0,Fi),tt(wl,void 0,e)});function gl(e,t,n){var r=null==e?void 0:dr(e,t);return void 0===r?n:r}function hl(e,t){return null!=e&&no(e,t,gr)}var El=Di(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Se.call(t)),e[t]=n},Hl(Zl)),yl=Di(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Se.call(t)),Oe.call(e,t)?e[t].push(n):e[t]=[n]},$i),_l=Ur(Er);function bl(e){return ka(e)?jn(e):wr(e)}function Ol(e){return ka(e)?jn(e,!0):function(e){if(!Ha(e))return function(e){var t=[];if(null!=e)for(var n in me(e))t.push(n);return t}(e);var t=so(e),n=[];for(var r in e)("constructor"!=r||!t&&Oe.call(e,r))&&n.push(r);return n}(e)}var Cl=yi(function(e,t,n){Tr(e,t,n)}),wl=yi(function(e,t,n,r){Tr(e,t,n,r)}),Sl=Wi(function(e,t){var n={};if(null==e)return n;var r=!1;t=ct(t,function(t){return t=ai(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}),Nl=Wi(function(e,t){return null==e?{}:function(e,t){return Rr(e,t,function(t,n){return hl(e,n)})}(e,t)});function Il(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 Dl=Ui(bl),Tl=Ui(Ol);function Al(e){return null==e?[]:Dt(e,bl(e))}var Ll=Ci(function(e,t,n){return t=t.toLowerCase(),e+(n?Rl(t):t)});function Rl(e){return Fl(ul(e).toLowerCase())}function xl(e){return(e=ul(e))&&e.replace(le,xt).replace(Te,"")}var Pl=Ci(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Ml=Ci(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),kl=Oi("toLowerCase"),Ul=Ci(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),jl=Ci(function(e,t,n){return e+(n?" ":"")+Fl(t)}),Bl=Ci(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Fl=Oi("toUpperCase");function Vl(e,t,n){return e=ul(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 zl=Ur(function(e,t){try{return tt(e,void 0,t)}catch(e){return Fa(e)?e:new de(e)}}),Wl=Wi(function(e,t){return rt(t,function(t){t=Io(t),Zn(e,t,ya(e[t],e))}),e});function Hl(e){return function(){return e}}var Gl=Ni(),ql=Ni(!0);function Zl(e){return e}function Xl(e){return Cr("function"==typeof e?e:Yn(e,1))}var $l=Ur(function(e,t){return function(n){return Er(n,e,t)}}),Yl=Ur(function(e,t){return function(n){return Er(e,n,t)}});function Kl(e,t,n){var r=bl(t),i=sr(t,r);null!=n||Ha(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=sr(t,bl(t)));var o=!(Ha(n)&&"chain"in n&&!n.chain),a=Va(e);return rt(i,function(n){var r=t[n];e[n]=r,a&&(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 Jl(){}var Ql=Ai(ct),eu=Ai(ot),tu=Ai(vt);function nu(e){return lo(e)?bt(Io(e)):function(e){return function(t){return dr(t,e)}}(e)}var ru=Ri(),iu=Ri(!0);function ou(){return[]}function au(){return!1}var lu,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),vu=Mi("round"),mu=Ti(function(e,t){return e-t},0);return Dn.after=function(e,t){if("function"!=typeof t)throw new he(n);return e=il(e),function(){if(--e<1)return t.apply(this,arguments)}},Dn.ary=ha,Dn.assign=cl,Dn.assignIn=sl,Dn.assignInWith=dl,Dn.assignWith=fl,Dn.at=vl,Dn.before=Ea,Dn.bind=ya,Dn.bindAll=Wl,Dn.bindKey=_a,Dn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Pa(e)?e:[e]},Dn.chain=na,Dn.chunk=function(e,t,n){t=(n?ao(e,t,n):void 0===t)?1:an(il(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var i=0,o=0,a=Z(Jt(r/t));i<r;)a[o++]=Hr(e,i,i+=t);return a},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(Pa(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=bl(e);return function(n){return Kn(n,e,t)}}(Yn(e,1))},Dn.constant=Hl,Dn.countBy=oa,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=ji(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=ji(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=ba,Dn.defaults=ml,Dn.defaultsDeep=pl,Dn.defer=Oa,Dn.delay=Ca,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:il(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:il(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&&ao(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=il(n))<0&&(n=-n>i?0:i+n),(r=void 0===r||r>i?i:il(r))<0&&(r+=i),r=n>r?0:ol(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Dn.filter=function(e,t){return(Pa(e)?at:ir)(e,$i(t,3))},Dn.flatMap=function(e,t){return or(va(e,t),1)},Dn.flatMapDeep=function(e,t){return or(va(e,t),1/0)},Dn.flatMapDepth=function(e,t,n){return n=void 0===n?1:il(n),or(va(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:il(t)):[]},Dn.flip=function(e){return ji(e,512)},Dn.flow=Gl,Dn.flowRight=ql,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,bl(e))},Dn.functionsIn=function(e){return null==e?[]:sr(e,Ol(e))},Dn.groupBy=sa,Dn.initial=function(e){return null!=e&&e.length?Hr(e,0,-1):[]},Dn.intersection=Uo,Dn.intersectionBy=jo,Dn.intersectionWith=Bo,Dn.invert=El,Dn.invertBy=yl,Dn.invokeMap=da,Dn.iteratee=Xl,Dn.keyBy=fa,Dn.keys=bl,Dn.keysIn=Ol,Dn.map=va,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=wa,Dn.merge=Cl,Dn.mergeWith=wl,Dn.method=$l,Dn.methodOf=Yl,Dn.mixin=Kl,Dn.negate=Sa,Dn.nthArg=function(e){return e=il(e),Ur(function(t){return Ar(t,e)})},Dn.omit=Sl,Dn.omitBy=function(e,t){return Il(e,Sa($i(t)))},Dn.once=function(e){return Ea(2,e)},Dn.orderBy=function(e,t,n,r){return null==e?[]:(Pa(t)||(t=null==t?[]:[t]),Pa(n=r?void 0:n)||(n=null==n?[]:[n]),Lr(e,t,n))},Dn.over=Ql,Dn.overArgs=Na,Dn.overEvery=eu,Dn.overSome=tu,Dn.partial=Ia,Dn.partialRight=Da,Dn.partition=ma,Dn.pick=Nl,Dn.pickBy=Il,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=Ta,Dn.reject=function(e,t){return(Pa(e)?at:ir)(e,Sa($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 a=e[r];t(a,r,e)&&(n.push(a),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:il(t))},Dn.reverse=Ho,Dn.sampleSize=function(e,t,n){return t=(n?ao(e,t,n):void 0===t)?1:il(t),(Pa(e)?Fn:Br)(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(Pa(e)?Vn:Wr)(e)},Dn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&ao(e,t,n)?(t=0,n=r):(t=null==t?0:il(t),n=void 0===n?r:il(n)),Hr(e,t,n)):[]},Dn.sortBy=pa,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&&ao(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=ul(e))&&("string"==typeof t||null!=t&&!$a(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:an(il(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:il(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:il(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 Ha(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),ba(e,t,{leading:i,maxWait:t,trailing:o})},Dn.thru=ra,Dn.toArray=nl,Dn.toPairs=Dl,Dn.toPairsIn=Tl,Dn.toPath=function(e){return Pa(e)?ct(e,Io):Ja(e)?[e]:gi(No(ul(e)))},Dn.toPlainObject=ll,Dn.transform=function(e,t,n){var r=Pa(e),i=r||ja(e)||Qa(e);if(t=$i(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Ha(e)&&Va(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 ha(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=Al,Dn.valuesIn=function(e){return null==e?[]:Dt(e,Ol(e))},Dn.without=Yo,Dn.words=Vl,Dn.wrap=function(e,t){return Ia(oi(t),e)},Dn.xor=Ko,Dn.xorBy=Jo,Dn.xorWith=Qo,Dn.zip=ea,Dn.zipObject=function(e,t){return ri(e||[],t||[],Wn)},Dn.zipObjectDeep=function(e,t){return ri(e||[],t||[],Fr)},Dn.zipWith=ta,Dn.entries=Dl,Dn.entriesIn=Tl,Dn.extend=sl,Dn.extendWith=dl,Kl(Dn,Dn),Dn.add=uu,Dn.attempt=zl,Dn.camelCase=Ll,Dn.capitalize=Rl,Dn.ceil=cu,Dn.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=al(n))==n?n:0),void 0!==t&&(t=(t=al(t))==t?t:0),$n(al(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,bl(t))},Dn.deburr=xl,Dn.defaultTo=function(e,t){return null==e||e!=e?t:e},Dn.divide=su,Dn.endsWith=function(e,t,n){e=ul(e),t=Yr(t);var r=e.length,i=n=void 0===n?r:$n(il(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Dn.eq=Aa,Dn.escape=function(e){return(e=ul(e))&&k.test(e)?e.replace(P,Pt):e},Dn.escapeRegExp=function(e){return(e=ul(e))&&G.test(e)?e.replace(H,"\\$&"):e},Dn.every=function(e,t,n){var r=Pa(e)?ot:nr;return n&&ao(e,t,n)&&(t=void 0),r(e,$i(t,3))},Dn.find=aa,Dn.findIndex=xo,Dn.findKey=function(e,t){return pt(e,$i(t,3),ur)},Dn.findLast=la,Dn.findLastIndex=Po,Dn.findLastKey=function(e,t){return pt(e,$i(t,3),cr)},Dn.floor=du,Dn.forEach=ua,Dn.forEachRight=ca,Dn.forIn=function(e,t){return null==e?e:ar(e,$i(t,3),Ol)},Dn.forInRight=function(e,t){return null==e?e:lr(e,$i(t,3),Ol)},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=gl,Dn.gt=La,Dn.gte=Ra,Dn.has=function(e,t){return null!=e&&no(e,t,pr)},Dn.hasIn=hl,Dn.head=ko,Dn.identity=Zl,Dn.includes=function(e,t,n,r){e=ka(e)?e:Al(e),n=n&&!r?il(n):0;var i=e.length;return n<0&&(n=an(i+n,0)),Ka(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:il(n);return i<0&&(i=an(r+i,0)),ht(e,t,i)},Dn.inRange=function(e,t,n){return t=rl(t),void 0===n?(n=t,t=0):n=rl(n),function(e,t,n){return e>=ln(t,n)&&e<an(t,n)}(e=al(e),t,n)},Dn.invoke=_l,Dn.isArguments=xa,Dn.isArray=Pa,Dn.isArrayBuffer=Ma,Dn.isArrayLike=ka,Dn.isArrayLikeObject=Ua,Dn.isBoolean=function(e){return!0===e||!1===e||Ga(e)&&vr(e)==l},Dn.isBuffer=ja,Dn.isDate=Ba,Dn.isElement=function(e){return Ga(e)&&1===e.nodeType&&!Xa(e)},Dn.isEmpty=function(e){if(null==e)return!0;if(ka(e)&&(Pa(e)||"string"==typeof e||"function"==typeof e.splice||ja(e)||Qa(e)||xa(e)))return!e.length;var t=to(e);if(t==f||t==g)return!e.size;if(so(e))return!wr(e).length;for(var n in e)if(Oe.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=Fa,Dn.isFinite=function(e){return"number"==typeof e&&nn(e)},Dn.isFunction=Va,Dn.isInteger=za,Dn.isLength=Wa,Dn.isMap=qa,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 Za(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 Or(e)},Dn.isNil=function(e){return null==e},Dn.isNull=function(e){return null===e},Dn.isNumber=Za,Dn.isObject=Ha,Dn.isObjectLike=Ga,Dn.isPlainObject=Xa,Dn.isRegExp=$a,Dn.isSafeInteger=function(e){return za(e)&&e>=-9007199254740991&&e<=9007199254740991},Dn.isSet=Ya,Dn.isString=Ka,Dn.isSymbol=Ja,Dn.isTypedArray=Qa,Dn.isUndefined=function(e){return void 0===e},Dn.isWeakMap=function(e){return Ga(e)&&to(e)==y},Dn.isWeakSet=function(e){return Ga(e)&&"[object WeakSet]"==vr(e)},Dn.join=function(e,t){return null==e?"":rn.call(e,t)},Dn.kebabCase=Pl,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=il(n))<0?an(r+i,0):ln(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=Ml,Dn.lowerFirst=kl,Dn.lt=el,Dn.lte=tl,Dn.max=function(e){return e&&e.length?rr(e,Zl,mr):void 0},Dn.maxBy=function(e,t){return e&&e.length?rr(e,$i(t,2),mr):void 0},Dn.mean=function(e){return _t(e,Zl)},Dn.meanBy=function(e,t){return _t(e,$i(t,2))},Dn.min=function(e){return e&&e.length?rr(e,Zl,Sr):void 0},Dn.minBy=function(e,t){return e&&e.length?rr(e,$i(t,2),Sr):void 0},Dn.stubArray=ou,Dn.stubFalse=au,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,il(t)):void 0},Dn.noConflict=function(){return We._===this&&(We._=Ie),this},Dn.noop=Jl,Dn.now=ga,Dn.pad=function(e,t,n){e=ul(e);var r=(t=il(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=ul(e);var r=(t=il(t))?zt(e):0;return t&&r<t?e+Li(t-r,n):e},Dn.padStart=function(e,t,n){e=ul(e);var r=(t=il(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(ul(e).replace(q,""),t||0)},Dn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&ao(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=rl(e),void 0===t?(t=e,e=0):t=rl(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=sn();return ln(e+i*(t-e+Be("1e-"+((i+"").length-1))),t)}return Mr(e,t)},Dn.reduce=function(e,t,n){var r=Pa(e)?dt:Ct,i=arguments.length<3;return r(e,$i(t,4),n,i,er)},Dn.reduceRight=function(e,t,n){var r=Pa(e)?ft:Ct,i=arguments.length<3;return r(e,$i(t,4),n,i,tr)},Dn.repeat=function(e,t,n){return t=(n?ao(e,t,n):void 0===t)?1:il(t),kr(ul(e),t)},Dn.replace=function(){var e=arguments,t=ul(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Dn.result=function(e,t,n){var r=-1,i=(t=ai(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=Va(o)?o.call(e):o}return e},Dn.round=vu,Dn.runInContext=e,Dn.sample=function(e){return(Pa(e)?Bn:jr)(e)},Dn.size=function(e){if(null==e)return 0;if(ka(e))return Ka(e)?zt(e):e.length;var t=to(e);return t==f||t==g?e.size:wr(e).length},Dn.snakeCase=Ul,Dn.some=function(e,t,n){var r=Pa(e)?vt:Gr;return n&&ao(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&&Aa(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(Aa(e[n],t))return n}return-1},Dn.startCase=jl,Dn.startsWith=function(e,t,n){return e=ul(e),n=null==n?0:$n(il(n),0,e.length),t=Yr(t),e.slice(n,n+t.length)==t},Dn.subtract=mu,Dn.sum=function(e){return e&&e.length?wt(e,Zl):0},Dn.sumBy=function(e,t){return e&&e.length?wt(e,$i(t,2)):0},Dn.template=function(e,t,n){var r=Dn.templateSettings;n&&ao(e,t,n)&&(t=void 0),e=ul(e),t=dl({},t,r,Bi);var i,o,a=dl({},t.imports,r.imports,Bi),l=bl(a),u=Dt(a,l),c=0,s=t.interpolate||ue,d="__p += '",f=pe((t.escape||ue).source+"|"+s.source+"|"+(s===B?ee:ue).source+"|"+(t.evaluate||ue).source+"|$","g"),v="//# sourceURL="+(Oe.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Me+"]")+"\n";e.replace(f,function(t,n,r,a,l,u){return r||(r=a),d+=e.slice(c,u).replace(ce,Mt),n&&(i=!0,d+="' +\n__e("+n+") +\n'"),l&&(o=!0,d+="';\n"+l+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+t.length,t}),d+="';\n";var m=Oe.call(t,"variable")&&t.variable;if(m){if(J.test(m))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("+(m||"obj")+") {\n"+(m?"":"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=zl(function(){return fe(l,v+"return "+d).apply(void 0,u)});if(p.source=d,Fa(p))throw p;return p},Dn.times=function(e,t){if((e=il(e))<1||e>9007199254740991)return[];var n=4294967295,r=ln(e,4294967295);e-=4294967295;for(var i=St(r,t=$i(t));++n<e;)t(n);return i},Dn.toFinite=rl,Dn.toInteger=il,Dn.toLength=ol,Dn.toLower=function(e){return ul(e).toLowerCase()},Dn.toNumber=al,Dn.toSafeInteger=function(e){return e?$n(il(e),-9007199254740991,9007199254740991):0===e?e:0},Dn.toString=ul,Dn.toUpper=function(e){return ul(e).toUpperCase()},Dn.trim=function(e,t,n){if((e=ul(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=ul(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=ul(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(Ha(t)){var i="separator"in t?t.separator:i;n="length"in t?il(t.length):n,r="omission"in t?Yr(t.omission):r}var o=(e=ul(e)).length;if(kt(e)){var a=Wt(e);o=a.length}if(n>=o)return e;var l=n-zt(r);if(l<1)return r;var u=a?ui(a,0,l).join(""):e.slice(0,l);if(void 0===i)return u+r;if(a&&(l+=u.length-l),$a(i)){if(e.slice(l).search(i)){var c,s=u;for(i.global||(i=pe(i.source,ul(te.exec(i))+"g")),i.lastIndex=0;c=i.exec(s);)var d=c.index;u=u.slice(0,void 0===d?l:d)}}else if(e.indexOf(Yr(i),l)!=l){var f=u.lastIndexOf(i);f>-1&&(u=u.slice(0,f))}return u+r},Dn.unescape=function(e){return(e=ul(e))&&M.test(e)?e.replace(x,Gt):e},Dn.uniqueId=function(e){var t=++Ce;return ul(e)+t},Dn.upperCase=Bl,Dn.upperFirst=Fl,Dn.each=ua,Dn.eachRight=ca,Dn.first=ko,Kl(Dn,(lu={},ur(Dn,function(e,t){Oe.call(Dn.prototype,t)||(lu[t]=e)}),lu),{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:an(il(n),0);var r=this.__filtered__&&!t?new Rn(this):this.clone();return r.__filtered__?r.__takeCount__=ln(n,r.__takeCount__):r.__views__.push({size:ln(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(Zl)},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(Sa($i(e)))},Rn.prototype.slice=function(e,t){e=il(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=il(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__,a=r?[1]:arguments,l=t instanceof Rn,u=a[0],c=l||Pa(t),s=function(e){var t=i.apply(Dn,st([e],a));return r&&d?t[0]:t};c&&n&&"function"==typeof u&&1!=u.length&&(l=c=!1);var d=this.__chain__,f=!!this.__actions__.length,v=o&&!d,m=l&&!f;if(!o&&c){t=m?t:new Rn(this);var p=e.apply(t,a);return p.__actions__.push({func:ra,args:[s],thisArg:void 0}),new Ln(p,d)}return v&&m?e.apply(this,a):(p=this.thru(s),v?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(Pa(i)?i:[],e)}return this[n](function(n){return t.apply(Pa(n)?n:[],e)})}}),ur(Rn.prototype,function(e,t){var n=Dn[t];if(n){var r=n.name+"";Oe.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=Pa(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],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=ln(t,e+a);break;case"takeRight":e=an(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,l=o.end,u=l-a,c=r?l:a-1,s=this.__iteratees__,d=s.length,f=0,v=ln(u,this.__takeCount__);if(!n||!r&&i==u&&v==u)return ti(e,this.__actions__);var m=[];e:for(;u--&&f<v;){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}}m[f++]=g}return m},Dn.prototype.at=ia,Dn.prototype.chain=function(){return na(this)},Dn.prototype.commit=function(){return new Ln(this.value(),this.__chain__)},Dn.prototype.next=function(){void 0===this.__values__&&(this.__values__=nl(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:ra,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,Ot&&(Dn.prototype[Ot]=function(){return this}),Dn}();Ge?((Ge.exports=qt)._=qt,He._=qt):We._=qt}).call(V)});var W=["digit-ui","works-ui","workbench-ui","health-ui","sanitation-ui","core-ui","mgramseva-web"],H=function(e){var o=e.data,a=i.useTranslation().t,c=l.useHistory(),s=n.useState({}),f=s[0],v=s[1],m=n.useState(null),p=m[0],g=m[1],h=n.useState(null),E=h[0],y=h[1],_=n.useState(null),b=_[0],O=_[1],C=n.useState(!1),w=C[0],S=C[1],N={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 I(e){for(var t in void 0===e&&(e={}),e){var n=e[t];if("item"===t&&""!==(null==n?void 0:n.leftIcon))return{isDynamic:n.leftIcon.split(":")[0],leftIconArray:n.leftIcon.split(":")[1]};if("object"==typeof e[t]&&!Array.isArray(e[t])){var r=I(e[t]);if(r)return r}}return null}return r.createElement("div",{className:"new-sidebar "+(f?"show":""),onMouseEnter:function(){S(!0)},onMouseLeave:function(){S(!1),v({}),g(null),y(null),O(null)}},function e(n,i,o,l){return void 0===i&&(i=null),void 0===o&&(o=!0),void 0===l&&(l=0),r.createElement("div",{className:"submenu-container level-"+l},Object.keys(n).map(function(s,m){var h=n[s],_="item"===Object.keys(h)[0],C=f[s]||!1,S=i?""+i:s,D=null==s?void 0:s.replace(/[ -]/g,"_"),T=a(Digit.Utils.locale.getTransformedLocale("ACTION_TEST_"+D)),A=a((null==T?void 0:T.length)>20?T.substring(0,20)+"...":T);if(!_&&h&&Object.keys(h).length>0){var L,R=I(h)||{},x=R.leftIconArray,P=N[x]||N.collections;"dynamic"===R.isDynamic&&(P=(j=null===(L=require("@egovernments/digit-ui-react-components"))||void 0===L?void 0:L[x])?r.createElement(j,null):P);var M=p===S,k=b===A;return r.createElement("div",{key:m,className:"sidebar-link level-"+l+" "+(M?"select-level":""),style:{display:"flex",flexDirection:"column",alignItems:"flex-start"}},r.createElement("div",{className:"actions "+(k&&1===l?"selected-action-level-1":M?"default-"+l+" active":"default-"+l),onClick:function(e){!function(e){v(function(t){var n;return d({},t,((n={})[e]=!t[e],n))})}(s),g(function(e){return e===S?null:S});var t=e.target.innerText;O(function(e){return e===t||C?null:t}),y(null)},style:{display:"flex",flexDirection:"row",width:"100%"}},o&&r.createElement("div",{className:"link-icon"},P),r.createElement("div",{"data-tip":"React-tooltip","data-for":"jk-side-"+s},r.createElement("span",null," ",A," "),(null==A?void 0:A.includes("..."))&&r.createElement(u,{textColor:"white",backgroundColor:"grey",place:"right",type:"info",effect:"solid",id:"jk-side-"+s},a(Digit.Utils.locale.getTransformedLocale("ACTION_TEST_"+s)))),r.createElement("div",{style:{position:"relative",marginLeft:"auto"},className:"arrow "+(k&&1===l?"selected-arrow":"")+" "},C?r.createElement(t.ArrowVectorDown,{height:"28px",width:"28px"}):r.createElement(t.ArrowForward,null))),w&&r.createElement("div",{style:{width:"100%"}},C&&e(h,S,!1,l+1)))}if(_){var U,j,B=I(h)||{},F=B.leftIconArray,V=N[F]||N.collections;return"dynamic"===B.isDynamic&&(V=(j=null===(U=require("@egovernments/digit-ui-react-components"))||void 0===U?void 0:U[F])?r.createElement(j,null):V),r.createElement("a",{key:m,className:"dropdown-link new-dropdown-link "+(E===h.item.path?"active":"")+" level-"+l,onClick:function(){var e,t=h.item.path;g(i),y(t),O(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)))){var i=window.location.origin,o=null!=W&&W.every(function(e){var n;return-1===(null===(n=t)||void 0===n?void 0:n.indexOf("/"+e))})?i+"/employee/"+t:i+t;window.location.href=o}else e.push(t)}(c,""+(null==h||null===(e=h.item)||void 0===e?void 0:e.navigationURL))}},r.createElement("div",{className:"actions level-"+l+" "+("Home"===A?"custom":""),"data-tip":"React-tooltip","data-for":"jk-side-"+s},o&&r.createElement("div",{className:"link-icon"},V),r.createElement("span",null," ",A," "),(null==A?void 0:A.includes("..."))&&r.createElement(u,{textColor:"white",backgroundColor:"grey",place:"right",type:"info",effect:"solid",id:"jk-side-"+s},a(Digit.Utils.locale.getTransformedLocale("ACTION_TEST_"+s)))))}}))}(o))},G=function(e,t){return void 0===e&&(e=""),void 0===t&&(t=""),e.toLowerCase().includes(t.toLowerCase())},q=function(){var e=n.useRef(null),o=Digit.Hooks.useAccessControl(),a=o.isLoading,l=o.data,u=n.useState(""),c=u[0],s=u[1],d=i.useTranslation().t,f=n.useState(!1),v=f[0],m=f[1];n.useEffect(function(){if(a)return r.createElement(t.Loader,null);e.current.style.cursor="pointer",p()},[a]);var p=function(){e.current.style.width="60px",e.current.style.overflow="hidden",m(!1)};function g(e,t){for(var n in t)t.hasOwnProperty(n)&&("object"!=typeof t[n]||Array.isArray(t[n])?e[n]?(Array.isArray(e[n])||(e[n]=[e[n]]),e[n].push(t[n])):e[n]=t[n]:(e[n]||(e[n]={}),g(e[n],t[n])))}var h={};return null==l||l.actions.filter(function(e){return"url"===e.url}).forEach(function(e){var t,n,r,i=(null==e||null===(t=e.path)||void 0===t||null===(n=t.split("."))||void 0===n?void 0:n[0])||"";if(""==c&&""!==e.path){var o=e.path.split("."),a={};o.reduce(function(t,n,r){if(r!==o.length-1)return t[n]={},t[n];t[n]={item:e}},a),g(h,a)}else if(G(d("ACTION_TEST_"+(null==i||null===(r=i.toUpperCase())||void 0===r?void 0:r.replace(/[ -]/g,"_"))),c)||G(d(Digit.Utils.locale.getTransformedLocale("ACTION_TEST_"+(null==e?void 0:e.displayName))),c)){var l=e.path.split("."),u={};l.reduce(function(t,n,r){if(r!==l.length-1)return t[n]={},t[n];t[n]={item:e}},u),g(h,u)}}),a?r.createElement(t.Loader,null):h?r.createElement("div",{className:"sidebar",ref:e,onMouseOver:function(){e.current.style.width="260px",m(!0)},onMouseLeave:p},r.createElement("div",{className:""},r.createElement("div",{className:"sidebar-link"},v?r.createElement("div",{className:"actions search-icon-wrapper"},r.createElement("input",{className:"employee-search-input nav-bar",type:"text",placeholder:d("ACTION_TEST_SEARCH"),name:"search",value:c,onChange:function(e){return s(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"})))),function(e){var t=Object.entries(e);t.sort(function(t,n){return(t[1].item&&t[1].item.orderNumber||Object.keys(e).length+1)-(n[1].item&&n[1].item.orderNumber||Object.keys(e).length+1)});var n=Object.fromEntries(t);return r.createElement(H,{data:e=n})}(h)):""},Z=function(e){var t=e.isSidebarOpen,n=e.toggleSidebar,i=e.handleLogout,o=e.mobileView,a=e.userDetails,l=e.modules;return e.CITIZEN?r.createElement(F,{isOpen:t,isMobile:!0,toggleSidebar:n,onLogout:i,linkData:e.linkData,islinkDataLoading:e.islinkDataLoading}):!o&&null!=a&&a.access_token?r.createElement(q,{mobileView:o,userDetails:a,modules:l}):r.createElement(F,{isOpen:t,isMobile:!0,toggleSidebar:n,onLogout:i,isEmployee:!0})},X=function(e){var i=e.t,o=e.stateInfo,a=e.userDetails,u=e.CITIZEN,c=e.cityDetails,s=e.mobileView,d=e.handleUserDropdownSelection,f=e.logoUrl,v=e.showSidebar,m=void 0===v||v,p=e.showLanguageChange,g=e.linkData,h=e.islinkDataLoading,E=n.useState(!1),y=E[0],_=E[1],b=l.useHistory(),O=n.useState(!1),C=O[0],w=O[1],S=function(){_(!1),w(!0)},N=function(){w(!1)},I=[{name:i("EDIT_PROFILE"),icon:r.createElement(t.EditPencilIcon,{className:"icon"}),func:function(){var e;b.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/user/profile")}},{name:i("CORE_COMMON_LOGOUT"),icon:r.createElement(t.LogoutIcon,{className:"icon"}),func:S}];return r.createElement(r.Fragment,null,r.createElement(D,{t:i,stateInfo:o,toggleSidebar:_,isSidebarOpen:y,handleLogout:S,userDetails:a,CITIZEN:u,cityDetails:c,mobileView:s,userOptions:I,handleUserDropdownSelection:d,logoUrl:f,showLanguageChange:p}),C&&r.createElement(P,{onSelect:function(){Digit.UserService.logout(),w(!1)},onCancel:N,onDismiss:N}),m&&r.createElement(Z,{t:i,CITIZEN:u,isSidebarOpen:y,toggleSidebar:_,handleLogout:S,mobileView:s,userDetails:a,linkData:g,islinkDataLoading:h}))},$=function(e){var o=e.question,a=e.answer,l=e.lastIndex,u=n.useState(!1),c=u[0],s=u[1],d=i.useTranslation().t;return r.createElement("div",{className:"faqs border-none",onClick:function(){return s(!c)}},r.createElement("div",{className:"faq-question",style:{justifyContent:"space-between",display:"flex"}},r.createElement("span",null,d(o)),r.createElement("span",{className:c?"faqicon rotate":"faqicon",style:{float:"right"}},r.createElement(t.ArrowForward,null))),r.createElement("div",{className:"faq-answer",style:c?{display:"block"}:{display:"none"}},r.createElement("span",null,d(a))),l?null:r.createElement("div",{className:"cs-box-border"}))},Y=function(e){var o,a,l,u=e.module,c=Digit.UserService.getUser(),s=((null==c||null===(o=c.info)||void 0===o?void 0:o.tenantId)||Digit.ULBService.getCurrentTenantId(),i.useTranslation().t),d=Digit.Hooks.useGetFAQsJSON(Digit.ULBService.getStateId()),f=d.data,v=null==f||null===(a=f.MdmsRes["common-masters"])||void 0===a||null===(l=a.faqs[0])||void 0===l?void 0:l[""+u].faqs;return d.isLoading?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"},v.map(function(e,t){return r.createElement($,{key:"faq_"+t,question:e.question,answer:e.answer,lastIndex:t===(null==v?void 0:v.length)-1})}))))},K=function(){var e,n,o,a,u,c,s,f,v,m,p,g,h,E,y,_,b,O,C,w,S,N,I,D,T=i.useTranslation().t,A=l.useHistory(),L=Digit.ULBService.getCitizenCurrentTenant(!0),R=Digit.Hooks.useStore.getInitData(),x=R.data,P=(void 0===x?{}:x).uiHomePage,M=R.isLoading,k=window.Digit.Utils.browser.isMobile(),U=function(){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)},j=Digit.Hooks.useEvents({tenantId:L,variant:"whats-new",config:{enabled:U()}}),B=j.data,F=j.isLoading;L||A.push("/"+(null===(D=window)||void 0===D?void 0:D.contextPath)+"/citizen/select-language");var V,z,W=null==P?void 0:P.appBannerDesktop,H=null==P?void 0:P.appBannerMobile,G=null==P?void 0:P.citizenServicesCard,q=null==P?void 0:P.informationAndUpdatesCard,Z=null==P?void 0:P.whatsAppBannerDesktop,X=null==P?void 0:P.whatsAppBannerMobile,$=null==P?void 0:P.whatsNewSection,Y=null==P?void 0:P.redirectURL;Y&&A.push("/"+(null===(V=window)||void 0===V?void 0:V.contextPath)+"/citizen/"+Y),null!==(e=window)&&void 0!==e&&null!==(n=e.location)&&void 0!==n&&null!==(o=n.href)&&void 0!==o&&null!==(a=o.includes)&&void 0!==a&&a.call(o,"sanitation-ui")&&A.push("/"+(null===(z=window)||void 0===z?void 0:z.contextPath)+"/citizen/all-services");var K=function(e){window.open(null==e?void 0:e.navigationUrl)},J={header:T(null==G?void 0:G.headerLabel),sideOption:{name:T(null==G||null===(u=G.sideOption)||void 0===u?void 0:u.name),onClick:function(){var e;return A.push(null==G||null===(e=G.sideOption)||void 0===e?void 0:e.navigationUrl)}},options:[{name:T(null==G||null===(c=G.props)||void 0===c||null===(s=c[0])||void 0===s?void 0:s.label),Icon:r.createElement(t.ComplaintIcon,null),onClick:function(){var e,t;return A.push(null==G||null===(e=G.props)||void 0===e||null===(t=e[0])||void 0===t?void 0:t.navigationUrl)}},{name:T(null==G||null===(f=G.props)||void 0===f||null===(v=f[1])||void 0===v?void 0:v.label),Icon:r.createElement(t.PTIcon,{className:"fill-path-primary-main"}),onClick:function(){var e,t;return A.push(null==G||null===(e=G.props)||void 0===e||null===(t=e[1])||void 0===t?void 0:t.navigationUrl)}},{name:T(null==G||null===(m=G.props)||void 0===m||null===(p=m[2])||void 0===p?void 0:p.label),Icon:r.createElement(t.CaseIcon,{className:"fill-path-primary-main"}),onClick:function(){var e,t;return A.push(null==G||null===(e=G.props)||void 0===e||null===(t=e[2])||void 0===t?void 0:t.navigationUrl)}},{name:T(null==G||null===(g=G.props)||void 0===g||null===(h=g[3])||void 0===h?void 0:h.label),Icon:r.createElement(t.OBPSIcon,null),onClick:function(){var e,t;return A.push(null==G||null===(e=G.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%"}},Q={header:T(null==q?void 0:q.headerLabel),sideOption:{name:T(null==q||null===(E=q.sideOption)||void 0===E?void 0:E.name),onClick:function(){var e;return A.push(null==q||null===(e=q.sideOption)||void 0===e?void 0:e.navigationUrl)}},options:[{name:T(null==q||null===(y=q.props)||void 0===y||null===(_=y[0])||void 0===_?void 0:_.label),Icon:r.createElement(t.HomeIcon,null),onClick:function(){var e,t;return A.push(null==q||null===(e=q.props)||void 0===e||null===(t=e[0])||void 0===t?void 0:t.navigationUrl)}},{name:T(null==q||null===(b=q.props)||void 0===b||null===(O=b[1])||void 0===O?void 0:O.label),Icon:r.createElement(t.Calender,null),onClick:function(){var e,t;return A.push(null==q||null===(e=q.props)||void 0===e||null===(t=e[1])||void 0===t?void 0:t.navigationUrl)}},{name:T(null==q||null===(C=q.props)||void 0===C||null===(w=C[2])||void 0===w?void 0:w.label),Icon:r.createElement(t.DocumentIcon,null),onClick:function(){var e,t;return A.push(null==q||null===(e=q.props)||void 0===e||null===(t=e[2])||void 0===t?void 0:t.navigationUrl)}},{name:T(null==q||null===(S=q.props)||void 0===S||null===(N=S[3])||void 0===N?void 0:N.label),Icon:r.createElement(t.DocumentIcon,null),onClick:function(){var e,t;return A.push(null==q||null===(e=q.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 M?r.createElement(t.Loader,null):r.createElement("div",{className:"HomePageContainer"},r.createElement("div",{className:"HomePageWrapper"},r.createElement("div",{className:"BannerWithSearch"},r.createElement("img",k?{src:null==H?void 0:H.bannerUrl}:{src:null==W?void 0:W.bannerUrl}),r.createElement("div",{className:"ServicesSection"},r.createElement(t.CardBasedOptions,d({style:{marginTop:"-30px"}},J)),r.createElement(t.CardBasedOptions,d({style:k?{}:{marginTop:"-30px"}},Q)))),(X||Z)&&r.createElement("div",{className:"WhatsAppBanner"},r.createElement("img",k?{src:null==X?void 0:X.bannerUrl,onClick:function(){return K(X)}}:{src:null==Z?void 0:Z.bannerUrl,onClick:function(){return K(Z)}})),U()?F?r.createElement(t.Loader,null):r.createElement("div",{className:"WhatsNewSection"},r.createElement("div",{className:"headSection"},r.createElement("h2",null,T(null==$?void 0:$.headerLabel)),r.createElement("p",{onClick:function(){var e;return A.push(null==$||null===(e=$.sideOption)||void 0===e?void 0:e.navigationUrl)}},T(null==$||null===(I=$.sideOption)||void 0===I?void 0:I.name))),r.createElement(t.WhatsNewCard,null==B?void 0:B[0])):null))},J=function(){var e=i.useTranslation().t,o=l.useHistory(),a=Digit.Hooks.useStore.getInitData(),u=a.data,c=void 0===u?{}:u,s=c.languages,d=c.stateInfo,f=a.isLoading,v=Digit.StoreData.getCurrentLanguage(),m=n.useMemo(function(){return{header:e("CS_COMMON_CHOOSE_LANGUAGE"),submitBarLabel:e("CORE_COMMON_CONTINUE")}},[e]),p=n.useMemo(function(){return{options:s,optionsKey:"label",additionalWrapperClass:"reverse-radio-selection-wrapper",onSelect:function(e){return Digit.LocalizationService.changeLanguage(e.value,d.code)},selectedOption:null==s?void 0:s.filter(function(e){return e.value===v})[0]}},[v,s]);return f?r.createElement(t.Loader,null):r.createElement("div",{className:"selection-card-wrapper"},r.createElement(t.PageBasedInput,{texts:m,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,p)))},Q=function(){var e=i.useTranslation().t,o=l.useHistory(),a=l.useLocation(),u=Digit.Hooks.useTenants(),c=u.data,s=u.isLoading,f=n.useState(function(){return{code:Digit.ULBService.getCitizenCurrentTenant(!0)}}),v=f[0],m=f[1],p=n.useState(!1),g=p[0],h=p[1],E=n.useMemo(function(){return{header:e("CS_COMMON_CHOOSE_LOCATION"),submitBarLabel:e("CORE_COMMON_CONTINUE")}},[e]);function y(e){m(e),h(!1)}var _=n.useMemo(function(){return{options:c,optionsKey:"i18nKey",additionalWrapperClass:"reverse-radio-selection-wrapper",onSelect:y,selectedOption:v}},[c,e,v]);return s?r.createElement("loader",null):r.createElement("div",{className:"selection-card-wrapper"},r.createElement(t.BackButton,null),r.createElement(t.PageBasedInput,{texts:E,onSubmit:function(){if(v){var e,t;Digit.SessionStorage.set("CITIZEN.COMMON.HOME.CITY",v);var n=null===(e=a.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 h(!0)},className:"location-selection-container"},r.createElement(t.CardHeader,null,e("CS_COMMON_CHOOSE_LOCATION")),r.createElement(t.SearchOnRadioButtons,d({},_,{placeholder:e("COMMON_TABLE_SEARCH")})),g?r.createElement(t.CardLabelError,null,e("CS_COMMON_LOCATION_SELECTION_ERROR")):null))},ee=function(){function e(){}return e.prototype.then=function(t,n){var r=new e,i=this.s;if(i){var o=1&i?t:n;if(o){try{te(r,1,o(this.v))}catch(e){te(r,2,e)}return r}return this}return this.o=function(e){try{var i=e.v;1&e.s?te(r,1,t?t(i):i):n?te(r,1,n(i)):te(r,2,i)}catch(e){te(r,2,e)}},r},e}();function te(e,t,n){if(!e.s){if(n instanceof ee){if(!n.s)return void(n.o=te.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(te.bind(null,e,t),te.bind(null,e,2));e.s=t,e.v=n;var r=e.o;r&&r(e)}}function ne(e){return e instanceof ee&&1&e.s}var re="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function ie(e,t,n){if("function"==typeof e[re]){var r,i,o,a=e[re]();if(function e(l){try{for(;!((r=a.next()).done||n&&n());)if((l=t(r.value))&&l.then){if(!ne(l))return void l.then(e,o||(o=te.bind(null,i=new ee,2)));l=l.v}i?te(i,1,l):i=l}catch(e){te(i||(i=new ee),2,e)}}(),a.return){var l=function(e){try{r.done||a.return()}catch(e){}return e};if(i&&i.then)return i.then(l,function(e){throw l(e)});l()}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 a(l){try{for(;++o<e.length&&(!n||!n());)if((l=t(o))&&l.then){if(!ne(l))return void l.then(a,i||(i=te.bind(null,r=new ee,2)));l=l.v}r?te(r,1,l):r=l}catch(e){te(r||(r=new ee),2,e)}}(),r}(u,function(e){return t(u[e])},n)}function oe(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}function ae(e){var o=e.setProfilePic,a=e.closeDrawer,l=e.userType,u=e.removeProfilePic,c=e.showToast,s=n.useState(null)[1],d=n.useState(""),f=d[0],v=d[1],m=n.useState(null)[1],p=i.useTranslation().t;return n.useEffect(function(){!function(){try{m(null);var e=function(){if(f){var e=function(){if(f.size>=1e6)c("error",p("CORE_COMMON_PROFILE_MAXIMUM_UPLOAD_SIZE_EXCEEDED")),m(p("CORE_COMMON_PROFILE_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else{var e=oe(function(){return Promise.resolve(Digit.UploadServices.Filestorage(l+"-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,a=null==e||null===(r=e.data)||void 0===r||null===(i=r.files[0])||void 0===i?void 0:i.fileStoreId;s(a),o(a)}else c("error",p("CORE_COMMON_PROFILE_FILE_UPLOAD_ERROR")),m(p("CORE_COMMON_PROFILE_FILE_UPLOAD_ERROR"))})},function(){c("error",p("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:function(){return a()}}),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"===l?"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:function(e){return v(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:function(){u(),a()}},r.createElement(t.RemoveIcon,null)),r.createElement("label",{style:{cursor:"pointer"}},"Remove"))))}"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var le,ue=function(e){var o,a,u,c,s,f,v,m,p,g,h,E,y=e.stateCode,_=e.userType,b=e.cityDetails,O=(l.useHistory(),i.useTranslation().t),C=window.location.href,w=Digit.ULBService.getStateId(),S=Digit.ULBService.getCurrentTenantId(),N=(null===(o=Digit.UserService.getUser())||void 0===o?void 0:o.info)||{},I=n.useState(null),D=I[0],T=I[1],A=n.useState(null!=N&&N.name?N.name:""),L=A[0],R=A[1],x=n.useState(null!=N&&N.emailId?N.emailId:""),P=x[0],M=x[1],k=n.useState(null==D?void 0:D.gender),U=k[0],j=k[1],B=n.useState(null!=N&&N.permanentCity?N.permanentCity:b.name),F=B[0],V=B[1],z=n.useState(null!=N&&N.mobileNumber?N.mobileNumber:""),W=z[0],H=z[1],G=n.useState(null),q=G[0],Z=G[1],X=n.useState(""),$=X[0],Y=X[1],K=n.useState(!1),J=K[0],Q=K[1],ee=n.useState(!1),te=ee[0],ne=ee[1],re=n.useState(""),ie=re[0],le=re[1],ue=n.useState(""),ce=ue[0],se=ue[1],de=n.useState(""),fe=de[0],ve=de[1],me=n.useState(null),pe=me[0],ge=me[1],he=n.useState(!1),Ee=he[0],ye=he[1],_e=r.useState(window.innerWidth),be=_e[0],Oe=_e[1],Ce=r.useState({}),we=Ce[0],Se=Ce[1],Ne=window.Digit.Utils.browser.isMobile();r.useEffect(function(){return window.addEventListener("resize",function(){return Oe(window.innerWidth)}),function(){window.removeEventListener("resize",function(){return Oe(window.innerWidth)})}}),n.useEffect(function(){var e;ye(!0),function(){try{var e=null==N?void 0:N.uuid,t=function(){if(e)return Promise.resolve(Digit.UserService.userSearch(S,{uuid:[e]},{})).then(function(e){e&&e.user&&e.user.length&&T(e.user[0])})}();Promise.resolve(t&&t.then?t.then(function(){}):void 0)}catch(e){return Promise.reject(e)}}(),j({i18nKey:void 0,code:null==D?void 0:D.gender,value:null==D?void 0:D.gender});var t=null==D||null===(e=D.photo)||void 0===e?void 0:e.split(",");Y(null==t?void 0:t.at(0)),ye(!1)},[null!==D]);var Ie=function(e){return j(e)},De=function(){return Q(!1)},Te=function(e){R(e),!new RegExp(/^[a-zA-Z ]+$/i).test(e)||0===e.length||e.length>50?Se(d({},we,{userName:{type:"pattern",message:"CORE_COMMON_PROFILE_NAME_INVALID"}})):Se(d({},we,{userName:null}))},Ae=function(e){(null==N?void 0:N.userName)!==e?(M(e),!e.length||e.includes("@")&&e.includes(".")?Se(d({},we,{emailAddress:null})):Se(d({},we,{emailAddress:{type:"pattern",message:"CORE_COMMON_PROFILE_EMAIL_INVALID"}}))):Se(d({},we,{emailAddress:null}))},Le=function(e,t,n){void 0===n&&(n=5e3),ge({key:e,action:t}),setTimeout(function(){ge(null)},n)},Re=function(){try{var e=function(e){if(t)return e;ye(!1)},t=!1;ye(!0);var n=oe(function(){var e=d({},N,{name:L,gender:null==U?void 0:U.value,emailId:P,photo:q});if(!new RegExp(/^([a-zA-Z ])*$/).test(L)||""===L||L.length>50||L.length<1)throw JSON.stringify({type:"error",message:O("CORE_COMMON_PROFILE_NAME_INVALID")});if("employee"===_&&!new RegExp(/^[6-9]{1}[0-9]{9}$/).test(W))throw JSON.stringify({type:"error",message:O("CORE_COMMON_PROFILE_MOBILE_NUMBER_INVALID")});if(P.length&&(!P.includes("@")||!P.includes(".")))throw JSON.stringify({type:"error",message:O("CORE_COMMON_PROFILE_EMAIL_INVALID")});if(te&&(ie.length||ce.length||fe.length)){if(ce!==fe)throw JSON.stringify({type:"error",message:O("CORE_COMMON_PROFILE_PASSWORD_MISMATCH")});if(!(ie.length&&ce.length&&fe.length))throw JSON.stringify({type:"error",message:O("CORE_COMMON_PROFILE_PASSWORD_INVALID")});if(!new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(ce)&&!new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(fe))throw JSON.stringify({type:"error",message:O("CORE_COMMON_PROFILE_PASSWORD_INVALID")})}return Promise.resolve(Digit.UserService.updateUser(e,y)).then(function(e){var t=e.responseInfo;if(t&&"200"===t.status){var n=Digit.UserService.getUser();n&&Digit.UserService.setUser(d({},n,{info:d({},n.info,{name:L,mobileNumber:W,emailId:P,permanentCity:F})}))}return function(){if(ie.length&&ce.length&&fe.length){var e={existingPassword:ie,newPassword:ce,tenantId:S,type:"EMPLOYEE",username:null==N?void 0:N.userName,confirmPassword:fe};return function(){if(ce===fe)return oe(function(){return Promise.resolve(Digit.UserService.changePassword(e,S)).then(function(e){var t=e.responseInfo;if(null==t||!t.status||"200"!==t.status)throw"";Le("success",O("CORE_COMMON_PROFILE_UPDATE_SUCCESS_WITH_PASSWORD"),5e3),setTimeout(function(){return 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&&Le("success",O("CORE_COMMON_PROFILE_UPDATE_SUCCESS"),5e3)}()})},function(e){var t=JSON.parse(e);Le(t.type,O(t.message),5e3)});return Promise.resolve(n&&n.then?n.then(e):e(n))}catch(e){return Promise.reject(e)}},xe=[],Pe=Digit.Hooks.useGenderMDMS(w,"common-masters","GenderType").data;return Pe&&Pe.map(function(e){xe.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"===_?"8px":"24px"}},"citizen"===_?r.createElement(t.BackButton,null):r.createElement(t.BreadCrumb,{crumbs:[{path:"/"+(null===(a=window)||void 0===a?void 0:a.contextPath)+"/employee",content:O("ES_COMMON_HOME"),show:!0},{path:"/"+(null===(u=window)||void 0===u?void 0:u.contextPath)+"/employee/user/profile",content:O("ES_COMMON_PAGE_1"),show:C.includes("/user/profile")}]})),r.createElement("div",{style:{display:"flex",flex:1,flexDirection:be<768||"citizen"===_?"column":"row",margin:"citizen"===_?"8px":"16px",gap:"citizen"===_?"":"0 24px",boxShadow:"citizen"===_?"1px 1px 4px 0px rgba(0,0,0,0.2)":"",background:"citizen"===_?"white":"",borderRadius:"citizen"===_?"4px":"",maxWidth:"citizen"===_?"960px":""}},r.createElement("section",{style:{position:"relative",display:"flex",flex:"citizen"===_?1:2.5,justifyContent:"center",alignItems:"center",maxWidth:"100%",height:"376px",borderRadius:"4px",boxShadow:"citizen"===_?"":"1px 1px 4px 0px rgba(0,0,0,0.2)",border:("citizen"===_?"8px":"24px")+" solid #fff",background:"#EEEEEE",padding:"citizen"===_?"8px":"16px"}},r.createElement("div",{style:{position:"relative",height:"citizen"===_?"114px":"150px",width:"citizen"===_?"114px":"150px",margin:"16px"}},r.createElement("img",{style:{margin:"auto",borderRadius:"300px",justifyContent:"center",height:"100%",width:"100%"},src:$&&""!==$?$:"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:function(){return Q(!J)}},r.createElement(t.CameraIcon,null)))),r.createElement("section",{style:{display:"flex",flexDirection:"column",flex:"citizen"===_?1:7.5,width:"100%",borderRadius:"4px",height:"fit-content",boxShadow:"citizen"===_?"":"1px 1px 4px 0px rgba(0,0,0,0.2)",background:"white",padding:"citizen"===_?"8px":"24px",paddingBottom:"20px"}},"citizen"===_?r.createElement(r.Fragment,null,r.createElement(t.LabelFieldPair,null,r.createElement(t.CardLabel,{style:{}},""+O("CORE_COMMON_PROFILE_NAME"),"*"),r.createElement("div",{style:{width:"100%",maxWidth:"960px"}},r.createElement(t.TextInput,d({t:O,style:{width:"100%"},type:"text",isMandatory:!1,name:"name",value:L,onChange:function(e){return Te(e.target.value)}},{isRequired:!0,pattern:"^[a-zA-Z-.`' ]*$",type:"tel",title:O("CORE_COMMON_PROFILE_NAME_ERROR_MESSAGE")},{disable:!1})),(null==we?void 0:we.userName)&&r.createElement(t.CardLabelError,null," ",O(null==we||null===(c=we.userName)||void 0===c?void 0:c.message)," "))),r.createElement(t.LabelFieldPair,null,r.createElement(t.CardLabel,{style:{}},""+O("CORE_COMMON_PROFILE_GENDER")),r.createElement(t.Dropdown,{style:{width:"100%"},className:"form-field",selected:1===(null==U?void 0:U.length)?U[0]:U,disable:1===(null==U?void 0:U.length)||!1,option:xe,select:Ie,value:U,optionKey:"code",t:O,name:"gender"})),r.createElement(t.LabelFieldPair,null,r.createElement(t.CardLabel,{style:{}},""+O("CORE_COMMON_PROFILE_EMAIL")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,{t:O,style:{width:"100%"},type:"email",isMandatory:!1,optionKey:"i18nKey",name:"email",value:P,onChange:function(e){return Ae(e.target.value)},disable:!1}),(null==we?void 0:we.emailAddress)&&r.createElement(t.CardLabelError,null," ",O(null==we||null===(s=we.emailAddress)||void 0===s?void 0:s.message)," "))),r.createElement("button",{onClick:Re,style:{marginTop:"24px",backgroundColor:"#F47738",width:"100%",height:"40px",color:"white",maxWidth:Ne?"100%":"240px",borderBottom:"1px solid black"}},O("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"}},""+O("CORE_COMMON_PROFILE_NAME"),"*"),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,d({t:O,type:"text",isMandatory:!1,name:"name",value:L,onChange:function(e){return Te(e.target.value)},placeholder:"Enter Your Name"},{isRequired:!0,pattern:"^[a-zA-Z-.`' ]*$",type:"text",title:O("CORE_COMMON_PROFILE_NAME_ERROR_MESSAGE")},{disable:!1})),(null==we?void 0:we.userName)&&r.createElement(t.CardLabelError,{style:{margin:0,padding:0}}," ",O(null==we||null===(f=we.userName)||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"}},""+O("CORE_COMMON_PROFILE_GENDER")),r.createElement(t.Dropdown,{style:{width:"100%"},selected:1===(null==U?void 0:U.length)?U[0]:U,disable:1===(null==U?void 0:U.length)||!1,option:xe,select:Ie,value:U,optionKey:"code",t:O,name:"gender"})),r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+O("CORE_COMMON_PROFILE_CITY")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,d({t:O,type:"text",isMandatory:!1,name:"city",value:O(Digit.Utils.locale.getTransformedLocale("TENANT_TENANTS_"+S)),onChange:function(e){return V(e.target.value)},placeholder:"Enter Your City Name"},{isRequired:!0,type:"text",title:O("CORE_COMMON_PROFILE_CITY_ERROR_MESSAGE")},{disable:!0})),r.createElement(t.CardLabelError,null))),r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},O("CORE_COMMON_PROFILE_MOBILE_NUMBER")+"*"),r.createElement("div",{style:{width:"100%"}},r.createElement(t.MobileNumber,{value:W,style:{width:"100%"},name:"mobileNumber",placeholder:"Enter a valid Mobile No.",onChange:function(e){return function(e){H(e),"employee"!==_||new RegExp(/^[6-9]{1}[0-9]{9}$/).test(e)?Se(d({},we,{mobileNumber:null})):Se(d({},we,{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:O("CORE_COMMON_PROFILE_MOBILE_NUMBER_INVALID")}),(null==we?void 0:we.mobileNumber)&&r.createElement(t.CardLabelError,{style:{margin:0,padding:0}}," ",O(null==we||null===(v=we.mobileNumber)||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"}},""+O("CORE_COMMON_PROFILE_EMAIL")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,{t:O,type:"email",isMandatory:!1,placeholder:O("EMAIL_VALIDATION"),optionKey:"i18nKey",name:"email",value:P,onChange:function(e){return Ae(e.target.value)},disable:!1}),(null==we?void 0:we.emailAddress)&&r.createElement(t.CardLabelError,null," ",O(null==we||null===(m=we.emailAddress)||void 0===m?void 0:m.message)," "))),r.createElement(t.LabelFieldPair,null,r.createElement("div",null,r.createElement("a",{style:(p={color:"orange",cursor:"default",marginBottom:"5"},p.cursor="pointer",p),onClick:function(){return ne(!te)}},O("CORE_COMMON_CHANGE_PASSWORD")),te?r.createElement("div",{style:{marginTop:"10px"}},r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+O("CORE_COMMON_PROFILE_CURRENT_PASSWORD")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,{t:O,type:"password",isMandatory:!1,name:"name",pattern:"^([a-zA-Z0-9@#$%])+$",onChange:function(e){return le(t=e.target.value),void(new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(t)?Se(d({},we,{currentPassword:null})):Se(d({},we,{currentPassword:{type:"pattern",message:"CORE_COMMON_PROFILE_PASSWORD_INVALID"}})));var t},disable:!1}),(null==we?void 0:we.currentPassword)&&r.createElement(t.CardLabelError,null,O(null==we||null===(g=we.currentPassword)||void 0===g?void 0:g.message)))),r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+O("CORE_COMMON_PROFILE_NEW_PASSWORD")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,{t:O,type:"password",isMandatory:!1,name:"name",pattern:"^([a-zA-Z0-9@#$%])+$",onChange:function(e){return se(t=e.target.value),void(new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(t)?Se(d({},we,{newPassword:null})):Se(d({},we,{newPassword:{type:"pattern",message:"CORE_COMMON_PROFILE_PASSWORD_INVALID"}})));var t},disable:!1}),(null==we?void 0:we.newPassword)&&r.createElement(t.CardLabelError,null,O(null==we||null===(h=we.newPassword)||void 0===h?void 0:h.message)))),r.createElement(t.LabelFieldPair,{style:{display:"flex"}},r.createElement(t.CardLabel,{className:"profile-label-margin",style:{width:"300px"}},""+O("CORE_COMMON_PROFILE_CONFIRM_PASSWORD")),r.createElement("div",{style:{width:"100%"}},r.createElement(t.TextInput,{t:O,type:"password",isMandatory:!1,name:"name",pattern:"^([a-zA-Z0-9@#$%])+$",onChange:function(e){return ve(t=e.target.value),void(new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(t)?Se(d({},we,{confirmPassword:null})):Se(d({},we,{confirmPassword:{type:"pattern",message:"CORE_COMMON_PROFILE_PASSWORD_INVALID"}})));var t},disable:!1}),(null==we?void 0:we.confirmPassword)&&r.createElement(t.CardLabelError,null,O(null==we||null===(E=we.confirmPassword)||void 0===E?void 0:E.message))))):""))))),"employee"===_?r.createElement("div",{className:"action-bar-wrap"},r.createElement(t.SubmitBar,{t:O,label:O("CORE_COMMON_SAVE"),onSubmit:Re})):"",pe&&r.createElement(t.Toast,{error:"error"===pe.key,label:O("success"===pe.key?"CORE_COMMON_PROFILE_UPDATE_SUCCESS":pe.action),onClose:function(){return ge(null)},style:{maxWidth:"670px"}}),1==J?r.createElement(ae,{setProfilePic:function(e){try{var t=function(e){Y(null==e?void 0:e.thumbs[0]),De()};return Z(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(function(e){return e.url.split(",")[3]}),images:e.data.fileStoreIds.map(function(e){return Digit.Utils.getFileUrl(e.url)})}:null})}catch(e){return Promise.reject(e)}}([e],w)).then(t):t(null))}catch(e){return Promise.reject(e)}},closeDrawer:De,userType:_,removeProfilePic:function(){Z(null),Y(null)},showToast:Le}):"")},ce=function(e){var o,a,l,u=e.module,c=Digit.UserService.getUser(),s=((null==c||null===(o=c.info)||void 0===o?void 0:o.tenantId)||Digit.ULBService.getCurrentTenantId(),i.useTranslation().t),d=Digit.SessionStorage.get("initData").stateInfo,f=Digit.StoreData.getCurrentLanguage(),v=n.useState(f),m=v[0],p=v[1],g=n.useState(!1),h=g[0],E=g[1],y=n.useState(""),_=y[0],b=y[1],O=function(){return 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"}))},C=Digit.Hooks.useGetHowItWorksJSON(Digit.ULBService.getStateId()),w=C.data,S=null==w||null===(a=w.MdmsRes["common-masters"])||void 0===a||null===(l=a.howItWorks[0])||void 0===l?void 0:l[""+u];return C.isLoading?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,s(S.screenHeader?S.screenHeader:"HOW_IT_WORKS"))),r.createElement("div",{className:"language-selector",style:{margin:"10px"}},[{label:"ENGLISH",value:"en_IN"},{label:"हिंदी",value:"hi_IN"}].map(function(e,n){return r.createElement("div",{className:"language-button-container",key:n},r.createElement(t.CustomButton,{selected:e.value===m,text:e.label,onClick:function(){return function(e){p(e.value),Digit.LocalizationService.changeLanguage(e.value,d.code)}(e)}}))})),S.videosJson.map(function(e,t){return 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:function(){return t=e,b("hi_IN"===m?t.hi_IN:t.en_IN),void E(!0);var t}},r.createElement("div",{className:"vid-svg"},r.createElement(O,null))),r.createElement("div",{className:"how-it-works-header-description"},r.createElement("h2",null,s(e.headerLabel)),r.createElement("p",null,s(e.description)))))}),S.pdfHeader&&S.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,s(S.pdfHeader)),r.createElement("p",null,s(S.pdfDesc)))),r.createElement("div",{className:"download-icon"},r.createElement(t.DownloadImgIcon,null)))),h&&r.createElement("div",{className:"how-it-works-video-play"},r.createElement("div",{className:"close-button"},r.createElement(t.CloseSvg,{onClick:function(){E(!1)}})),r.createElement("video",{width:500,height:500,controls:!0,autoPlay:!0},r.createElement("source",{src:_,type:"video/mp4"})))))},se=[{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}}]}],de=function(e){var n=e.mobileNumber;return r.createElement(t.FormStep,{isDisabled:!(10===n.length&&e.canSubmit),onSelect:e.onSelect,config:e.config,t:e.t,componentInFront:"+91",onChange:e.onMobileChange,value:n})},fe=function(e){return r.createElement(t.FormStep,{config:e.config,onSelect:e.onSelect,t:e.t,isDisabled:e.isDisabled})},ve=function(e){var i,o,a,l=e.config,u=e.otp,c=e.onOtpChange,s=e.onResend,d=e.onSelect,f=e.t,v=e.error,m=e.userType,p=void 0===m?"citizen":m,g=e.canSubmit,h=n.useState(30),E=h[0],y=h[1];i=function(){y(E-1)},o=E>0?1e3:null,a=n.useRef(),n.useEffect(function(){a.current=i},[i]),n.useEffect(function(){if(null!==o){var e=setInterval(function(){a.current()},o);return function(){return clearInterval(e)}}},[o]);var _=function(){s(),y(2)};return"employee"===p?r.createElement(n.Fragment,null,r.createElement(t.OTPInput,{length:6,onChange:c,value:u}),E>0?r.createElement(t.CardText,null,f("CS_RESEND_ANOTHER_OTP")+" "+E+" "+f("CS_RESEND_SECONDS")):r.createElement("p",{className:"card-text-button resend-otp",onClick:_},f("CS_RESEND_OTP")),!v&&r.createElement(t.CardLabelError,null,f("CS_INVALID_OTP"))):r.createElement(t.FormStep,{onSelect:d,config:l,t:f,isDisabled:!(6===(null==u?void 0:u.length)&&g)},r.createElement(t.OTPInput,{length:6,onChange:c,value:u}),E>0?r.createElement(t.CardText,null,f("CS_RESEND_ANOTHER_OTP")+" "+E+" "+f("CS_RESEND_SECONDS")):r.createElement("p",{className:"card-text-button",onClick:_},f("CS_RESEND_OTP")),!v&&r.createElement(t.CardLabelError,null,f("CS_INVALID_OTP")))},me=["ResponseInfo","UserRequest"],pe=["ResponseInfo","UserRequest"],ge={type:"register"},he={type:"login"},Ee="/"+(null===(le=window)||void 0===le?void 0:le.contextPath)+"/citizen",ye=function(e,t){return(null==e?void 0:e.from)||(null==t?void 0:t.from)||Ee},_e=function(e){var o,a,u=e.stateCode,c=e.isUserRegistered,s=void 0===c||c,f=i.useTranslation().t,m=l.useLocation(),p=l.useRouteMatch().path,g=l.useHistory(),h=n.useState(null),E=h[0],y=h[1],_=n.useState(null),b=_[0],O=_[1],C=n.useState(!0),w=C[0],S=C[1],N=(n.useState(null),n.useState(s?{}:null==m||null===(o=m.state)||void 0===o?void 0:o.data)),I=N[0],D=N[1],T=n.useState(null),A=T[0],L=T[1],R=Digit.Hooks.useQueryParams(),x=n.useState(!1),P=x[0],M=x[1],k=n.useState(!0),U=k[0],j=k[1],B=n.useState(!0),F=B[0],V=B[1];n.useEffect(function(){var e;return b&&(A&&(clearTimeout(A),L(null)),e=setTimeout(function(){O("")},5e3),L(e)),function(){e&&clearTimeout(e)}},[b]),n.useEffect(function(){var e;if(E){var t,n,r,i,o,a;Digit.SessionStorage.set("citizen.userRequestObject",E),Digit.UserService.setUser(E),t=null==E?void 0:E.info,n=null==E?void 0:E.access_token,r=u,a=null===(i=JSON.parse(sessionStorage.getItem("Digit.initData")))||void 0===i||null===(o=i.value)||void 0===o?void 0:o.selectedLanguage,localStorage.setItem("Citizen.tenant-id",r),localStorage.setItem("tenant-id",r),localStorage.setItem("citizen.userRequestObject",JSON.stringify(t)),localStorage.setItem("locale",a),localStorage.setItem("Citizen.locale",a),localStorage.setItem("token",n),localStorage.setItem("Citizen.token",n),localStorage.setItem("user-info",JSON.stringify(t)),localStorage.setItem("Citizen.user-info",JSON.stringify(t));var l,c=(null===(e=m.state)||void 0===e?void 0:e.from)||Ee;Digit.ULBService.getCitizenCurrentTenant(!0)?g.replace(c):g.replace("/"+(null===(l=window)||void 0===l?void 0:l.contextPath)+"/citizen/select-location",{redirectBackTo:c})}},[E]);var z=n.useMemo(function(){return se.map(function(e){var t={};for(var n in e.texts)t[n]=f(e.texts[n]);return d({},e,{texts:t})},[se])}),W=function(){return Digit.UserService.getType()},H=function(e){return Promise.resolve(oe(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(l.Switch,null,r.createElement(t.AppContainer,null,r.createElement(t.BackButton,null),r.createElement(l.Route,{path:""+p,exact:!0},r.createElement(de,{onSelect:function(e){try{V(!1),D(d({},I,e));var t=d({},e,{tenantId:u,userType:W()});return Promise.resolve(s?Promise.resolve(H({otp:d({},t,he)})).then(function(e){var n,r,i,o;if(!e[1])return V(!0),void g.replace(p+"/otp",{from:ye(m.state,R),role:null===(r=m.state)||void 0===r?void 0:r.role});V(!0),m.state&&"FSM_DSO"===m.state.role||g.push("/"+(null===(i=window)||void 0===i?void 0:i.contextPath)+"/citizen/register/name",{from:ye(m.state,R),data:t}),null!==(n=m.state)&&void 0!==n&&n.role&&(V(!0),O("FSM_DSO"===(null===(o=m.state)||void 0===o?void 0:o.role)?f("ES_ERROR_DSO_LOGIN"):"User not registered."))}):Promise.resolve(H({otp:d({},t,ge)})).then(function(e){if(!e[1])return V(!0),void g.replace(p+"/otp",{from:ye(m.state,R)});V(!0)}))}catch(e){return Promise.reject(e)}},config:z[0],mobileNumber:I.mobileNumber||"",onMobileChange:function(e){D(d({},I,{mobileNumber:e.target.value}))},canSubmit:F,showRegisterLink:s&&!(null!==(a=m.state)&&void 0!==a&&a.role),t:f})),r.createElement(l.Route,{path:p+"/otp"},r.createElement(ve,{config:d({},z[1],{texts:d({},z[1].texts,{cardText:z[1].texts.cardText+" "+(I.mobileNumber||"")})}),onOtpChange:function(e){D(d({},I,{otp:e}))},onResend:function(){try{var e={mobileNumber:I.mobileNumber,tenantId:u,userType:W()},t=function(){if(!s)return Promise.resolve(H({otp:d({},e,ge)})).then(function(){});var t=function(){if(s)return Promise.resolve(H({otp:d({},e,he)})).then(function(){})}();return t&&t.then?t.then(function(){}):void 0}();return Promise.resolve(t&&t.then?t.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},onSelect:function(){try{return Promise.resolve(oe(function(){S(!0),j(!1);var e=I.mobileNumber,t=I.otp,n=I.name;return function(){if(s){var r={username:e,password:t,tenantId:u,userType:W()};return Promise.resolve(Digit.UserService.authenticate(r)).then(function(e){var t,n,r,i=e.UserRequest,o=v(e,me);if(null!==(t=m.state)&&void 0!==t&&t.role){var a=i.roles.find(function(e){return e.code===m.state.role});if(!a||!a.code)return O(f("ES_ERROR_USER_NOT_PERMITTED")),void setTimeout(function(){return g.replace(Ee)},5e3)}null!==(n=window)&&void 0!==n&&null!==(r=n.globalConfigs)&&void 0!==r&&r.getConfig("ENABLE_SINGLEINSTANCE")&&(i.tenantId=Digit.ULBService.getStateId()),y(d({info:i},o))})}var i=function(){if(!s)return Promise.resolve(Digit.UserService.registerUser({name:n,username:e,otpReference:t,tenantId:u},u)).then(function(e){var t,n,r=e.UserRequest,i=v(e,pe);null!==(t=window)&&void 0!==t&&null!==(n=t.globalConfigs)&&void 0!==n&&n.getConfig("ENABLE_SINGLEINSTANCE")&&(r.tenantId=Digit.ULBService.getStateId()),y(d({info:r},i))})}();if(i&&i.then)return i.then(function(){})}()},function(){j(!0),S(!1)}))}catch(e){return Promise.reject(e)}},otp:I.otp,error:w,canSubmit:U,t:f})),r.createElement(l.Route,{path:p+"/name"},r.createElement(fe,{config:z[2],onSelect:function(e){try{var t=d({},I,{tenantId:u,userType:W()},e);return D(d({},I,e)),M(!0),Promise.resolve(H({otp:d({},t,ge)})).then(function(e){e[0]?(M(!1),g.replace(p+"/otp",{from:ye(m.state,R)})):M(!1)})}catch(e){return Promise.reject(e)}},t:f,isDisabled:P})),b&&r.createElement(t.Toast,{error:!0,label:b,onClose:function(){return O(null)}}))))},be=function(e){return e instanceof HTMLElement},Oe=function(e){return null==e},Ce=function(e){return"object"==typeof e},we=function(e){return!Oe(e)&&!Array.isArray(e)&&Ce(e)&&!(e instanceof Date)},Se=function(e){return/^\w*$/.test(e)},Ne=function(e){return e.filter(Boolean)},Ie=function(e){return Ne(e.replace(/["|']/g,"").replace(/\[/g,".").replace(/\]/g,"").split("."))};function De(e,t,n){for(var r=-1,i=Se(t)?[t]:Ie(t),o=i.length,a=o-1;++r<o;){var l=i[r],u=n;if(r!==a){var c=e[l];u=we(c)||Array.isArray(c)?c:isNaN(+i[r+1])?{}:[]}e[l]=u,e=e[l]}return e}var Te=function(e,t){for(var n in void 0===t&&(t={}),e)Se(n)?t[n]=e[n]:De(t,n,e[n]);return t},Ae=function(e){return void 0===e},Le=function(e,t,n){void 0===e&&(e={});var r=Ne(t.split(/[,[\].]+?/)).reduce(function(e,t){return Oe(e)?e:e[t]},e);return Ae(r)||r===e?Ae(e[t])?n:e[t]:r},Re=function(e,t){be(e)&&e.removeEventListener&&(e.removeEventListener("input",t),e.removeEventListener("change",t),e.removeEventListener("blur",t))},xe={isValid:!1,value:null},Pe=function(e){return Array.isArray(e)?e.reduce(function(e,t){return t&&t.ref.checked?{isValid:!0,value:t.ref.value}:e},xe):xe},Me=function(e){return"radio"===e.type},ke=function(e){return"file"===e.type},Ue=function(e){return"checkbox"===e.type},je=function(e){return"select-multiple"===e.type},Be={value:!1,isValid:!1},Fe={value:!0,isValid:!0},Ve=function(e){if(Array.isArray(e)){if(e.length>1){var t=e.filter(function(e){return e&&e.ref.checked}).map(function(e){return e.ref.value});return{value:t,isValid:!!t.length}}var n=e[0].ref,r=n.value,i=n.attributes;return n.checked?i&&!Ae(i.value)?Ae(r)||""===r?Fe:{value:r,isValid:!0}:Fe:Be}return Be};function ze(e,t,n,r,i){var o=e.current[t];if(o){var a=o.ref,l=a.value,u=o.ref,c=o.valueAsNumber,s=o.valueAsDate,d=o.setValueAs;if(a.disabled&&r)return;return ke(u)?u.files:Me(u)?Pe(o.options).value:je(u)?[].concat(u.options).filter(function(e){return e.selected}).map(function(e){return e.value}):Ue(u)?Ve(o.options).value:i?l:c?""===l?NaN:+l:s?u.valueAsDate:d?d(l):l}if(n)return Le(n.current,t)}function We(e){return!e||e instanceof HTMLElement&&e.nodeType!==Node.DOCUMENT_NODE&&We(e.parentNode)}var He=function(e){return we(e)&&!Object.keys(e).length},Ge=function(e){return"boolean"==typeof e};function qe(e,t){var n,r=Se(t)?[t]:Ie(t),i=1==r.length?e:function(e,t){for(var n=t.slice(0,-1).length,r=0;r<n;)e=Ae(e)?r++:e[t[r++]];return e}(e,r);i&&delete i[r[r.length-1]];for(var o=0;o<r.slice(0,-1).length;o++){var a=-1,l=void 0,u=r.slice(0,-(o+1)),c=u.length-1;for(o>0&&(n=e);++a<u.length;){var s=u[a];l=l?l[s]:e[s],c===a&&(we(l)&&He(l)||Array.isArray(l)&&!l.filter(function(e){return we(e)&&!He(e)||Ge(e)}).length)&&(n?delete n[s]:delete e[s]),n=l}}return e}var Ze=function(e,t){return e&&e.ref===t},Xe=function(e){return Oe(e)||!Ce(e)};function $e(e,t){if(Xe(e)||Xe(t))return t;for(var n in t){var r=e[n],i=t[n];try{e[n]=we(r)&&we(i)||Array.isArray(r)&&Array.isArray(i)?$e(r,i):i}catch(e){}}return e}function Ye(e,t,r){if(Xe(e)||Xe(t)||e instanceof Date||t instanceof Date)return e===t;if(!n.isValidElement(e)){var i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length)return!1;for(var a=0,l=i;a<l.length;a++){var u=l[a],c=e[u];if(!r||"ref"!==u){var s=t[u];if((we(c)||Array.isArray(c))&&(we(s)||Array.isArray(s))?!Ye(c,s,r):c!==s)return!1}}}return!0}function Ke(e,t,n,r,i){for(var o=-1;++o<e.length;){for(var a in e[o]){var l;Array.isArray(e[o][a])?(!n[o]&&(n[o]={}),n[o][a]=[],Ke(e[o][a],Le(t[o]||{},a,[]),n[o][a],n[o],a)):Ye(Le(t[o]||{},a),e[o][a])?De(n[o]||{},a):n[o]=Object.assign(Object.assign({},n[o]),((l={})[a]=!0,l))}r&&!n.length&&delete r[i]}return n}var Je=function(e){return"string"==typeof e},Qe=function(e,t,n,r,i){var o={},a=function(t){(Ae(i)||(Je(i)?t.startsWith(i):Array.isArray(i)&&i.find(function(e){return t.startsWith(e)})))&&(o[t]=ze(e,t,void 0,r))};for(var l in e.current)a(l);return n?Te(o):$e(t,Te(o))},et=function(e){return e instanceof RegExp},tt=function(e){return we(e)&&!et(e)?e:{value:e,message:""}},nt=function(e){return"function"==typeof e},rt=function(e){return Je(e)||n.isValidElement(e)};function it(e,t,n){if(void 0===n&&(n="validate"),rt(e)||Ge(e)&&!e)return{type:n,message:rt(e)?e:"",ref:t}}var ot=function(e,t,n,r,i){var o;return t?Object.assign(Object.assign({},n[e]),{types:Object.assign(Object.assign({},n[e]&&n[e].types?n[e].types:{}),(o={},o[r]=i||!0,o))}):{}},at=function(e,t,n,r){var i=n.ref,o=n.ref.value,a=n.options,l=n.required,u=n.maxLength,c=n.minLength,s=n.min,d=n.max,f=n.pattern,v=n.validate;try{var m=!1,p=i.name,g={},h=Me(i),E=Ue(i),y=h||E,_=""===o,b=ot.bind(null,p,t,g),O=function(e,t,n,r,o){void 0===r&&(r="maxLength"),void 0===o&&(o="minLength");var a=e?t:n;g[p]=Object.assign({type:e?r:o,message:a,ref:i},b(e?r:o,a))};if(l&&(!h&&!E&&(_||Oe(o))||Ge(o)&&!o||E&&!Ve(a).isValid||h&&!Pe(a).isValid)){var C=rt(l)?{value:!!l,message:l}:tt(l),w=C.message;if(C.value&&(g[p]=Object.assign({type:"required",message:w,ref:y?((e.current[p].options||[])[0]||{}).ref:i},b("required",w)),!t))return Promise.resolve(g)}if(!(Oe(s)&&Oe(d)||""===o)){var S,N,I=tt(d),D=tt(s);if(isNaN(o)){var T=i.valueAsDate||new Date(o);Je(I.value)&&(S=T>new Date(I.value)),Je(D.value)&&(N=T<new Date(D.value))}else{var A=i.valueAsNumber||parseFloat(o);Oe(I.value)||(S=A>I.value),Oe(D.value)||(N=A<D.value)}if((S||N)&&(O(!!S,I.message,D.message,"max","min"),!t))return Promise.resolve(g)}if(Je(o)&&!_&&(u||c)){var L=tt(u),R=tt(c),x=!Oe(L.value)&&o.length>L.value,P=!Oe(R.value)&&o.length<R.value;if((x||P)&&(O(x,L.message,R.message),!t))return Promise.resolve(g)}if(Je(o)&&f&&!_){var M=tt(f),k=M.value,U=M.message;if(et(k)&&!k.test(o)&&(g[p]=Object.assign({type:"pattern",message:U,ref:i},b("pattern",U)),!t))return Promise.resolve(g)}var j=function(){if(v){var n=ze(e,p,r,!1,!0),o=y&&a?a[0].ref:i;return nt(v)?Promise.resolve(v(n)).then(function(e){var n=it(e,o);if(n&&(g[p]=Object.assign(Object.assign({},n),b("validate",n.message)),!t))return m=!0,g}):function(){if(we(v)){var e=function(){if(!He(i)&&(g[p]=Object.assign({ref:o},i),!t))return m=!0,g},r=!1,i={},a=ie(Object.entries(v),function(e){var a=e[0],l=e[1];if(He(i)||t)return Promise.resolve(l(n)).then(function(e){var n=it(e,o,a);n&&(i=Object.assign(Object.assign({},n),b(a,n.message)),t&&(g[p]=i))});r=!0},function(){return r});return a&&a.then?a.then(e):e()}}()}}();return Promise.resolve(j&&j.then?j.then(function(e){return m?e:g}):m?j:g)}catch(e){return Promise.reject(e)}},lt=function e(t,n,r){for(var i in void 0===r&&(r=[]),n){var o=t+(we(n)?"."+i:"["+i+"]");Xe(n[i])?r.push(o):e(o,n[i],r)}return r},ut=function(e,t,n,r,i){var o=void 0;return n.add(t),He(e)||(o=Le(e,t),(we(o)||Array.isArray(o))&&lt(t,o).forEach(function(e){return n.add(e)})),Ae(o)?i?r:Le(r,t):o},ct=function(e){var t=e.isBlurEvent,n=e.isSubmitted;return!e.isOnAll&&(!n&&e.isOnTouch?!(e.isTouched||t):(n?e.isReValidateOnBlur:e.isOnBlur)?!t:!(n?e.isReValidateOnChange:e.isOnChange)||t)},st=function(e){return e.substring(0,e.indexOf("["))},dt=function(e,t){return[].concat(e).some(function(e){return function(e,t){return RegExp(("^"+t+"([|.)\\d+").replace(/\[/g,"\\[").replace(/\]/g,"\\]")).test(e)}(t,e)})},ft="undefined"!=typeof window&&"undefined"!=typeof document;function vt(e){var t,n;if(Xe(e)||ft&&(e instanceof File||be(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 new Date(e.getTime());if(e instanceof Set){n=new Set;for(var r,i=p(e);!(r=i()).done;)n.add(r.value);return n}if(e instanceof Map){n=new Map;for(var o,a=p(e.keys());!(o=a()).done;){var l=o.value;n.set(l,vt(e.get(l)))}return n}for(var u in n=Array.isArray(e)?[]:{},e)n[u]=vt(e[u]);return n}var mt=function(e){return{isOnSubmit:!e||"onSubmit"===e,isOnBlur:"onBlur"===e,isOnChange:"onChange"===e,isOnAll:"all"===e,isOnTouch:"onTouched"===e}},pt=function(e){return Me(e)||Ue(e)},gt="undefined"==typeof window,ht=ft?"Proxy"in window:"undefined"!=typeof Proxy,Et=n.createContext(null);Et.displayName="RHFContext";var yt,_t,bt,Ot,Ct,wt=function(e){var t=e.as,r=e.render,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"]),o=function(e){var t=e.name,r=e.rules,i=e.defaultValue,o=e.control,a=e.onFocus,l=n.useContext(Et);if("production"!==process.env.NODE_ENV&&!o&&!l)throw new Error("📋 Controller is missing `control` prop. https://react-hook-form.com/api#Controller");var u=o||l.control,c=u.defaultValuesRef,s=u.setValue,d=u.register,f=u.unregister,v=u.trigger,m=u.mode,p=u.reValidateMode,g=p.isReValidateOnBlur,h=p.isReValidateOnChange,E=u.formState,y=u.formStateRef.current,_=y.isSubmitted,b=y.touched,O=y.errors,C=u.updateFormState,w=u.readFormStateRef,S=u.fieldsRef,N=u.shallowFieldsStateRef,I=!dt(u.fieldArrayNamesRef.current,t),D=function(){return!Ae(Le(N.current,t))&&I?Le(N.current,t):Ae(i)?Le(c.current,t):i},T=n.useState(D()),A=T[0],L=T[1],R=n.useRef(A),x=n.useRef({focus:function(){return null}}),P=n.useRef(a||function(){nt(x.current.focus)&&x.current.focus(),"production"!==process.env.NODE_ENV&&(nt(x.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"))}),M=n.useCallback(function(e){return!ct(Object.assign({isBlurEvent:e,isReValidateOnBlur:g,isReValidateOnChange:h,isSubmitted:_,isTouched:!!Le(b,t)},m))},[g,h,_,b,t,m]),k=n.useCallback(function(e){var t,n=Xe(t=e[0])||!we(t.target)||we(t.target)&&!t.type?t:Ae(t.target.value)?t.target.checked:t.target.value;return L(n),R.current=n,n},[]),U=n.useCallback(function(e){if("production"!==process.env.NODE_ENV&&!t)return console.warn("📋 Field is missing `name` prop. https://react-hook-form.com/api#Controller");S.current[t]?S.current[t]=Object.assign({ref:S.current[t].ref},r):(d(Object.defineProperties({name:t,focus:P.current},{value:{set:function(e){L(e),R.current=e},get:function(){return R.current}}}),r),e=Ae(Le(c.current,t))),e&&I&&L(D())},[r,t,d]);n.useEffect(function(){return function(){return f(t)}},[t]),n.useEffect(function(){"production"!==process.env.NODE_ENV&&(Ae(A)&&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)"),!I&&Ae(i)&&console.warn("📋 Controller is missing `defaultValue` prop when using `useFieldArray`. https://react-hook-form.com/api#Controller")),U()},[U]),n.useEffect(function(){!S.current[t]&&U(!0)});var j=n.useCallback(function(){w.current.touched&&!Le(b,t)&&(De(b,t,!0),C({touched:b})),M(!0)&&v(t)},[t,C,M,v,w]);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 s(t,k(n),{shouldValidate:M(),shouldDirty:!0})},[s,t,M]),onBlur:j,name:t,value:A,ref:x},meta:Object.defineProperties({invalid:!!Le(O,t)},{isDirty:{get:function(){return!!Le(E.dirtyFields,t)}},isTouched:{get:function(){return!!Le(E.touched,t)}}})}}(e),a=o.field,l=o.meta,u=Object.assign(Object.assign({},i),a);return t?n.isValidElement(t)?n.cloneElement(t,u):n.createElement(t,u):r?r(a,l):null},St=function(e){var n=e.control,i=e.t,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(wt,{render:function(e){return 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(wt,{render:function(e){return 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.SubmitBar,{style:{marginTop:o?"510px":"25px",marginLeft:o?"0":"-30px",maxWidth:o?"100%":"240px"},label:i("ES_COMMON_APPLY"),submit:!0})))},Nt=["currentlyActiveMobileModal","searchFormFieldsComponentProps","tenantId"],It=["currentlyActiveMobileModal","searchFormFieldsComponentProps","tenantId"],Dt=function(e){var i,o=e.Controller,a=e.register,l=e.control,u=e.t,c=e.reset,s=e.previousPage,f=e.handleSubmit,m=e.tenantId,p=e.data,g=e.onSubmit,h=e.isLoading,E=n.useState([]),y=E[0],_=E[1],b=function(e){return r.createElement("div",{onClick:e.onClick},r.createElement(t.DownloadBtnCommon,null))};n.useEffect(function(){(null==p?void 0:p.length)>0&&_([null==p?void 0:p.map(function(e){var t={};return t[u("AUDIT_DATE_LABEL")]=O(null==e?void 0:e.timestamp),t[u("AUDIT_TIME_LABEL")]=C(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(function(e){return e.name}).join(","),d({},t)})])},[p]);var O=function(e){if(null==e||null==e||""==e)return"NA";var t=new Date(e),n=t.getMonth()+1,r=t.getDate();return(r=(r>9?"":"0")+r)+"/"+(n=(n>9?"":"0")+n)+"/"+t.getFullYear()},C=function(e){if(null==e||null==e||""==e)return"NA";var t=new Date(e),n=t.getHours(),r=t.getMinutes(),i=n>12?"PM":"AM";return(n=((n=n>12?n-12:n)>9?"":"0")+n)+":"+(r=(r>9?"":"0")+r)+" "+i},w=n.useReducer(function(e,t){switch(t.type){case"set":return t.payload;case"remove":return!1}},!1),S=w[0],N=w[1],I=function(){N({type:"remove"})},D=function(){return r.createElement("div",{className:"InboxMobilePopupCloseButtonWrapper",onClick:I},r.createElement(t.CloseSvg,null))},T={Controller:o,register:a,control:l,t:u,reset:c,previousPage:s},A=n.useCallback(function(e){return function(e){var n=e.currentlyActiveMobileModal,i=e.searchFormFieldsComponentProps,o=e.tenantId,a=v(e,Nt),l=a.closeMobilePopupModal;switch(n){case"SearchFormComponent":return r.createElement(t.SearchForm,a,r.createElement(D,null),r.createElement("div",{className:"MobilePopupHeadingWrapper"},r.createElement("h2",null,u("PRIVACY_AUDIT_REPORT"),":")),r.createElement(St,d({},i,{closeMobilePopupModal:l,tenantId:o,t:u})));default:return r.createElement("span",null)}}(d({currentlyActiveMobileModal:e.currentlyActiveMobileModal,searchFormFieldsComponentProps:e.searchFormFieldsComponentProps,tenantId:e.tenantId},v(e,It)))},[S]);null==p||null===(i=p.roles)||void 0===i||i.forEach(function(e){});var L=n.useMemo(function(){return null!=p&&p.display||""===p?[]:null==p?void 0:p.map(function(e){var t,n;return(n={})[u("AUDIT_DATE_LABEL")]=O(e.timestamp),n[u("AUDIT_TIME_LABEL")]=C(e.timestamp),n[u("AUDIT_DATAVIEWED_LABEL")]=e.dataView[0]+","+e.dataView[1],n[u("AUDIT_DATAVIEWED_BY_LABEL")]=e.dataViewedBy,n[u("AUDIT_ROLE_LABEL")]=null===(t=e.roles.slice(0,3))||void 0===t?void 0:t.map(function(e){return e.name}).join(","),n})},[p]);return r.createElement(r.Fragment,null,r.createElement(t.BackButton,null),r.createElement("div",{className:"sideContent",style:{marginLeft:"70%",marginTop:"-12%"}},r.createElement(b,{className:"mrlg cursorPointer",onClick:function(){return function(e){if(void 0!==(null==e?void 0:e[0]))return Digit.Download.Excel(null==e?void 0:e[0],"AuditReport")}(y)}})),r.createElement(t.Header,null,u("PRIVACY_AUDIT_REPORT"),":"),r.createElement("div",{className:"searchBox"},r.createElement(t.SearchAction,{text:u("ES_COMMON_SEARCH"),handleActionClick:function(){return N({type:"set",payload:"SearchFormComponent"})},tenantId:m,t:u})),S?r.createElement(t.PopUp,null,r.createElement(A,{onSubmit:function(e){N({type:"remove"}),g(e)},handleSubmit:f,id:"search-form",className:"rm-mb form-field-flex-one inboxPopupMobileWrapper",searchFormFieldsComponentProps:T,currentlyActiveMobileModal:S,closeMobilePopupModal:I,tenantId:m})):null,h&&r.createElement(t.Loader,null),r.createElement(t.DetailsCard,{data:L}))},Tt=function(e){var i=e.tenantId,o=e.t,a=e.onSubmit,l=e.data,u=e.count,c=function(e){var t=void 0===e?{}:e,r=t.mode,i=void 0===r?"onSubmit":r,o=t.reValidateMode,a=void 0===o?"onChange":o,l=t.resolver,u=t.context,c=t.defaultValues,s=void 0===c?{}:c,d=t.shouldFocusError,f=void 0===d||d,v=t.shouldUnregister,m=void 0===v||v,g=t.criteriaMode,h=n.useRef({}),E=n.useRef({}),y=n.useRef({}),_=n.useRef(new Set),b=n.useRef({}),O=n.useRef({}),C=n.useRef({}),w=n.useRef({}),S=n.useRef(s),N=n.useRef(!1),I=n.useRef(!1),D=n.useRef(),T=n.useRef({}),A=n.useRef({}),L=n.useRef(u),R=n.useRef(l),x=n.useRef(new Set),P=n.useRef(mt(i)),M=P.current,k=M.isOnSubmit,U=M.isOnTouch,j="all"===g,B=n.useState({isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touched:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!k,errors:{}}),F=B[0],V=B[1],z=n.useRef({isDirty:!ht,dirtyFields:!ht,touched:!ht||U,isValidating:!ht,isSubmitting:!ht,isValid:!ht}),W=n.useRef(F),H=n.useRef(),G=n.useRef(mt(a)).current,q=G.isOnBlur,Z=G.isOnChange;L.current=u,R.current=l,W.current=F,T.current=m?{}:He(T.current)?vt(s):T.current;var X=n.useCallback(function(e){void 0===e&&(e={}),N.current||(W.current=Object.assign(Object.assign({},W.current),e),V(W.current))},[]),$=function(){return z.current.isValidating&&X({isValidating:!0})},Y=n.useCallback(function(e,t,n,r,i){void 0===n&&(n=!1),void 0===r&&(r={});var o=n||function(e){var t=e.errors,n=e.name,r=e.error,i=e.validFields,o=e.fieldsWithValidation,a=Ae(r),l=Le(t,n);return a&&!!l||!a&&!Ye(l,r,!0)||a&&Le(o,n)&&!Le(i,n)}({errors:W.current.errors,error:t,name:e,validFields:w.current,fieldsWithValidation:C.current}),a=Le(W.current.errors,e);t?(qe(w.current,e),o=o||!a||!Ye(a,t,!0),De(W.current.errors,e,t)):((Le(C.current,e)||R.current)&&(De(w.current,e,!0),o=o||a),qe(W.current.errors,e)),(o&&!Oe(n)||!He(r)||z.current.isValidating)&&X(Object.assign(Object.assign(Object.assign({},r),R.current?{isValid:!!i}:{}),{isValidating:!1}))},[]),K=n.useCallback(function(e,t){var n=h.current[e],r=n.ref,i=n.options,o=ft&&be(r)&&Oe(t)?"":t;Me(r)?(i||[]).forEach(function(e){var t=e.ref;return t.checked=t.value===o}):ke(r)&&!Je(o)?r.files=o:je(r)?[].concat(r.options).forEach(function(e){return e.selected=o.includes(e.value)}):Ue(r)&&i?i.length>1?i.forEach(function(e){var t=e.ref;return t.checked=Array.isArray(o)?!!o.find(function(e){return e===t.value}):o===t.value}):i[0].ref.checked=!!o:r.value=o},[]),J=n.useCallback(function(e,t){if(z.current.isDirty){var n=ce();return e&&t&&De(n,e,t),!Ye(n,S.current)}return!1},[]),Q=n.useCallback(function(e,t){if(void 0===t&&(t=!0),z.current.isDirty||z.current.dirtyFields){var n=!Ye(Le(S.current,e),ze(h,e,T)),r=Le(W.current.dirtyFields,e),i=W.current.isDirty;n?De(W.current.dirtyFields,e,!0):qe(W.current.dirtyFields,e);var o={isDirty:J(),dirtyFields:W.current.dirtyFields},a=z.current.isDirty&&i!==o.isDirty||z.current.dirtyFields&&r!==Le(W.current.dirtyFields,e);return a&&t&&X(o),a?o:{}}return{}},[]),ee=n.useCallback(function(e,t){try{return"production"===process.env.NODE_ENV||h.current[e]?Promise.resolve(at(h,j,h.current[e],T)).then(function(n){var r=n[e];return Y(e,r,t),Ae(r)}):(console.warn("📋 Field is missing with `name` attribute: ",e),Promise.resolve(!1))}catch(e){return Promise.reject(e)}},[Y,j]),te=n.useCallback(function(e){try{return Promise.resolve(R.current(ce(),L.current,j)).then(function(t){var n=t.errors,r=W.current.isValid;if(Array.isArray(e)){var i=e.map(function(e){var t=Le(n,e);return t?De(W.current.errors,e,t):qe(W.current.errors,e),!t}).every(Boolean);return X({isValid:He(n),isValidating:!1}),i}var o=Le(n,e);return Y(e,o,r!==He(n),{},He(n)),!o})}catch(e){return Promise.reject(e)}},[Y,j]),ne=n.useCallback(function(e){try{var t=function(e){return n?e:Promise.resolve(ee(r))},n=!1,r=e||Object.keys(h.current);if($(),R.current)return Promise.resolve(te(r));var i=function(){if(Array.isArray(r))return!e&&(W.current.errors={}),Promise.resolve(Promise.all(r.map(function(e){try{return Promise.resolve(ee(e,null))}catch(e){return Promise.reject(e)}}))).then(function(e){X({isValidating:!1});var 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)}},[te,ee]),re=n.useCallback(function(e,t,n){var r=n.shouldDirty,i=n.shouldValidate,o={};De(o,e,t);for(var a,l=p(lt(e,t));!(a=l()).done;){var u=a.value;h.current[u]&&(K(u,Le(o,u)),r&&Q(u),i&&ne(u))}},[ne,K,Q]),oe=n.useCallback(function(e,t,n){if(!m&&!Xe(t)&&De(T.current,e,Array.isArray(t)?[].concat(t):Object.assign({},t)),h.current[e])K(e,t),n.shouldDirty&&Q(e),n.shouldValidate&&ne(e);else if(!Xe(t)&&(re(e,t,n),x.current.has(e))){var r,i,o=st(e)||e;De(E.current,e,t),A.current[o](((r={})[o]=Le(E.current,o),r)),(z.current.isDirty||z.current.dirtyFields)&&n.shouldDirty&&(De(W.current.dirtyFields,e,function(e,t,n){return $e(Ke(e,t,n.slice(0,e.length)),Ke(t,e,n.slice(0,e.length)))}(t,Le(S.current,e,[]),Le(W.current.dirtyFields,e,[]))),X({isDirty:!Ye(Object.assign(Object.assign({},ce()),(i={},i[e]=t,i)),S.current)}))}!m&&De(T.current,e,t)},[Q,K,re]),ae=function(e){return I.current||_.current.has(e)||_.current.has((e.match(/\w+/)||[])[0])},le=function(e){var t=!0;if(!He(b.current))for(var n in b.current)e&&b.current[n].size&&!b.current[n].has(e)&&!b.current[n].has(st(e))||(O.current[n](),t=!1);return t};function ue(e){if(!m){for(var t,n=vt(e),r=p(x.current);!(t=r()).done;){var i,o=t.value;Se(o)&&!n[o]&&(n=Object.assign(Object.assign({},n),((i={})[o]=[],i)))}return n}return e}function ce(e){if(Je(e))return ze(h,e,T);if(Array.isArray(e)){for(var t,n={},r=p(e);!(t=r()).done;){var i=t.value;De(n,i,ze(h,i,T))}return n}return ue(Qe(h,vt(T.current),m))}D.current=D.current?D.current:function(e){var t=e.type,n=e.target;try{var r,i,o=n.name,a=h.current[o];return Promise.resolve(function(){if(a){var e=function(){!l&&le(o),Y(o,r,s,c,i)},l="blur"===t,u=ct(Object.assign({isBlurEvent:l,isReValidateOnChange:Z,isReValidateOnBlur:q,isTouched:!!Le(W.current.touched,o),isSubmitted:W.current.isSubmitted},P.current)),c=Q(o,!1),s=!He(c)||!l&&ae(o);if(l&&!Le(W.current.touched,o)&&z.current.touched&&(De(W.current.touched,o,!0),c=Object.assign(Object.assign({},c),{touched:W.current.touched})),!m&&Ue(n)&&De(T.current,o,ze(h,o)),u)return!l&&le(o),(!He(c)||s&&He(c))&&X(c);$();var d=R.current?Promise.resolve(R.current(ce(),L.current,j)).then(function(e){var t=e.errors,a=W.current.isValid;if(r=Le(t,o),Ue(n)&&!r&&R.current){var l=st(o),u=Le(t,l,{});u.type&&u.message&&(r=u),l&&(u||Le(W.current.errors,l))&&(o=l)}a!==(i=He(t))&&(s=!0)}):Promise.resolve(at(h,j,a,T)).then(function(e){r=e[o]});return d&&d.then?d.then(e):e()}}())}catch(e){return Promise.reject(e)}};var se=n.useCallback(function(e){void 0===e&&(e={});try{var t=He(h.current)?S.current:{};return Promise.resolve(R.current(Object.assign(Object.assign(Object.assign({},t),ce()),e),L.current,j)).then(function(e){var t=He(e.errors);W.current.isValid!==t&&X({isValid:t})})}catch(e){return Promise.reject(e)}},[j]),de=n.useCallback(function(e,t){!function(e,t,n,r,i,o){var a=n.ref,l=n.ref.name,u=e.current[l];if(!i){var c=ze(e,l,r);!Ae(c)&&De(r.current,l,c)}a.type&&u?Me(a)||Ue(a)?Array.isArray(u.options)&&u.options.length?(Ne(u.options).forEach(function(e,n){void 0===e&&(e={}),(We(e.ref)&&Ze(e,e.ref)||o)&&(Re(e.ref,t),qe(u.options,"["+n+"]"))}),u.options&&!Ne(u.options).length&&delete e.current[l]):delete e.current[l]:(We(a)&&Ze(u,a)||o)&&(Re(a,t),delete e.current[l]):delete e.current[l]}(h,D.current,e,T,m,t),m&&(qe(w.current,e.ref.name),qe(C.current,e.ref.name))},[m]),fe=n.useCallback(function(e){if(I.current)X();else{for(var t,n=p(_.current);!(t=n()).done;)if(t.value.startsWith(e)){X();break}le(e)}},[]),ve=n.useCallback(function(e,t){e&&(de(e,t),m&&!Ne(e.options||[]).length&&(qe(W.current.errors,e.ref.name),De(W.current.dirtyFields,e.ref.name,!0),X({isDirty:J()}),z.current.isValid&&R.current&&se(),fe(e.ref.name)))},[se,de]),me=n.useCallback(function(e,t,n){var r=n?b.current[n]:_.current,i=Qe(h,vt(T.current),m,!1,e);if(Je(e)){var o=st(e)||e;return x.current.has(o)&&(i=Object.assign(Object.assign({},y.current),i)),ut(i,e,r,Ae(Le(S.current,e))?t:Le(S.current,e),!0)}var a=Ae(t)?S.current:t;return Array.isArray(e)?e.reduce(function(e,t){var n;return Object.assign(Object.assign({},e),((n={})[t]=ut(i,t,r,a),n))},{}):(I.current=Ae(n),Te(!He(i)&&i||a))},[]);function pe(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(x.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")}var n,r=e.name,i=e.type,o=e.value,a=Object.assign({ref:e},t),l=h.current,u=pt(e),c=dt(x.current,r),s=function(t){return ft&&(!be(e)||t===e)},d=l[r],f=!0;if(d&&(u?Array.isArray(d.options)&&Ne(d.options).find(function(e){return o===e.ref.value&&s(e.ref)}):s(d.ref)))l[r]=Object.assign(Object.assign({},d),t);else{d=i?u?Object.assign({options:[].concat(Ne(d&&d.options||[]),[{ref:e}]),ref:{type:i,name:r}},t):Object.assign({},a):a,l[r]=d;var v=Ae(Le(T.current,r));He(S.current)&&v||(n=Le(v?S.current:T.current,r),(f=Ae(n))||c||K(r,n)),He(t)||(De(C.current,r,!0),!k&&z.current.isValid&&at(h,j,d,T).then(function(e){var t=W.current.isValid;He(e)?De(w.current,r,!0):qe(w.current,r),t!==He(e)&&X()})),!m||c&&f||!c&&qe(W.current.dirtyFields,r),i&&function(e,t,n){var r=e.ref;be(r)&&n&&(r.addEventListener(t?"change":"input",n),r.addEventListener("blur",n))}(u&&d.options?d.options[d.options.length-1]:d,u||"select-one"===e.type,D.current)}}var ge=n.useCallback(function(e,t){return function(n){try{n&&n.preventDefault&&(n.preventDefault(),n.persist());var r={},i=ue(Qe(h,vt(T.current),m,!0));return z.current.isSubmitting&&X({isSubmitting:!0}),Promise.resolve(function(o,a){try{var l=function(){function o(){var o=function(){if(He(r)&&Object.keys(W.current.errors).every(function(e){return e in h.current}))return X({errors:{},isSubmitting:!0}),Promise.resolve(e(i,n)).then(function(){});var o=function(e){f&&function(e,t){for(var n in e)if(Le(t,n)){var r=e[n];if(r){if(r.ref.focus&&Ae(r.ref.focus()))break;if(r.options){r.options[0].ref.focus();break}}}}(h.current,W.current.errors)};return W.current.errors=Object.assign(Object.assign({},W.current.errors),r),t?Promise.resolve(t(W.current.errors,n)).then(o):o()}();if(o&&o.then)return o.then(function(){})}var a=R.current?Promise.resolve(R.current(i,L.current,j)).then(function(e){var t=e.values;W.current.errors=r=e.errors,i=t}):ie(Object.values(h.current),function(e){var t=function(){if(e){var t=e.ref.name;return Promise.resolve(at(h,j,e,T)).then(function(e){e[t]?(De(r,t,e[t]),qe(w.current,t)):Le(C.current,t)&&(qe(W.current.errors,t),De(w.current,t,!0))})}}();if(t&&t.then)return t.then(function(){})});return a&&a.then?a.then(o):o()}()}catch(e){return a(!0,e)}return l&&l.then?l.then(a.bind(null,!1),a.bind(null,!0)):a(!1,l)}(0,function(e,t){if(W.current.isSubmitting=!1,X({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:He(W.current.errors),submitCount:W.current.submitCount+1}),e)throw t;return t}))}catch(n){return Promise.reject(n)}}},[f,j]);n.useEffect(function(){l&&z.current.isValid&&se(),H.current=H.current||!ft?H.current:function(e,t){var n=new MutationObserver(function(){for(var n=0,r=Object.values(e.current);n<r.length;n++){var i=r[n];if(i&&i.options)for(var o,a=p(i.options);!(o=a()).done;){var l=o.value;l&&l.ref&&We(l.ref)&&t(i)}else i&&We(i.ref)&&t(i)}});return n.observe(window.document,{childList:!0,subtree:!0}),n}(h,ve)},[ve,S.current]),n.useEffect(function(){return function(){H.current&&H.current.disconnect(),N.current=!0,"production"===process.env.NODE_ENV&&Object.values(h.current).forEach(function(e){return ve(e,!0)})}},[]),!l&&z.current.isValid&&(F.isValid=Ye(w.current,C.current)&&He(W.current.errors));var he={trigger:ne,setValue:n.useCallback(function(e,t,n){oe(e,t,n||{}),ae(e)&&X(),le(e)},[oe,ne]),getValues:n.useCallback(ce,[]),register:n.useCallback(function(e,t){if(!gt)if(Je(e))pe({name:e},t);else{if(!we(e)||!("name"in e))return function(t){return t&&pe(t,e)};pe(e,t)}},[S.current]),unregister:n.useCallback(function(e){for(var t,n=p(Array.isArray(e)?e:[e]);!(t=n()).done;)ve(h.current[t.value],!0)},[]),formState:ht?new Proxy(F,{get:function(e,t){if("production"!==process.env.NODE_ENV&&"isValid"===t&&k&&console.warn("📋 `formState.isValid` is applicable with `onTouched`, `onChange` or `onBlur` mode. https://react-hook-form.com/api#formState"),t in e)return z.current[t]=!0,e[t]}}):F},Ee=n.useMemo(function(){return Object.assign({isFormDirty:J,updateWatchedValue:fe,shouldUnregister:m,updateFormState:X,removeFieldEventListener:de,watchInternal:me,mode:P.current,reValidateMode:{isReValidateOnBlur:q,isReValidateOnChange:Z},validateResolver:l?se:void 0,fieldsRef:h,resetFieldArrayFunctionRef:A,useWatchFieldsRef:b,useWatchRenderFunctionsRef:O,fieldArrayDefaultValuesRef:E,validFieldsRef:w,fieldsWithValidationRef:C,fieldArrayNamesRef:x,readFormStateRef:z,formStateRef:W,defaultValuesRef:S,shallowFieldsStateRef:T,fieldArrayValuesRef:y},he)},[S.current,fe,m,de,me]);return Object.assign({watch:function(e,t){return me(e,t)},control:Ee,handleSubmit:ge,reset:n.useCallback(function(e,t){if(void 0===t&&(t={}),ft)for(var n=0,r=Object.values(h.current);n<r.length;n++){var i=r[n];if(i){var o=i.ref,a=i.options,l=pt(o)&&Array.isArray(a)?a[0].ref:o;if(be(l))try{l.closest("form").reset();break}catch(e){}}}var u,c,s,d,f,v,p,g;h.current={},S.current=Object.assign({},e||S.current),e&&le(""),Object.values(A.current).forEach(function(e){return nt(e)&&e()}),T.current=m?{}:vt(e||S.current),c=(u=t).errors,s=u.isDirty,d=u.isSubmitted,f=u.touched,p=u.submitCount,g=u.dirtyFields,(v=u.isValid)||(w.current={},C.current={}),E.current={},_.current=new Set,I.current=!1,X({submitCount:p?W.current.submitCount:0,isDirty:!!s&&W.current.isDirty,isSubmitted:!!d&&W.current.isSubmitted,isValid:!!v&&W.current.isValid,dirtyFields:g?W.current.dirtyFields:{},touched:f?W.current.touched:{},errors:c?W.current.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},[]),clearErrors:n.useCallback(function(e){e&&(Array.isArray(e)?e:[e]).forEach(function(e){return h.current[e]&&Se(e)?delete W.current.errors[e]:qe(W.current.errors,e)}),X({errors:e?W.current.errors:{}})},[]),setError:n.useCallback(function(e,t){var n=(h.current[e]||{}).ref;De(W.current.errors,e,Object.assign(Object.assign({},t),{ref:n})),X({isValid:!1}),t.shouldFocus&&n&&n.focus&&n.focus()},[]),errors:F.errors},he)}({defaultValues:Digit.SessionStorage.get("AUDIT_APPLICATION_DETAIL")||{offset:0,limit:5,sortOrder:"DESC"}}),s=c.register,f=c.control,v=c.handleSubmit,m=c.setValue,g=c.getValues,h=c.reset,E=function(e){if(null==e||null==e||""==e)return"NA";var t=new Date(e),n=t.getMonth()+1,r=t.getDate();return(r=(r>9?"":"0")+r)+"/"+(n=(n>9?"":"0")+n)+"/"+t.getFullYear()},y=function(e){if(null==e||null==e||""==e)return"NA";var t=new Date(e),n=t.getHours(),r=t.getMinutes(),i=n>12?"PM":"AM";return(n=((n=n>12?n-12:n)>9?"":"0")+n)+":"+(r=(r>9?"":"0")+r)+" "+i},_=n.useState([]),b=_[0],O=_[1],C=function(e){return r.createElement("div",{onClick:e.onClick},r.createElement(t.DownloadBtnCommon,null))};n.useEffect(function(){s("offset",0),s("limit",5),s("sortOrder","DESC")},[s]),n.useEffect(function(){(null==l?void 0:l.length)>0&&O([null==l?void 0:l.map(function(e){var t={};return t[o("AUDIT_DATE_LABEL")]=E(null==e?void 0:e.timestamp),t[o("AUDIT_TIME_LABEL")]=y(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(function(e){return e.name}).join(","),d({},t)})])},[l]);var w=n.useCallback(function(e){0!==e.length&&(m("sortBy",e.id),m("sortOrder",e.desc?"DESC":"ASC"))},[]);function S(){m("offset",g("offset")-g("limit")),v(a)()}var N=window.Digit.Utils.browser.isMobile();if(N)return r.createElement(Dt,{Controller:wt,register:s,control:f,t:o,reset:h,previousPage:S,handleSubmit:v,tenantId:i,data:l,onSubmit:a});var I=function(e){return r.createElement("span",{className:"cell-text"},e)},D=n.useMemo(function(){return[{Header:o("AUDIT_DATE_LABEL"),disableSortBy:!0,accessor:function(e){var t="NA"===e.timestamp?o("WS_NA"):E(e.timestamp);return I(""+t)}},{Header:o("AUDIT_TIME_LABEL"),disableSortBy:!0,accessor:function(e){var t="NA"===e.timestamp?o("WS_NA"):y(e.timestamp);return I(""+t)}},{Header:o(N?"AUDIT_DATAVIEWED_LABEL":"AUDIT_DATAVIEWED_PRIVACY"),disableSortBy:!0,accessor:function(e){return I(""+(null==e?void 0:e.dataView))}},{Header:o(N?"AUDIT_DATAVIEWED_BY_LABEL":"AUDIT_DATAVIEWED_BY_PRIVACY"),disableSortBy:!0,accessor:function(e){return I(""+(null==e?void 0:e.dataViewedBy))}},{Header:o("AUDIT_ROLE_LABEL"),disableSortBy:!0,accessor:function(e){var t;return I(""+(null==e||null===(t=e.roles.slice(0,3))||void 0===t?void 0:t.map(function(e){return 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:a,handleSubmit:v},r.createElement(St,{register:s,control:f,reset:h,tenantId:i,t:o,previousPage:S})),r.createElement("div",{style:{marginTop:"240px",marginLeft:"-55%",maxWidth:"80%",marginRight:"52px"}},null!=l&&l.display?r.createElement("div",{style:{marginTop:"20x",width:"1025px",marginLeft:"25px",backgroundColor:"white",height:"60px"}},o(l.display).split("\\n").map(function(e,t){return r.createElement("p",{key:t,style:{textAlign:"center"}},e)})):""!==l?r.createElement("div",{style:{backgroundColor:"white",marginRight:"-30px",marginLeft:"30px"}},r.createElement("div",{className:"sideContent",style:{float:"right",padding:"10px 30px"}},r.createElement(C,{className:"mrlg cursorPointer",onClick:function(){return function(e){if(void 0!==(null==e?void 0:e[0]))return Digit.Download.Excel(null==e?void 0:e[0],"AuditReport")}(b)}})),r.createElement(t.Table,{t:o,data:l,totalRecords:u,columns:D,getCellProps:function(e){return{style:{minWidth:e.column.Header===o("ES_INBOX_APPLICATION_NO")?"240px":"",padding:"20px 18px",fontSize:"16px"}}},onPageSizeChange:function(e){m("limit",Number(e.target.value)),v(a)()},currentPage:g("offset")/g("limit"),onNextPage:function(){m("offset",g("offset")+g("limit")),v(a)()},onPrevPage:S,manualPagination:!1,pageSizeLimit:g("limit"),onSort:w,disableSort:!1,sortParams:[{id:g("sortBy"),desc:"DESC"===g("sortOrder")}]})):r.createElement(t.Loader,null)))},At=function(e){var t,o,a=i.useTranslation().t,l=Digit.ULBService.getCitizenCurrentTenant(),u=n.useState({}),c=u[0],s=u[1],f=function(e,t){void 0===t&&(t="dayend");try{var 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(function(){var e=Digit.SessionStorage.get("AUDIT_APPLICATION_DETAIL")||{};if(e){var t=d({},e);s(Object.keys(t).filter(function(e){return t[e]}).reduce(function(e,n){var r;return d({},e,((r={})[n]="object"==typeof t[n]?t[n].code:t[n],r))},{}))}},[]);var v={enabled:!!(c&&Object.keys(c).length>0)},m=d({},c),p=Digit.Hooks.useAudit({tenantId:l,filters:d({},m),config:v}),g=p.data;return r.createElement(Tt,{t:a,tenantId:l,onSubmit:function(e){Digit.SessionStorage.set("AUDIT_APPLICATION_DETAIL",{offset:0,limit:5,sortBy:"commencementDate",sortOrder:"DESC"});var t=d({},e,{fromDate:f(null==e?void 0:e.fromDate),toDate:f(null==e?void 0:e.toDate)});s(Object.keys(t).filter(function(e){return t[e]}).reduce(function(e,n){var r;return d({},e,((r={})[n]=t[n],r))},{}))},data:p.isLoading?"":(null==g||null===(t=g.ElasticSearchData)||void 0===t?void 0:t.length)>0?null==g?void 0:g.ElasticSearchData:{display:"ES_COMMON_NO_DATA"},count:null==g||null===(o=g.ElasticSearchData)||void 0===o?void 0:o.length})},Lt=function(e){var n,o,a,l,u,c,s,d,f,v,m,p,g,h,E,y,_=e.moduleCode,b=i.useTranslation().t,O=Digit.ULBService.getCitizenCurrentTenant(),C=Digit.Hooks.useStaticData(Digit.ULBService.getStateId()),w=C.isLoading,S=C.data,N=Digit.Hooks.useDynamicData({moduleCode:_,tenantId:O,filters:{},t:b}),I=N.error,D=N.data,T=function(e){var n=e.styles;switch(e.module){case"TL":return r.createElement(t.CaseIcon,{className:"fill-path-primary-main",styles:n});case"PT":return r.createElement(t.PTIcon,{className:"fill-path-primary-main",styles:n});case"MCOLLECT":return r.createElement(t.MCollectIcon,{className:"fill-path-primary-main",styles:n});case"PGR":return r.createElement(t.ComplaintIcon,{className:"fill-path-primary-main",styles:n});default:return r.createElement(t.CaseIcon,{className:"fill-path-primary-main",styles:n})}},A=null==S||null===(n=S.MdmsRes["common-masters"])||void 0===n||null===(o=n.StaticData[0])||void 0===o?void 0:o[""+_],L=function(e){switch(e.module){case"PT":case"WS":return r.createElement("span",{className:"timerIcon"},r.createElement(t.TimerIcon,null));default:return null}},R=function(e){switch(e.module){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}},x=function(e){switch(e){case"TL":case"PT":case"MCOLLECT":return{staticCommonContent:b("COMMON_VALIDITY"),validity:(null==A?void 0:A.validity)+b("1"===(null==A?void 0:A.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==A?void 0:A.validity)+" "+b("1"===(null==A?void 0:A.validity)?"COMMON_DAY":"COMMON_DAYS")};default:return{staticCommonContent:""}}},P=function(e){switch(e){case"PT":return{staticDataOne:(null==A?void 0:A.staticDataOne)+" "+b("COMMON_DAYS"),staticDataOneHeader:b("APPLICATION_PROCESSING_TIME"),staticDataTwo:null==A?void 0:A.staticDataTwo,staticDataTwoHeader:b("APPLICATION_PROCESSING_FEE")};case"WS":return{staticDataOne:"",staticDataOneHeader:b("PAY_WATER_CHARGES_BY")+" "+(null==A?void 0:A.staticDataOne)+" "+b("COMMON_DAYS")+" "+b("OF_BILL_GEN_TO_AVOID_LATE_FEE"),staticDataTwo:(null==A?void 0:A.staticDataTwo)+" "+b("COMMON_DAYS"),staticDataTwoHeader:b("APPLICATION_PROCESSING_TIME")};default:return{}}};return w||N.isLoading?r.createElement(t.Loader,null):A?r.createElement(r.Fragment,null,A&&null!=A&&A.payViaWhatsApp?r.createElement(t.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"}},r.createElement("div",{className:"pay-whatsapp-card",onClick:function(){window.open(null==A?void 0:A.payViaWhatsApp)}},r.createElement("div",{className:"pay-whatsapp-text"},b("PAY_VIA_WHATSAPP")),r.createElement("div",{className:"whatsAppIconG"},r.createElement(t.WhatsappIconGreen,null)))):null,A&&null!=A&&A.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!=A&&null!==(a=A.helpline)&&void 0!==a&&a.contactOne?r.createElement("div",{className:"call-center-card-content"},r.createElement("a",{href:"tel:"+(null==A||null===(l=A.helpline)||void 0===l?void 0:l.contactOne)},null==A||null===(u=A.helpline)||void 0===u?void 0:u.contactOne)):null,null!=A&&null!==(c=A.helpline)&&void 0!==c&&c.contactTwo?r.createElement("div",{className:"call-center-card-content"},r.createElement("a",{href:"tel:"+(null==A||null===(s=A.helpline)||void 0===s?void 0:s.contactTwo)},null==A||null===(d=A.helpline)||void 0===d?void 0:d.contactTwo)):null)):null,A&&null!=A&&A.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==A?void 0:A.serviceCenter)),null!=A&&A.viewMapLocation?r.createElement("div",{className:"link"},r.createElement("a",{href:null==A?void 0:A.viewMapLocation},b("VIEW_ON_MAP"))):null):r.createElement("div",null),r.createElement(t.Card,{style:{margin:"16px",padding:"16px",maxWidth:"unset"}},I||null==D||null===(null==D?void 0:D.dynamicDataOne)?r.createElement("div",null):r.createElement("div",{className:"dynamicDataCard"},r.createElement("div",{className:"dynamicData"},r.createElement(T,{module:_,styles:{width:"24px",height:"24px"}}),r.createElement("span",{className:"dynamicData-content"},null==D?void 0:D.dynamicDataOne))),I||null==D||null===(null==D?void 0:D.dynamicDataTwo)?r.createElement("div",null):r.createElement("div",{className:"dynamicDataCard"},r.createElement("div",{className:"dynamicData"},r.createElement(T,{module:_,styles:{width:"24px",height:"24px"}}),r.createElement("span",{className:"dynamicData-content"},null==D?void 0:D.dynamicDataTwo))),A&&null!=A&&A.staticDataOne?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",style:{marginTop:""===(null===(f=P(_))||void 0===f?void 0:f.staticDataOne)?"8px":"unset"}},null===(v=P(_))||void 0===v?void 0:v.staticDataOneHeader),r.createElement("span",{className:"static-data-content-second"},""+(null===(m=P(_))||void 0===m?void 0:m.staticDataOne))))):r.createElement("div",null),A&&null!=A&&A.staticDataTwo?r.createElement("div",{className:"staticDataCard"},r.createElement("div",{className:"staticData"},r.createElement(R,{module:_}),r.createElement("span",{className:"static-data-content"},r.createElement("span",{className:"static-data-content-first"},null===(p=P(_))||void 0===p?void 0:p.staticDataTwoHeader),r.createElement("span",{className:"static-data-content-second"},null===(g=P(_))||void 0===g?void 0:g.staticDataTwo)))):r.createElement("div",null),A&&null!=A&&A.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=x(_))||void 0===h?void 0:h.staticCommonContent),r.createElement("span",{className:"static-data-content-second"},null===(E=x(_))||void 0===E?void 0:E.validity)))):r.createElement("div",null),I||null==D||null==D||!D.staticData||null===(null==D?void 0:D.staticData)?r.createElement("div",null):r.createElement("div",{className:"staticDataCard"},r.createElement("div",{className:"staticData"},"PGR"===_?r.createElement(T,{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=x(_))||void 0===y?void 0:y.staticCommonContent),r.createElement("span",{className:"static-data-content-second"},null==D?void 0:D.staticData)))))):r.createElement(r.Fragment,null)},Rt=[(null===(yt=window)||void 0===yt?void 0:yt.contextPath)+"/citizen/register/name","/"+(null===(_t=window)||void 0===_t?void 0:_t.contextPath)+"/citizen/select-language","/"+(null===(bt=window)||void 0===bt?void 0:bt.contextPath)+"/citizen/select-location","/"+(null===(Ot=window)||void 0===Ot?void 0:Ot.contextPath)+"/citizen/login","/"+(null===(Ct=window)||void 0===Ct?void 0:Ct.contextPath)+"/citizen/register/otp"],xt=function(e,t){return t.filter(function(t){return e.map(function(e){return e.code}).includes(t.code)})},Pt=function(e){var n,o,a,u=e.stateInfo,c=e.userDetails,s=e.CITIZEN,d=e.cityDetails,f=e.mobileView,v=e.handleUserDropdownSelection,m=e.logoUrl,p=e.stateCode,g=e.modules,E=e.appTenants,b=e.pathname,O=e.initData,w=Digit.Hooks.useCustomMDMS(Digit.ULBService.getStateId(),"ACCESSCONTROL-ACTIONS-TEST",[{name:"actions-test",filter:"[?(@.url == '"+window.contextPath+"-card')]"}],{select:function(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(function(e){return!0===e.enabled}).reduce(function(e,t){var n;return e[t.parentModule]=(null===(n=e[t.parentModule])||void 0===n?void 0:n.length)>0?[t].concat(e[t.parentModule]):[t],e},{})}}),S=w.isLoading,N=w.data,I=w.isFetched,D=Digit.Hooks.useRouteSubscription(b),T=i.useTranslation().t,A=l.useRouteMatch().path,L=l.useHistory(),R=Rt.some(function(e){return window.location.href.includes(e)}),x=g.map(function(e,t){var n=e.code,i=e.tenants,o=Digit.ComponentRegistryService.getComponent(n+"Module");return o?r.createElement(l.Route,{key:t,path:A+"/"+n.toLowerCase()},r.createElement(o,{stateCode:p,moduleCode:n,userType:"citizen",tenants:xt(i,E)})):null}),P=g.map(function(e,n){var i=e.code,o=e.bannerImage,a=(Digit.ComponentRegistryService.getComponent(i+"Links"),I?_(N,i,T):void 0);return"ACTION_TEST_WS"===(null==a?void 0:a.header)&&(null==a||a.links.sort(function(e,t){return t.orderNumber-e.orderNumber})),r.createElement(r.Fragment,null,r.createElement(l.Route,{key:n,path:A+"/"+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,T("MODULE_"+i.toUpperCase())),r.createElement("div",{className:"moduleLinkHomePageModuleLinks"},a&&r.createElement(t.CitizenHomeCard,{header:T(null==a?void 0:a.header),links:null==a?void 0:a.links,Icon:function(){return r.createElement("span",null)},Info:"OBPS"===i?function(){return r.createElement(t.CitizenInfoLabel,{style:{margin:"0px",padding:"10px"},info:T("CS_FILE_APPLICATION_INFO_LABEL"),text:T("BPA_CITIZEN_HOME_STAKEHOLDER_INCLUDES_INFO_LABEL")})}:null,isInfo:"OBPS"===i})),r.createElement(Lt,{moduleCode:null==i?void 0:i.toUpperCase()}))),r.createElement(l.Route,{key:"faq"+n,path:A+"/"+i.toLowerCase()+"-faq"},r.createElement(Y,{module:null==i?void 0:i.toUpperCase()})),r.createElement(l.Route,{key:"hiw"+n,path:A+"/"+i.toLowerCase()+"-how-it-works"},r.createElement(ce,{module:null==i?void 0:i.toUpperCase()})))});return r.createElement("div",{className:D},r.createElement(X,{t:T,stateInfo:u,userDetails:c,CITIZEN:s,cityDetails:d,mobileView:f,handleUserDropdownSelection:v,logoUrl:m,showSidebar:!0,linkData:N,islinkDataLoading:S}),r.createElement("div",{className:"main center-container citizen-home-container mb-25"},R?null:r.createElement("div",{className:"SideBarStatic"},r.createElement(U,{linkData:N,islinkDataLoading:S})),r.createElement(l.Switch,null,r.createElement(l.Route,{exact:!0,path:A},r.createElement(K,null)),r.createElement(l.Route,{exact:!0,path:A+"/select-language"},r.createElement(J,null)),r.createElement(l.Route,{exact:!0,path:A+"/select-location"},r.createElement(Q,null)),r.createElement(l.Route,{path:A+"/error"},r.createElement(h,{initData:O,goToHome:function(){var e,t,n,r;L.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(l.Route,{path:A+"/all-services"},r.createElement(C,{userType:"citizen",modules:g,getCitizenMenu:N,fetchedCitizen:I,isLoading:S})),r.createElement(l.Route,{path:A+"/login"},r.createElement(_e,{stateCode:p})),r.createElement(l.Route,{path:A+"/register"},r.createElement(_e,{stateCode:p,isUserRegistered:!1})),r.createElement(l.Route,{path:A+"/user/profile"},r.createElement(ue,{stateCode:p,userType:"citizen",cityDetails:d})),r.createElement(l.Route,{path:A+"/Audit"},r.createElement(At,null)),r.createElement(y,{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===(a=o.getConfig)||void 0===a?void 0:a.call(o,"DIGIT_FOOTER"),style:{height:"1.2em",cursor:"pointer"},onClick:function(){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()}})))},Mt="function"==typeof Symbol&&Symbol.for,kt=Mt?Symbol.for("react.element"):60103,Ut=Mt?Symbol.for("react.portal"):60106,jt=Mt?Symbol.for("react.fragment"):60107,Bt=Mt?Symbol.for("react.strict_mode"):60108,Ft=Mt?Symbol.for("react.profiler"):60114,Vt=Mt?Symbol.for("react.provider"):60109,zt=Mt?Symbol.for("react.context"):60110,Wt=Mt?Symbol.for("react.async_mode"):60111,Ht=Mt?Symbol.for("react.concurrent_mode"):60111,Gt=Mt?Symbol.for("react.forward_ref"):60112,qt=Mt?Symbol.for("react.suspense"):60113,Zt=Mt?Symbol.for("react.suspense_list"):60120,Xt=Mt?Symbol.for("react.memo"):60115,$t=Mt?Symbol.for("react.lazy"):60116,Yt=Mt?Symbol.for("react.block"):60121,Kt=Mt?Symbol.for("react.fundamental"):60117,Jt=Mt?Symbol.for("react.responder"):60118,Qt=Mt?Symbol.for("react.scope"):60119;function en(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case kt:switch(e=e.type){case Wt:case Ht:case jt:case Ft:case Bt:case qt:return e;default:switch(e=e&&e.$$typeof){case zt:case Gt:case $t:case Xt:case Vt:return e;default:return t}}case Ut:return t}}}function tn(e){return en(e)===Ht}var nn={AsyncMode:Wt,ConcurrentMode:Ht,ContextConsumer:zt,ContextProvider:Vt,Element:kt,ForwardRef:Gt,Fragment:jt,Lazy:$t,Memo:Xt,Portal:Ut,Profiler:Ft,StrictMode:Bt,Suspense:qt,isAsyncMode:function(e){return tn(e)||en(e)===Wt},isConcurrentMode:tn,isContextConsumer:function(e){return en(e)===zt},isContextProvider:function(e){return en(e)===Vt},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===kt},isForwardRef:function(e){return en(e)===Gt},isFragment:function(e){return en(e)===jt},isLazy:function(e){return en(e)===$t},isMemo:function(e){return en(e)===Xt},isPortal:function(e){return en(e)===Ut},isProfiler:function(e){return en(e)===Ft},isStrictMode:function(e){return en(e)===Bt},isSuspense:function(e){return en(e)===qt},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===jt||e===Ht||e===Ft||e===Bt||e===qt||e===Zt||"object"==typeof e&&null!==e&&(e.$$typeof===$t||e.$$typeof===Xt||e.$$typeof===Vt||e.$$typeof===zt||e.$$typeof===Gt||e.$$typeof===Kt||e.$$typeof===Jt||e.$$typeof===Qt||e.$$typeof===Yt)},typeOf:en},rn=z(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,a=e?Symbol.for("react.profiler"):60114,l=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,v=e?Symbol.for("react.suspense_list"):60120,m=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 v=e.type;switch(v){case c:case s:case i:case a:case o:case f:return v;default:var g=v&&v.$$typeof;switch(g){case u:case d:case p:case m:case l:return g;default:return t}}case r:return t}}}var b=s,O=u,C=l,w=n,S=d,N=i,I=p,D=m,T=r,A=a,L=o,R=f,x=!1;function P(e){return _(e)===s}t.AsyncMode=c,t.ConcurrentMode=b,t.ContextConsumer=O,t.ContextProvider=C,t.Element=w,t.ForwardRef=S,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)===l},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)===m},t.isPortal=function(e){return _(e)===r},t.isProfiler=function(e){return _(e)===a},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===a||e===o||e===f||e===v||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===m||e.$$typeof===l||e.$$typeof===u||e.$$typeof===d||e.$$typeof===h||e.$$typeof===E||e.$$typeof===y||e.$$typeof===g)},t.typeOf=_}()}),on=z(function(e){e.exports="production"===process.env.NODE_ENV?nn:rn}),an=Object.getOwnPropertySymbols,ln=Object.prototype.hasOwnProperty,un=Object.prototype.propertyIsEnumerable;function cn(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var sn=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=cn(e),o=1;o<arguments.length;o++){for(var a in n=Object(arguments[o]))ln.call(n,a)&&(i[a]=n[a]);if(an){r=an(n);for(var l=0;l<r.length;l++)un.call(n,r[l])&&(i[r[l]]=n[r[l]])}}return i},dn="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",fn=Function.call.bind(Object.prototype.hasOwnProperty),vn=function(){};if("production"!==process.env.NODE_ENV){var mn=dn,pn={},gn=fn;vn=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function hn(e,t,n,r,i){if("production"!==process.env.NODE_ENV)for(var o in e)if(gn(e,o)){var a;try{if("function"!=typeof e[o]){var l=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 l.name="Invariant Violation",l}a=e[o](t,o,r,n,null,mn)}catch(e){a=e}if(!a||a instanceof Error||vn((r||"React class")+": type specification of "+n+" `"+o+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof a+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),a instanceof Error&&!(a.message in pn)){pn[a.message]=!0;var u=i?i():"";vn("Failed "+n+" type: "+a.message+(null!=u?u:""))}}}hn.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(pn={})};var En=hn,yn=function(){};function _n(){return null}function bn(){}function On(){}"production"!==process.env.NODE_ENV&&(yn=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),On.resetWarningCache=bn;var Cn=z(function(e){e.exports="production"!==process.env.NODE_ENV?function(e,t){var n="function"==typeof Symbol&&Symbol.iterator,r={array:l("array"),bigint:l("bigint"),bool:l("boolean"),func:l("function"),number:l("number"),object:l("object"),string:l("string"),symbol:l("symbol"),any:a(_n),arrayOf:function(e){return a(function(t,n,r,i,a){if("function"!=typeof e)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var l=t[n];if(!Array.isArray(l))return new o("Invalid "+i+" `"+a+"` of type `"+s(l)+"` supplied to `"+r+"`, expected an array.");for(var u=0;u<l.length;u++){var c=e(l,u,r,i,a+"["+u+"]",dn);if(c instanceof Error)return c}return null})},element:a(function(t,n,r,i,a){var l=t[n];return e(l)?null:new o("Invalid "+i+" `"+a+"` of type `"+s(l)+"` supplied to `"+r+"`, expected a single ReactElement.")}),elementType:a(function(e,t,n,r,i){var a=e[t];return on.isValidElementType(a)?null:new o("Invalid "+r+" `"+i+"` of type `"+s(a)+"` supplied to `"+n+"`, expected a single ReactElement type.")}),instanceOf:function(e){return a(function(t,n,r,i,a){var l;return t[n]instanceof e?null:new o("Invalid "+i+" `"+a+"` of type `"+((l=t[n]).constructor&&l.constructor.name?l.constructor.name:"<<anonymous>>")+"` supplied to `"+r+"`, expected instance of `"+(e.name||"<<anonymous>>")+"`.")})},node:a(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 a(function(t,n,r,i,a){if("function"!=typeof e)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var l=t[n],u=s(l);if("object"!==u)return new o("Invalid "+i+" `"+a+"` of type `"+u+"` supplied to `"+r+"`, expected an object.");for(var c in l)if(fn(l,c)){var d=e(l,c,r,i,a+"."+c,dn);if(d instanceof Error)return d}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&yn(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."),_n;function t(t,n,r,a,l){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 "+a+" `"+l+"` of value `"+String(u)+"` supplied to `"+r+"`, expected one of "+s+".")}return a(t)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&yn("Invalid argument supplied to oneOfType, expected an instance of array."),_n;for(var t=0;t<e.length;t++){var n=e[t];if("function"!=typeof n)return yn("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+f(n)+" at index "+t+"."),_n}return a(function(t,n,r,i,a){for(var l=[],u=0;u<e.length;u++){var c=(0,e[u])(t,n,r,i,a,dn);if(null==c)return null;c.data&&fn(c.data,"expectedType")&&l.push(c.data.expectedType)}return new o("Invalid "+i+" `"+a+"` supplied to `"+r+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(e){return a(function(t,n,r,i,a){var l=t[n],c=s(l);if("object"!==c)return new o("Invalid "+i+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");for(var f in e){var v=e[f];if("function"!=typeof v)return u(r,i,a,f,d(v));var m=v(l,f,r,i,a+"."+f,dn);if(m)return m}return null})},exact:function(e){return a(function(t,n,r,i,a){var l=t[n],c=s(l);if("object"!==c)return new o("Invalid "+i+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var f=sn({},t[n],e);for(var v in f){var m=e[v];if(fn(e,v)&&"function"!=typeof m)return u(r,i,a,v,d(m));if(!m)return new o("Invalid "+i+" `"+a+"` key `"+v+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var p=m(l,v,r,i,a+"."+v,dn);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 a(e){function t(t,n,r,i,a,l,u){if(i=i||"<<anonymous>>",l=l||r,u!==dn){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 "+a+" `"+l+"` is marked as required in `"+i+"`, but its value is `null`.":"The "+a+" `"+l+"` is marked as required in `"+i+"`, but its value is `undefined`."):null:e(n,r,i,a,l)}process;var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function l(e){return a(function(t,n,r,i,a,l){var u=t[n];return s(u)!==e?new o("Invalid "+i+" `"+a+"` 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 a=i.value;if(a&&!c(a[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=En,r.resetWarningCache=En.resetWarningCache,r.PropTypes=r,r}(on.isElement):function(){function e(e,t,n,r,i,o){if(o!==dn){var a=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 a.name="Invariant Violation",a}}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:On,resetWarningCache:bn};return n.PropTypes=n,n}()}),wn=function(e){return r.createElement("div",{className:"banner banner-container"},e.children)},Sn=function(){var e=Digit.Hooks.useStore.getInitData(),n=e.isLoading,o=(e.data||{}).stateInfo,a=i.useTranslation().t;return n?r.createElement(t.Loader,null):r.createElement("div",{className:"bannerHeader"},r.createElement("img",{className:"bannerLogo",src:null==o?void 0:o.logoUrl}),r.createElement("p",null,a("TENANT_TENANTS_"+(null==o?void 0:o.code.toUpperCase()))))},Nn=function(e){var i,o,a,u=e.config,c=e.t,s=n.useState(null)[0],f=Digit.Hooks.useQueryParams(),v=f.mobile_number,m=f.tenantId,p=l.useHistory(),g=n.useState(""),h=g[0],E=g[1],y=n.useState(!0)[0],_=n.useState(null),b=_[0],O=_[1],C=function(){return Digit.UserService.getType()};n.useEffect(function(){var e,t;if(s){Digit.UserService.setUser(s);var 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)}else Digit.UserService.setType("employee")},[s]);var w=function(){O(null)},S=u.inputs,N=S[0],I=S[1],D=S[2],T=[{body:[{label:c(N.label),type:N.type,populators:{name:N.name},isMandatory:!0},{label:c(I.label),type:I.type,populators:{name:I.name},isMandatory:!0},{label:c(D.label),type:D.type,populators:{name:D.name},isMandatory:!0}]}];return r.createElement(wn,null,r.createElement("div",{className:"employeeBackbuttonAlign"},r.createElement(t.BackButton,{variant:"white",style:{borderBottom:"none"}})),r.createElement(t.FormComposer,{onSubmit:function(e){try{return Promise.resolve(oe(function(){if(e.newPassword!==e.confirmPassword)return O(c("ERR_PASSWORD_DO_NOT_MATCH"));var t=d({},e,{otpReference:h,tenantId:m,type:C().toUpperCase()});return Promise.resolve(Digit.UserService.changePassword(t,m)).then(function(e){!function(){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;O((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)||c("ES_SOMETHING_WRONG")),setTimeout(w,5e3)}))}catch(e){return Promise.reject(e)}},noBoxShadow:!0,inline:!0,submitInForm:!0,config:T,label:u.texts.submitButtonLabel,cardStyle:{maxWidth:"408px",margin:"auto"},className:"employeeChangePassword"},r.createElement(Sn,null),r.createElement(t.CardSubHeader,{style:{textAlign:"center"}}," ",u.texts.header," "),r.createElement(t.CardText,null,c("CS_LOGIN_OTP_TEXT")+" ",r.createElement("b",null," ",""+c("+ 91 - ")," ",v)),r.createElement(ve,{t:c,userType:"employee",otp:h,onOtpChange:E,error:y,onResend:function(){try{var e=function(){setTimeout(w,5e3)},t={otp:{mobileNumber:v,userType:C().toUpperCase(),type:"passwordreset",tenantId:m}},n=oe(function(){return Promise.resolve(Digit.UserService.sendOtp(t,m)).then(function(){O(c("ES_OTP_RESEND"))})},function(e){var t,n;O((null==e||null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.error_description)||c("ES_INVALID_LOGIN_CREDENTIALS"))});return Promise.resolve(n&&n.then?n.then(e):e())}catch(e){return Promise.reject(e)}}})),b&&r.createElement(t.Toast,{error:!0,label:c(b),onClose:w}),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===(a=o.getConfig)||void 0===a?void 0:a.call(o,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:function(){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()}})," "))};Nn.propTypes={loginParams:Cn.any},Nn.defaultProps={loginParams:null};var In=[{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"}]}],Dn=function(){var e=i.useTranslation().t,t=l.useRouteMatch().path,o=n.useMemo(function(){return In.map(function(t){var n={};for(var r in t.texts)n[r]=e(t.texts[r]);return d({},t,{texts:n})},[In])});return r.createElement(l.Switch,null,r.createElement(l.Route,{path:""+t,exact:!0},r.createElement(Nn,{config:o[0],t:e})))},Tn=[{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"}]}],An=function(e){var i,o,a,u=e.config,c=e.t,s=Digit.Hooks.useTenants(),f=s.data,v=s.isLoading,m=n.useState(null)[0],p=l.useHistory(),g=n.useState(null),h=g[0],E=g[1];n.useEffect(function(){var e,t;if(m){Digit.UserService.setUser(m);var 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)}else Digit.UserService.setType("employee")},[m]);var y=function(){E(null)},_=u.inputs,b=_[0],O=_[1],C=[{body:[{label:c(b.label),type:b.type,populators:{name:b.name,componentInFront:"+91"},isMandatory:!0},{label:c(O.label),type:O.type,populators:{name:O.name,customProps:{},component:function(e,n){return r.createElement(t.Dropdown,d({option:f,optionKey:"name",id:O.name,className:"login-city-dd",select:function(t){e.onChange(t)}},n))}},isMandatory:!0}]}];return v?r.createElement(t.Loader,null):r.createElement(wn,null,r.createElement("div",{className:"employeeBackbuttonAlign"},r.createElement(t.BackButton,{variant:"white",style:{borderBottom:"none"}})),r.createElement(t.FormComposer,{onSubmit:function(e){try{if(!e.city)return alert("Please Select City!"),Promise.resolve();var t={otp:{mobileNumber:e.mobileNumber,userType:Digit.UserService.getType().toUpperCase(),type:"passwordreset",tenantId:e.city.code}},n=oe(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;E((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(y,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:C,label:u.texts.submitButtonLabel,secondaryActionLabel:u.texts.secondaryButtonLabel,onSecondayActionClick:function(){var e;p.replace("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/login")},heading:u.texts.header,description:u.texts.description,headingStyle:{textAlign:"center"},cardStyle:{maxWidth:"408px",margin:"auto"},className:"employeeForgotPassword"},r.createElement(Sn,null)),h&&r.createElement(t.Toast,{error:!0,label:c(h),onClose:y}),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===(a=o.getConfig)||void 0===a?void 0:a.call(o,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:function(){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:Cn.any},An.defaultProps={loginParams:null};var Ln=function(){var e=i.useTranslation().t,t=l.useRouteMatch().path,o=n.useMemo(function(){return Tn.map(function(t){var n={};for(var r in t.texts)n[r]=e(t.texts[r]);return d({},t,{texts:n})},[Tn])});return r.createElement(l.Switch,null,r.createElement(l.Route,{path:""+t,exact:!0},r.createElement(An,{config:o[0],t:e})))},Rn=function(e,t){return t.filter(function(t){var n;return null==e||null===(n=e.map)||void 0===n?void 0:n.call(e,function(e){return e.code}).includes(t.code)})},xn=function(e){var t,n,i=e.stateCode,o=e.userType,a=e.modules,u=e.appTenants,c=e.additionalComponent,s=(Digit,l.useRouteMatch().path),d=l.useLocation(),f=Digit.UserService.getUser();if(!f||null==f||!f.access_token||null==f||!f.info)return r.createElement(l.Redirect,{to:{pathname:"/"+(null===(n=window)||void 0===n?void 0:n.contextPath)+"/employee/user/login",state:{from:d.pathname+d.search}}});var v=a.map(function(e,t){var n,a=e.code,c=e.tenants,d=Digit.ComponentRegistryService.getComponent(a+"Module");return r.createElement(l.Route,{key:t,path:s+"/"+a.toLowerCase()},d?r.createElement(d,{stateCode:i,moduleCode:a,userType:o,tenants:Rn(c,u)}):r.createElement(l.Redirect,{to:"/"+(null===(n=window)||void 0===n?void 0:n.contextPath)+"/employee/user/error?type=notfound&module="+a}))});return r.createElement("div",{className:"ground-container"},r.createElement(l.Switch,null,v,r.createElement(l.Route,{path:s+"/login"},r.createElement(l.Redirect,{to:{pathname:"/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/employee/user/login",state:{from:d.pathname+d.search}}})),r.createElement(l.Route,{path:s+"/forgot-password"},r.createElement(Ln,null)),r.createElement(l.Route,{path:s+"/change-password"},r.createElement(Dn,null)),r.createElement(l.Route,null,r.createElement(C,{userType:o,modules:a,additionalComponent:c}))))},Pn=function(){var e,o,a,u=Digit.Hooks.useStore.getInitData(),c=u.data,s=u.isLoading,d=i.useTranslation().t,f=l.useHistory(),v=c||{},m=v.languages,p=v.stateInfo,g=Digit.StoreData.getCurrentLanguage(),h=n.useState(g),E=h[0],y=h[1];return s?null:r.createElement(wn,null,r.createElement(t.Card,{className:"bannerCard removeBottomMargin"},r.createElement("div",{className:"bannerHeader"},r.createElement("img",{className:"bannerLogo",src:null==p?void 0:p.logoUrl,alt:"Digit"}),r.createElement("p",null,d("TENANT_TENANTS_"+(null==p?void 0:p.code.toUpperCase())))),r.createElement("div",{className:"language-selector",style:{justifyContent:"space-around",marginBottom:"24px",padding:"0 5%"}},m.map(function(e,n){return r.createElement("div",{className:"language-button-container",key:n},r.createElement(t.CustomButton,{selected:e.value===E,text:e.label,onClick:function(){return function(e){y(e.value),Digit.LocalizationService.changeLanguage(e.value,p.code)}(e)}}))})),r.createElement(t.SubmitBar,{style:{width:"100%"},label:d("CORE_COMMON_CONTINUE"),onSubmit:function(e){var t;f.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===(e=window)||void 0===e||null===(o=e.globalConfigs)||void 0===o||null===(a=o.getConfig)||void 0===a?void 0:a.call(o,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:function(){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()}})," "))},Mn=[{texts:{header:"CORE_COMMON_LOGIN",submitButtonLabel:"CORE_COMMON_CONTINUE",secondaryButtonLabel:"CORE_COMMON_FORGOT_PASSWORD"},inputs:[{label:"CORE_LOGIN_USERNAME",type:"text",populators:{name:"username"},isMandatory:!0},{label:"CORE_LOGIN_PASSWORD",type:"password",populators:{name:"password"},isMandatory:!0},{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)}))}"}}}]}],kn=["UserRequest"],Un=function(e){var i,o,a,u,c,s,f,m,p,g,h=e.config,E=e.t,y=e.isDisabled,_=Digit.Hooks.useTenants().isLoading,b=Digit.Hooks.useStore.getInitData().isLoading,O=n.useState(null),C=O[0],w=O[1],S=n.useState(null),N=S[0],I=S[1],D=n.useState(!1),T=D[0],A=D[1],L=l.useHistory();n.useEffect(function(){var e,t,n,r,i,o,a,l,u,c,s,d,f,v,m,p,g,h;if(C){Digit.SessionStorage.set("citizen.userRequestObject",C);var E,y,_,b,O=null==C||null===(e=C.info)||void 0===e||null===(t=e.roles)||void 0===t?void 0:t.filter(function(e){return e.tenantId===Digit.SessionStorage.get("Employee.tenantId")});(null==C||null===(n=C.info)||void 0===n||null===(r=n.roles)||void 0===r?void 0:r.length)>0&&(C.info.roles=O),Digit.UserService.setUser(C),E=null==C?void 0:C.info,y=null==C?void 0:C.access_token,b=(null===(_=JSON.parse(sessionStorage.getItem("Digit.locale")))||void 0===_?void 0:_.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",b),localStorage.setItem("Employee.locale",b),localStorage.setItem("token",y),localStorage.setItem("Employee.token",y),localStorage.setItem("user-info",JSON.stringify(E)),localStorage.setItem("Employee.user-info",JSON.stringify(E));var w,S,N,I,D,T,A,R="/"+(null===(i=window)||void 0===i?void 0:i.contextPath)+"/employee";null!==(o=window)&&void 0!==o&&null!==(a=o.location)&&void 0!==a&&null!==(l=a.href)&&void 0!==l&&l.includes("from=")&&(R=decodeURIComponent(null===(w=window)||void 0===w||null===(S=w.location)||void 0===S||null===(N=S.href)||void 0===N||null===(I=N.split("from="))||void 0===I?void 0:I[1])||"/"+(null===(D=window)||void 0===D?void 0:D.contextPath)+"/employee"),null!=C&&null!==(u=C.info)&&void 0!==u&&u.roles&&(null==C||null===(c=C.info)||void 0===c||null===(s=c.roles)||void 0===s?void 0:s.length)>0&&null!=C&&null!==(d=C.info)&&void 0!==d&&null!==(f=d.roles)&&void 0!==f&&f.every(function(e){return"NATADMIN"===e.code})&&(R="/"+(null===(T=window)||void 0===T?void 0:T.contextPath)+"/employee/dss/landing/NURT_DASHBOARD"),null!=C&&null!==(v=C.info)&&void 0!==v&&v.roles&&(null==C||null===(m=C.info)||void 0===m||null===(p=m.roles)||void 0===p?void 0:p.length)>0&&null!=C&&null!==(g=C.info)&&void 0!==g&&null!==(h=g.roles)&&void 0!==h&&h.every(function(e){return"STADMIN"===e.code})&&(R="/"+(null===(A=window)||void 0===A?void 0:A.contextPath)+"/employee/dss/landing/home"),L.replace(R)}},[C]);var R=function(){I(null)},x={code:Digit.ULBService.getStateId(),name:Digit.Utils.locale.getTransformedLocale("TENANT_TENANTS_"+Digit.ULBService.getStateId())},P=[{body:null==h?void 0:h.inputs}];return"admin"===Digit.Hooks.useQueryParams().mode&&0==(null==P||null===(i=P[0])||void 0===i||null===(o=i.body)||void 0===o||null===(a=o[2])||void 0===a?void 0:a.disable)&&null==(null==P||null===(u=P[0])||void 0===u||null===(c=u.body)||void 0===c||null===(s=c[2])||void 0===s||null===(f=s.populators)||void 0===f?void 0:f.defaultValue)&&(P[0].body[2].disable=!0,P[0].body[2].isMandatory=!1,P[0].body[2].populators.defaultValue=x),_||b?r.createElement(t.Loader,null):r.createElement(wn,null,r.createElement("div",{className:"employeeBackbuttonAlign"},r.createElement(t.BackButton,{variant:"white",style:{borderBottom:"none"}})),r.createElement(t.FormComposerV2,{onSubmit:function(e){try{var t,n=function(){A(!1)};A(!0);var r=d({},e,{userType:"EMPLOYEE"});r.tenantId=(null==e||null===(t=e.city)||void 0===t?void 0:t.code)||Digit.ULBService.getStateId(),delete r.city;var i=oe(function(){return Promise.resolve(Digit.UserService.authenticate(r)).then(function(e){var t=e.UserRequest,n=v(e,kn);Digit.SessionStorage.set("Employee.tenantId",null==t?void 0:t.tenantId),w(d({info:t},n))})},function(e){var t,n;I((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)&&E("ES_ERROR_USER_NOT_PERMITTED")||E("INVALID_LOGIN_CREDENTIALS")),setTimeout(R,5e3)});return Promise.resolve(i&&i.then?i.then(n):n())}catch(e){return Promise.reject(e)}},isDisabled:y||T,noBoxShadow:!0,inline:!0,submitInForm:!0,config:P,label:h.texts.submitButtonLabel,secondaryActionLabel:h.texts.secondaryButtonLabel,onSecondayActionClick:function(){var e;L.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/user/forgot-password")},heading:h.texts.header,className:"loginFormStyleEmployee",cardSubHeaderClassName:"loginCardSubHeaderClassName",cardClassName:"loginCardClassName",buttonClassName:"buttonClassName"},r.createElement(Sn,null)),N&&r.createElement(t.Toast,{error:!0,label:E(N),onClose:R}),r.createElement("div",{className:"employee-login-home-footer",style:{backgroundColor:"unset"}},r.createElement("img",{alt:"Powered by DIGIT",src:null===(m=window)||void 0===m||null===(p=m.globalConfigs)||void 0===p||null===(g=p.getConfig)||void 0===g?void 0:g.call(p,"DIGIT_FOOTER_BW"),style:{cursor:"pointer"},onClick:function(){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()}})," "))};Un.propTypes={loginParams:Cn.any},Un.defaultProps={loginParams:null};var jn=function(){var e=i.useTranslation().t,t=l.useRouteMatch().path,o=n.useState(Mn),a=o[0],u=o[1],c=Digit.Hooks.useCommonMDMS(Digit.ULBService.getStateId(),"commonUiConfig",["LoginConfig"],{select:function(e){var t;return{config:null==e||null===(t=e.commonUiConfig)||void 0===t?void 0:t.LoginConfig}},retry:!1}),s=c.data,f=c.isLoading;n.useEffect(function(){0==f&&null!=s&&s.config&&u(null==s?void 0:s.config)},[s,f]);var v=n.useMemo(function(){return a.map(function(t){var n={};for(var r in t.texts)n[r]=e(t.texts[r]);return d({},t,{texts:n})},[a])});return r.createElement(l.Switch,null,r.createElement(l.Route,{path:""+t,exact:!0},r.createElement(Un,{config:v[0],t:e})))},Bn=["user/profile","user/error"],Fn=function(e){var o,a,u,c,s,d,f=e.stateInfo,v=e.userDetails,m=e.CITIZEN,p=e.cityDetails,g=e.mobileView,E=e.handleUserDropdownSelection,_=e.logoUrl,b=e.DSO,O=e.stateCode,C=e.modules,w=e.appTenants,S=e.initData,N=l.useHistory(),I=i.useTranslation().t,D=l.useRouteMatch().path,T=l.useLocation(),A=null==T||null===(o=T.pathname)||void 0===o?void 0:o.includes("language-selection"),L=Bn.some(function(e){var t;return null==T||null===(t=T.pathname)||void 0===t?void 0:t.includes(e)});n.useEffect(function(){Digit.UserService.setType("employee")},[]);var R=null==S||null===(a=S.modules)||void 0===a||null===(u=a.filter(function(e){return null==e?void 0:e.additionalComponent}))||void 0===u?void 0:u.map(function(e){return null==e?void 0:e.additionalComponent});return r.createElement("div",{className:"employee"},r.createElement(l.Switch,null,r.createElement(l.Route,{path:D+"/user"},L&&r.createElement(X,{t:I,stateInfo:f,userDetails:v,CITIZEN:m,cityDetails:p,mobileView:g,handleUserDropdownSelection:E,logoUrl:_,showSidebar:!!L,showLanguageChange:!A}),r.createElement("div",{className:L?"grounded-container":"loginContainer",style:L?{padding:0,paddingTop:"80px",marginLeft:g?"":"64px"}:{"--banner-url":"url("+(null==f?void 0:f.bannerUrl)+")",padding:"0px"}},r.createElement(l.Switch,null,r.createElement(l.Route,{path:D+"/user/login"},r.createElement(jn,null)),r.createElement(l.Route,{path:D+"/user/forgot-password"},r.createElement(Ln,null)),r.createElement(l.Route,{path:D+"/user/change-password"},r.createElement(Dn,null)),r.createElement(t.PrivateRoute,{path:D+"/user/profile"},r.createElement(ue,{stateCode:O,userType:"employee",cityDetails:p})),r.createElement(l.Route,{path:D+"/user/error"},r.createElement(h,{initData:S,goToHome:function(){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(l.Route,{path:D+"/user/language-selection"},r.createElement(Pn,null)),r.createElement(l.Route,null,r.createElement(l.Redirect,{to:D+"/user/language-selection"}))))),r.createElement(l.Route,null,r.createElement(X,{t:I,stateInfo:f,userDetails:v,CITIZEN:m,cityDetails:p,mobileView:g,handleUserDropdownSelection:E,logoUrl:_,modules:C}),r.createElement("div",{className:"main "+(b?"m-auto":"")},r.createElement("div",{className:"employee-app-wrapper"},r.createElement(y,{initData:S},r.createElement(xn,{stateCode:O,userType:"employee",modules:C,appTenants:w,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:function(){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(l.Route,null,r.createElement(l.Redirect,{to:D+"/user/language-selection"}))))},Vn=function(e){var t,i,o,a,u=e.stateCode,c=e.modules,s=e.appTenants,d=e.logoUrl,f=e.initData,v=e.defaultLanding,m=void 0===v?"citizen":v,p=l.useHistory(),g=l.useLocation().pathname,h=window.innerWidth,E=Digit.ULBService.getCurrentUlb(),y=Digit.UserService.getUser(),_=(Digit.Hooks.useStore.getInitData().data||{}).stateInfo,b=Digit.UserService.hasAccess(["FSM_DSO"]),O="CITIZEN"===(null==y||null===(t=y.info)||void 0===t?void 0:t.type)||!window.location.pathname.split("/").includes("employee");window.location.pathname.split("/").includes("employee")&&(O=!1),n.useEffect(function(){var e,t,n;null!=g&&g.includes("application-details")||(null!=g&&g.includes("inbox")||Digit.SessionStorage.del("fsm/inbox/searchParams"),null!=g&&g.includes("search")&&Digit.SessionStorage.del("fsm/search/searchParams")),null!=g&&g.includes("dss")||Digit.SessionStorage.del("DSS_FILTERS"),(null==g?void 0:g.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==g?void 0:g.toString())!=="/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/citizen"&&(null==g?void 0:g.toString())!=="/"+(null===(n=window)||void 0===n?void 0:n.contextPath)+"/employee"||Digit.SessionStorage.del("WS_DISCONNECTION")},[g]),p.listen(function(){var e;null===(e=window)||void 0===e||e.scrollTo({top:0,left:0,behavior:"smooth"})});var C={stateInfo:_,userDetails:y,CITIZEN:O,cityDetails:E,mobileView:h<=640,handleUserDropdownSelection:function(e){e.func()},logoUrl:d,DSO:b,stateCode:u,modules:c,appTenants:s,sourceUrl:window.location.origin+"/citizen",pathname:g,initData:f};return r.createElement(l.Switch,null,r.createElement(l.Route,{path:"/"+(null===(i=window)||void 0===i?void 0:i.contextPath)+"/employee"},r.createElement(Fn,C)),r.createElement(l.Route,{path:"/"+(null===(o=window)||void 0===o?void 0:o.contextPath)+"/citizen"},r.createElement(Pt,C)),r.createElement(l.Route,null,r.createElement(l.Redirect,{to:"/"+(null===(a=window)||void 0===a?void 0:a.contextPath)+"/"+m})))},zn=[s],Wn=("object"==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({}):c.compose)(c.applyMiddleware.apply(void 0,zn)),Hn=function(e,t){return void 0===t&&(t={}),c.createStore(function(e,t){return c.combineReducers(d({common:(n=e,function(e,t){switch(void 0===e&&(e=n),t.type){case"LANGUAGE_SELECT":return d({},e,{selectedLanguage:t.payload});default:return e}})},t));var n}(e,t),Wn)},Gn=function(e){var n,o=e.stateCode,u=e.moduleReducers,c=e.defaultLanding,s=Digit.Hooks.useInitStore(o,e.enabledModules),d=s.data;return s.isLoading?r.createElement(t.Loader,{page:!0}):(i.getI18n(),r.createElement(a.Provider,{store:Hn(d,u(d))},r.createElement(l.BrowserRouter,null,r.createElement(t.Body,null,r.createElement(Vn,{initData:d,stateCode:o,modules:null==d?void 0:d.modules,appTenants:d.tenants,logoUrl:null==d||null===(n=d.stateInfo)||void 0===n?void 0:n.logoUrl,defaultLanding:c})))))},qn={SelectOtp:ve,ChangeCity:S,ChangeLanguage:N};exports.DigitUI=function(e){var t=e.stateCode,i=e.registry,a=e.enabledModules,l=e.moduleReducers,u=e.defaultLanding,c=n.useState(Digit.Utils.getPrivacyObject()||{}),s=c[0],f=c[1],v=(Digit.UserService.getType(),new o.QueryClient({defaultOptions:{queries:{staleTime:9e5,cacheTime:3e6,retry:!1,retryDelay:function(e){return Infinity}}}})),m=Digit.Contexts.ComponentProvider,p=Digit.Contexts.PrivacyProvider;return Digit.UserService.hasAccess(["FSM_DSO"]),r.createElement("div",null,r.createElement(y,null,r.createElement(o.QueryClientProvider,{client:v},r.createElement(m.Provider,{value:i},r.createElement(p.Provider,{value:{privacy:null==s?void 0:s[window.location.pathname],resetPrivacy:function(e){Digit.Utils.setPrivacyObject({}),f({})},getPrivacy:function(){var e=Digit.Utils.getPrivacyObject();return f(e),e},updatePrivacyDescoped:function(e){var t,n=Digit.Utils.getAllPrivacyObject(),r=d({},n,((t={})[window.location.pathname]=e,t));Digit.Utils.setPrivacyObject(d({},r)),f((null==n?void 0:n[window.location.pathname])||{})},updatePrivacy:function(e,t){f(Digit.Utils.updatePrivacy(e,t)||{})}}},r.createElement(Gn,{stateCode:t,enabledModules:a,moduleReducers:l,defaultLanding:u}))))))},exports.initCoreComponents=function(){Object.entries(qn).forEach(function(e){Digit.ComponentRegistryService.setComponent(e[0],e[1])})};
1
+ function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=require("@egovernments/digit-ui-react-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=e(require("react-tooltip")),c=require("redux"),s=e(require("redux-thunk"));const d={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"}},f=e=>{const{type:t="error"}=Digit.Hooks.useQueryParams(),n=d[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))))},m=()=>{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 v 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(m,null),r.createElement(f,{initData:this.props.initData})):this.props.children}}const p=(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},g=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?p(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(t.PTIcon,{className:"fill-path-primary-main"});case"WS":return r.createElement(t.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(t.PGRIcon,{className:"fill-path-primary-main"});case"TL":return r.createElement(t.TLIcon,{className:"fill-path-primary-main"});case"OBPS":return r.createElement(t.OBPSIcon,{className:"fill-path-primary-main"});case"Bills":return r.createElement(t.BillsIcon,{className:"fill-path-primary-main"});default:return r.createElement(t.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)}))))},h=e=>{let{modules:t,additionalComponent:i}=e;return r.createElement(n.Fragment,null,r.createElement("div",{className:"employee-app-container"},r.createElement("div",{className:"ground-container moduleCardWrapper gridModuleWrapper"},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}))},E=e=>{let{userType:t,modules:n,getCitizenMenu:i,fetchedCitizen:o,isLoading:l,additionalComponent:a}=e;return"citizen"===t?r.createElement(g,{modules:n,getCitizenMenu:i,fetchedCitizen:o,isLoading:l}):r.createElement(h,{modules:n,additionalComponent:a})},y=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},_=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=y(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=y(Digit.SessionStorage.get("Employee.tenantId"),".","_"))||void 0===i?void 0:i.toUpperCase())))}))},b=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,{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.CustomButton,{selected:e.value===s,text:e.label,onClick:()=>f(e)})))))},C=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())},O=e=>{var n,i,o,l,u,c,s,d;let{t:f,stateInfo:m,toggleSidebar:v,isSidebarOpen:p,handleLogout:g,userDetails:h,CITIZEN:E,cityDetails:y,mobileView:O,userOptions:w,handleUserDropdownSelection:S,logoUrl:N,showLanguageChange:I=!0}=e;const[D,T]=r.useState(null);r.useEffect(function(){try{var e;const t=Digit.ULBService.getCurrentTenantId(),n=null==h||null===(e=h.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(",");T(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!==D,null==h||null===(n=h.info)||void 0===n?void 0:n.uuid]);const A=Digit.ULBService.getCitizenCurrentTenant(!0);let L=a.useHistory();const{pathname:R}=a.useLocation(),{data:{unreadCount:x}={},isSuccess:P}=Digit.Hooks.useNotificationCount({tenantId:A,config:{enabled:"EMPLOYEE"!==(null===(M=Digit.UserService)||void 0===M||null===(k=M.getUser())||void 0===k||null===(U=k.info)||void 0===U?void 0:U.type)&&"CITIZEN"===(null===(B=Digit.UserService)||void 0===B||null===(j=B.getUser())||void 0===j||null===(F=j.info)||void 0===F?void 0:F.type)&&!!A}});var M,k,U,B,j,F;if(E)return r.createElement("div",null,r.createElement(t.TopBar,{img:null==m?void 0:m.logoUrlWhite,isMobile:!0,toggleSidebar:()=>{Digit.clikOusideFired?Digit.clikOusideFired=!1:v(!0)},logoUrl:null==m?void 0:m.logoUrlWhite,onLogout:g,userDetails:h,notificationCount:x<99?x:99,notificationCountLoaded:P,cityOfCitizenShownBesideLogo:f(A),onNotificationIconClick:function(){var e;L.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)})(R),changeLanguage:O?null:r.createElement(b,{dropdown:!0})}));const V=!(null==h||!h.access_token),z=null===(i=Digit.ComponentRegistryService)||void 0===i?void 0:i.getComponent("CustomEmployeeTopBar");return z?r.createElement(z,{t:f,stateInfo:m,toggleSidebar:v,isSidebarOpen:p,handleLogout:g,userDetails:h,CITIZEN:E,cityDetails:y,mobileView:O,userOptions:w,handleUserDropdownSelection:S,logoUrl:N,showLanguageChange:I,loggedin:V}):r.createElement("div",{className:"topbar"},O?r.createElement(t.Hamburger,{handleClick:v,color:"#9E9E9E"}):null,r.createElement("img",{className:"city",src:V?null==y?void 0:y.logoId:null==m?void 0:m.statelogo}),r.createElement("span",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"}},V&&(null!=y&&null!==(o=y.city)&&void 0!==o&&o.ulbGrade?r.createElement("p",{className:"ulb",style:O?{fontSize:"14px",display:"inline-block"}:{}},f(null==y?void 0:y.i18nKey).toUpperCase()," ",f("ULBGRADE_"+(null==y||null===(l=y.city)||void 0===l?void 0:l.ulbGrade.toUpperCase().replace(" ","_").replace(".","_"))).toUpperCase()):r.createElement("img",{className:"state",src:N})),!V&&r.createElement("p",{className:"ulb",style:O?{fontSize:"14px",display:"inline-block"}:{}},f("MYCITY_"+(null==m||null===(u=m.code)||void 0===u?void 0:u.toUpperCase())+"_LABEL")," ",f("MYCITY_STATECODE_LABEL")),!O&&r.createElement("div",{className:O?"right":"flex-right right w-80 column-gap-15",style:V?{}:{width:"80%"}},r.createElement("div",{className:"left"},!window.location.href.includes("employee/user/login")&&!window.location.href.includes("employee/user/language-selection")&&r.createElement(_,{dropdown:!0,t:f})),r.createElement("div",{className:"left"},I&&r.createElement(b,{dropdown:!0})),(null==h?void 0:h.access_token)&&r.createElement("div",{className:"left"},r.createElement(t.Dropdown,{option:w,optionKey:"name",select:S,showArrow:!0,freeze:!0,style:O?{right:0}:{},optionCardStyles:{overflow:"revert",display:"table"},topbarOptionsClassName:"topbarOptionsClassName",customSelector:null==D?r.createElement(C,{name:(null==h||null===(c=h.info)||void 0===c?void 0:c.name)||(null==h||null===(s=h.info)||void 0===s||null===(d=s.userInfo)||void 0===d?void 0:d.name)||"Employee"}):r.createElement("img",{src:D,style:{height:"48px",width:"48px",borderRadius:"50%"}})})),r.createElement("img",{className:"state",src:N}))))},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(b,null),icon:"LanguageIcon"},{id:"login-btn",element:"LOGIN",text:e("CORE_COMMON_LOGIN"),icon:r.createElement(t.LogoutIcon,{className:"icon"}),populators:{onClick:i}}]},S="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 N(){return(N=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}const I=e=>r.createElement("h1",{className:"heading-m"},e.label),D=()=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},r.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),r.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"})),T=e=>r.createElement("div",{onClick:null==e?void 0:e.onClick,style:null!=e&&e.isMobileView?{padding:5}:null},null!=e&&e.isMobileView?r.createElement(t.CloseSvg,null):r.createElement("div",{className:"icon-bg-secondary",style:{backgroundColor:"#505A5F"}}," ",r.createElement(D,null)," ")),A=e=>{let{onSelect:n,onCancel:o,onDismiss:l}=e;const{t:a}=i.useTranslation(),[u,c]=r.useState(window.innerWidth<=780),s=()=>{window.innerWidth<=780?u||c(!0):u&&c(!1)};return r.useEffect(()=>(window.addEventListener("resize",()=>{s()}),()=>{window.addEventListener("resize",()=>{s()})})),u?r.createElement(t.Modal,{popupStyles:{height:"174px",maxHeight:"174px",width:"324px",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},popupModuleActionBarStyles:{display:"flex",flex:1,justifyContent:"flex-start",width:"100%",position:"absolute",left:0,bottom:0,padding:"18px"},style:{flex:1},popupModuleMianStyles:{padding:"18px"},headerBarMain:r.createElement(I,{label:a("CORE_LOGOUT_WEB_HEADER")}),headerBarEnd:r.createElement(T,{onClick:l,isMobileView:u}),actionCancelLabel:a("CORE_LOGOUT_CANCEL"),actionCancelOnSubmit:o,actionSaveLabel:a("CORE_LOGOUT_WEB_YES"),actionSaveOnSubmit:n,formId:"modal-action"},r.createElement("div",null,r.createElement(t.CardText,{style:{margin:0}},a("CORE_LOGOUT_WEB_CONFIRMATION_MESSAGE")+" "))):r.createElement(t.Modal,{popupModuleMianStyles:{paddingTop:"30px"},headerBarMain:r.createElement(I,{label:a("CORE_LOGOUT_WEB_HEADER")}),headerBarEnd:r.createElement(T,{onClick:l,isMobileView:!1}),actionCancelLabel:a("CORE_LOGOUT_CANCEL"),actionCancelOnSubmit:o,actionSaveLabel:a("CORE_LOGOUT_WEB_YES"),actionSaveOnSubmit:n,formId:"modal-action"},r.createElement("div",null,r.createElement(t.CardText,{style:{marginBottom:"54px",marginLeft:"8px",marginRight:"8px"}},a("CORE_LOGOUT_WEB_CONFIRMATION_MESSAGE")+" ",r.createElement("strong",null,a("CORE_LOGOUT_MESSAGE"),"?"))))},L=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:S})),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(_,{t:n,mobileView:!0}))},R={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"})},x=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,I]=n.useState(!1),D=()=>{I(!1)};if(s)return r.createElement(t.Loader,null);const T=()=>{var e;f.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/citizen/user/profile")};let x=[...w(d,T,()=>{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?R[o]:R.BillsIcon;let u;u="component"===i.type?i.action:i.text;const c=()=>r.createElement("span",N({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(L,{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:T}},{text:d("CORE_COMMON_LOGOUT"),element:"LOGOUT",icon:"LogoutIcon",populators:{onClick:()=>{O(!1),I(!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(A,{onSelect:()=>{Digit.UserService.logout(),I(!1)},onCancel:D,onDismiss:D}))))},P=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||S,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(_,{t:i,mobileView:!0}))},M=()=>{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()}})," ")},k=e=>{let{isOpen:o,isMobile:l=!1,toggleSidebar:u,onLogout:c,isEmployee:s=!1,linkData:d,islinkDataLoading:f}=e;const{data:m,isFetched:v}=Digit.Hooks.useStore.getInitData(),{stateInfo:p}=m||{},g=Digit.UserService.getUser(),[h,E]=n.useState(""),{t:y}=i.useTranslation(),_=a.useHistory(),b=()=>{Digit.clikOusideFired=!0,u(!1)},{isLoading:C,data:O}=Digit.Hooks.useAccessControl(),S=(Digit.ULBService.getCurrentTenantId(),()=>{var e,t;const n=s?"/"+(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";_.push(n),b()});if(f||C)return r.createElement(t.Loader,null);let N,I=[...w(y,b,()=>{var e;_.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/citizen/login"),b()},s)];v&&g&&g.access_token&&(N=r.createElement(P,{info:null==g?void 0:g.info,stateName:null==p?void 0:p.name,t:y}),I=I.filter(e=>"login-btn"!==(null==e?void 0:e.id)),I=[...I,{text:y("EDIT_PROFILE"),element:"PROFILE",icon:"EditPencilIcon",populators:{onClick:S}},{text:y("CORE_COMMON_LOGOUT"),element:"LOGOUT",icon:"LogoutIcon",populators:{onClick:c}},{text:r.createElement(r.Fragment,null,y("CS_COMMON_HELPLINE"),r.createElement("div",{className:"telephone",style:{marginTop:"-10%"}},null==m?void 0:m.tenants.map(e=>{}),r.createElement("div",{className:"link"},r.createElement("a",{href:"tel:"+(null==m?void 0:m.tenants[0].contactNumber)},null==m?void 0:m.tenants[0].contactNumber)))),element:"Helpline",icon:"Phone"}]);let D={};if(s){var T;null==O||O.actions.filter(e=>"url"===e.url&&"Home"!==e.displayName).forEach(e=>{var t;if(""==h&&""!==e.path){let t=e.path.split(".")[0];"TradeLicense"===t&&(t="Trade License"),D[t]?D[t].push(e):D[t]=[e]}else if(""!==e.path&&null!=e&&null!==(t=e.displayName)&&void 0!==t&&t.toLowerCase().includes(h.toLowerCase())){let t=e.path.split(".")[0];"TradeLicense"===t&&(t="Trade License"),D[t]?D[t].push(e):D[t]=[e]}});const e=Object.keys(D);for(let t=0;t<e.length;t++){var A,L,R,k,U;const n=null===(A=D[e[t]][0])||void 0===A||null===(L=A.displayName)||void 0===L||null===(R=L.toUpperCase())||void 0===R?void 0:R.replace(/[ -]/g,"_"),r=null===(k=e[t])||void 0===k||null===(U=k.toUpperCase())||void 0===U?void 0:U.replace(/[ -]/g,"_");var B,j,F,V,z,W,H;-1===D[e[t]][0].path.indexOf(".")?I.splice(1,0,{type:"link",text:y("ACTION_TEST_"+n),link:null===(B=D[e[t]][0])||void 0===B?void 0:B.navigationURL,icon:null===(j=D[e[t]][0])||void 0===j||null===(F=j.leftIcon)||void 0===F||null===(V=(z=F).split)||void 0===V?void 0:V.call(z,":")[1],populators:{onClick:()=>{var n;_.push(null===(n=D[e[t]][0])||void 0===n?void 0:n.navigationURL),b()}}}):I.splice(1,0,{type:"dynamic",moduleName:y("ACTION_TEST_"+r),links:null===(W=D[e[t]])||void 0===W?void 0:W.map(e=>{var t,n;return{...e,displayName:y("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===(H=D[e[t]][1])||void 0===H?void 0:H.leftIcon})}const t=I.findIndex(e=>"HOME"===e.element),n=I.splice(t,1),r=I.findIndex(e=>"LANGUAGE"===e.element),i=I.splice(r,(null===(T=I)||void 0===T?void 0:T.length)-r);I.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])&&I.splice(0,0,n[0]),I=(null==i?void 0:i.length)>0?I.concat(i):I}else{var G,q;null===(G=Object.keys(d))||void 0===G||null===(q=G.sort((e,t)=>t.localeCompare(e)))||void 0===q||q.map(e=>{var t,n,r,i,o,l;"digit-ui-links"===(null===(t=d[e][0])||void 0===t?void 0:t.sidebar)&&I.splice(1,0,{type:null!==(n=d[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:y("ACTION_TEST_"+Digit.Utils.locale.getTransformedLocale(e)),links:d[e],icon:null===(o=d[e][0])||void 0===o?void 0:o.leftIcon,link:null===(l=d[e][0])||void 0===l?void 0:l.sidebarURL})})}return _.location.pathname.includes("/openlink")&&(N=r.createElement("span",null),I=I.filter(e=>"LANGUAGE"===e.element)),l?r.createElement(t.NavBar,{open:o,toggleSidebar:u,profileItem:N,onClose:b,menuItems:I,Footer:r.createElement(M,null),isEmployee:s,search:h,setSearch:E}):r.createElement(x,{logout:c})};var U="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function B(e,t){return e(t={exports:{}},t.exports),t.exports}B(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]",w="[object Int8Array]",S="[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,M=RegExp(x.source),k=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+")",we="(?:"+me+"|"+he+")?",Se="[\\ufe0e\\ufe0f]?"+we+"(?:\\u200d(?:"+[Ee,ye,_e].join("|")+")[\\ufe0e\\ufe0f]?"+we+")*",Ne="(?:"+["[\\u2700-\\u27bf]",ye,_e].join("|")+")"+Se,Ie="(?:"+[Ee+me+"?",me,ye,_e,"[\\ud800-\\udfff]"].join("|")+")",De=RegExp("['’]","g"),Te=RegExp(me,"g"),Ae=RegExp(he+"(?="+he+")|"+Ie+Se,"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[w]=ke[S]=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[w]=Ue[S]=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 U&&U&&U.Object===Object&&U,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?wt(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 wt(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 St(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({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});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({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),qt=function e(t){var U,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,we=(U=/[^.]+$/.exec(_e&&_e.keys&&_e.keys.IE_PROTO||""))?"Symbol(src)_1."+U:"",Se=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),wn=Do(gn),Sn=Be?Be.prototype:void 0,Nn=Sn?Sn.valueOf:void 0,In=Sn?Sn.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?St(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 w:case S: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=Se.call(e);return r&&(t?e[Zt]=n:delete e[Zt]),i}(e):function(e){return Se.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),w=(C=C==o?v:C)==v,S=(O=O==o?v:O)==v,N=C==O;if(N&&Bl(e)){if(!Bl(t))return!1;d=!0,w=!1}if(N&&!w)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=w&&Ce.call(e,"__wrapped__"),D=S&&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,we&&we 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 wr(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 Sr(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 wi(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 Si(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:wi(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,w=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&&(w=p||wi(w)),w.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=wi(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=wi(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=wi(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 wn: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 wo,So,No=(wo=wl(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===So.size&&So.clear(),e}),So=wo.cache,wo);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}),St(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=Si(xo),al=Si(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 wl(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(wl.Cache||Mn),r}function Sl(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)}}wl.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(Sr),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(wa,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=Se.call(t)),e[t]=n},Ha(Za)),ya=Di(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Se.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):wr(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)}),wa=yi(function(e,t,n,r){Tr(e,t,n,r)}),Sa=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=wl,Dn.merge=Oa,Dn.mergeWith=wa,Dn.method=$a,Dn.methodOf=Ya,Dn.mixin=Ka,Dn.negate=Sl,Dn.nthArg=function(e){return e=ia(e),Ur(function(t){return Ar(t,e)})},Dn.omit=Sa,Dn.omitBy=function(e,t){return Ia(e,Sl($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,Sl($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))&&k.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!wr(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,Sr):void 0},Dn.minBy=function(e,t){return e&&e.length?rr(e,$i(t,2),Sr):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:wr(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?wt(e,Za):0},Dn.sumBy=function(e,t){return e&&e.length?wt(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=St(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))&&M.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(Sl($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(U)});const j=["digit-ui","works-ui","workbench-ui","health-ui","sanitation-ui","core-ui","mgramseva-web"],F=(e,t)=>{const n=Object.keys(e).map(n=>{var r,i,o;return(null===(r=e[n])||void 0===r||null===(i=r.item)||void 0===i||null===(o=i.path)||void 0===o?void 0:o.split(t?t+"."+n:"."+n))||F(e[n],n)});return null==n?void 0:n[0]},V=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]},z=e=>{let{data:o}=e;const{t:l}=i.useTranslation(),c=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 t in e){const n=e[t];if("item"===t&&""!==(null==n?void 0:n.leftIcon))return{isDynamic:n.leftIcon.split(":")[0],leftIconArray:n.leftIcon.split(":")[1]};if("object"==typeof e[t]&&!Array.isArray(e[t])){const n=b(e[t]);if(n)return n}}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)&&V(null==e||null===(n=e.item)||void 0===n?void 0:n.path)||V(null===(r=F(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],w="item"===Object.keys(O)[0],S=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(!w&&O&&Object.keys(O).length>0){const{leftIconArray:e,isDynamic:n}=b(O)||{};let c=_[e]||_.collections;var A;"dynamic"===n&&(c=(R=null===(A=require("@egovernments/digit-ui-react-components"))||void 0===A?void 0:A[e])?r.createElement(R,null):c);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||S?null:t),p(null)},style:{display:"flex",flexDirection:"row",width:"100%"}},i&&r.createElement("div",{className:"link-icon"},c),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(u,{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":"")+" "},S?r.createElement(t.ArrowVectorDown,{height:"28px",width:"28px"}):r.createElement(t.ArrowForward,null))),E&&r.createElement("div",{style:{width:"100%"}},S&&C(O,N,!1,o+1)))}if(w){const{leftIconArray:e,isDynamic:t}=b(O)||{};let s=_[e]||_.collections;var L,R;return"dynamic"===t&&(s=(R=null===(L=require("@egovernments/digit-ui-react-components"))||void 0===L?void 0:L[e])?r.createElement(R,null):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!=j&&j.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)}(c,""+(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(u,{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))},W=function(e,t){return void 0===e&&(e=""),void 0===t&&(t=""),e.toLowerCase().includes(t.toLowerCase())},H=()=>{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]?(Array.isArray(e[n])||(e[n]=[e[n]]),e[n].push(t[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(W(c("ACTION_TEST_"+(null==i||null===(r=i.toUpperCase())||void 0===r?void 0:r.replace(/[ -]/g,"_"))),a)||W(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(z,{data:e=n})})(v)):""},G=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(k,{isOpen:n,isMobile:!0,toggleSidebar:i,onLogout:o,linkData:c,islinkDataLoading:s}):!l&&null!=a&&a.access_token?r.createElement(H,{mobileView:l,userDetails:a,modules:u}):r.createElement(k,{isOpen:n,isMobile:!0,toggleSidebar:i,onLogout:o,isEmployee:!0})},q=e=>{let{t:i,stateInfo:o,userDetails:l,CITIZEN:u,cityDetails:c,mobileView:s,handleUserDropdownSelection:d,logoUrl:f,showSidebar:m=!0,showLanguageChange:v,linkData:p,islinkDataLoading:g}=e;const[h,E]=n.useState(!1),y=a.useHistory(),[_,b]=n.useState(!1),C=()=>{E(!1),b(!0)},w=()=>{b(!1)},S=[{name:i("EDIT_PROFILE"),icon:r.createElement(t.EditPencilIcon,{className:"icon"}),func:()=>{var e;y.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/user/profile")}},{name:i("CORE_COMMON_LOGOUT"),icon:r.createElement(t.LogoutIcon,{className:"icon"}),func:C}];return r.createElement(r.Fragment,null,r.createElement(O,{t:i,stateInfo:o,toggleSidebar:E,isSidebarOpen:h,handleLogout:C,userDetails:l,CITIZEN:u,cityDetails:c,mobileView:s,userOptions:S,handleUserDropdownSelection:d,logoUrl:f,showLanguageChange:v}),_&&r.createElement(A,{onSelect:()=>{Digit.UserService.logout(),b(!1)},onCancel:w,onDismiss:w}),m&&r.createElement(G,{t:i,CITIZEN:u,isSidebarOpen:h,toggleSidebar:E,handleLogout:C,mobileView:s,userDetails:l,linkData:p,islinkDataLoading:g}))},Z=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"}))},X=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(Z,{key:"faq_"+t,question:e.question,answer:e.answer,lastIndex:t===(null==m?void 0:m.length)-1})))))},$=()=>{var e,n,o,l,u,c,s,d,f,m,v,p,g,h,E,y,_,b,C,O,w,S,I;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===(w=V.props)||void 0===w||null===(S=w[3])||void 0===S?void 0:S.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,N({style:{marginTop:"-30px"}},$)),r.createElement(t.CardBasedOptions,N({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===(I=H.sideOption)||void 0===I?void 0:I.name))),r.createElement(t.WhatsNewCard,null==M?void 0:M[0])):null))},Y=()=>{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:"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)))},K=()=>{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:"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,N({},g,{placeholder:e("COMMON_TABLE_SEARCH")})),f?r.createElement(t.CardLabelError,null,e("CS_COMMON_LOCATION_SELECTION_ERROR")):null))},J=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{Q(r,1,e(this.v))}catch(e){Q(r,2,e)}return r}return this}return this.o=function(e){try{const i=e.v;1&e.s?Q(r,1,t?t(i):i):n?Q(r,1,n(i)):Q(r,2,i)}catch(e){Q(r,2,e)}},r},e}();function Q(e,t,n){if(!e.s){if(n instanceof J){if(!n.s)return void(n.o=Q.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(Q.bind(null,e,t),Q.bind(null,e,2));e.s=t,e.v=n;const r=e.o;r&&r(e)}}function ee(e){return e instanceof J&&1&e.s}const te="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function ne(e,t,n){if("function"==typeof e[te]){var r,i,o,l=e[te]();if(function e(a){try{for(;!((r=l.next()).done||n&&n());)if((a=t(r.value))&&a.then){if(!ee(a))return void a.then(e,o||(o=Q.bind(null,i=new J,2)));a=a.v}i?Q(i,1,a):i=a}catch(e){Q(i||(i=new J),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(!ee(a))return void a.then(l,i||(i=Q.bind(null,r=new J,2)));a=a.v}r?Q(r,1,a):r=a}catch(e){Q(r||(r=new J),2,e)}}(),r}(u,function(e){return t(u[e])},n)}function re(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}function ie(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=re(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 oe=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(),w=(null===(o=Digit.UserService.getUser())||void 0===o?void 0:o.info)||{},[S,I]=n.useState(null),[D,T]=n.useState(null!=w&&w.name?w.name:""),[A,L]=n.useState(null!=w&&w.emailId?w.emailId:""),[R,x]=n.useState(null==S?void 0:S.gender),[P,M]=n.useState(null!=w&&w.permanentCity?w.permanentCity:y.name),[k,U]=n.useState(null!=w&&w.mobileNumber?w.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,te]=n.useState(!1),[ne,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;te(!0),function(){try{const e=null==w?void 0:w.uuid,t=function(){if(e)return Promise.resolve(Digit.UserService.userSearch(O,{uuid:[e]},{})).then(function(e){e&&e.user&&e.user.length&&I(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==S?void 0:S.gender,value:null==S?void 0:S.gender});const t=null==S||null===(e=S.photo)||void 0===e?void 0:e.split(",");V(null==t?void 0:t.at(0)),te(!1)},[null!==S]);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==w?void 0:w.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;te(!1)}te(!0);const n=re(function(){const e={...w,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==w?void 0:w.userName,confirmPassword:Y};return function(){if(X===Y)return re(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?"8px":"24px"}},"citizen"===E?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:ne<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,N({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),disable:!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,N({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")},{disable:!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(t.Dropdown,{style:{width:"100%"},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,N({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")},{disable:!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),disable:!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",null,r.createElement("a",{style:{color:"orange",cursor:"default",marginBottom:"5",cursor:"pointer"},onClick:()=>G(!H)},_("CORE_COMMON_CHANGE_PASSWORD")),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},disable:!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},disable:!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},disable:!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?r.createElement("div",{className:"action-bar-wrap"},r.createElement(t.SubmitBar,{t:_,label:_("CORE_COMMON_SAVE"),onSubmit:pe})):"",J&&r.createElement(t.Toast,{error:"error"===J.key,label:_("success"===J.key?"CORE_COMMON_PROFILE_UPDATE_SUCCESS":J.action),onClose:()=>Q(null),style:{maxWidth:"670px"}}),1==z?r.createElement(ie,{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}):"")},le=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()),d=Digit.SessionStorage.get("initData").stateInfo,f=Digit.StoreData.getCurrentLanguage(),[m,v]=n.useState(f),[p,g]=n.useState(!1),[h,E]=n.useState(""),y=()=>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:_,data:b}=Digit.Hooks.useGetHowItWorksJSON(Digit.ULBService.getStateId()),C=null==b||null===(l=b.MdmsRes["common-masters"])||void 0===l||null===(a=l.howItWorks[0])||void 0===a?void 0:a[""+u];return _?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,s(C.screenHeader?C.screenHeader:"HOW_IT_WORKS"))),r.createElement("div",{className:"language-selector",style:{margin:"10px"}},[{label:"ENGLISH",value:"en_IN"},{label:"हिंदी",value:"hi_IN"}].map((e,n)=>r.createElement("div",{className:"language-button-container",key:n},r.createElement(t.CustomButton,{selected:e.value===m,text:e.label,onClick:()=>(e=>{v(e.value),Digit.LocalizationService.changeLanguage(e.value,d.code)})(e)})))),C.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,E("hi_IN"===m?t.hi_IN:t.en_IN),void g(!0);var t}},r.createElement("div",{className:"vid-svg"},r.createElement(y,null))),r.createElement("div",{className:"how-it-works-header-description"},r.createElement("h2",null,s(e.headerLabel)),r.createElement("p",null,s(e.description)))))),C.pdfHeader&&C.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,s(C.pdfHeader)),r.createElement("p",null,s(C.pdfDesc)))),r.createElement("div",{className:"download-icon"},r.createElement(t.DownloadImgIcon,null)))),p&&r.createElement("div",{className:"how-it-works-video-play"},r.createElement("div",{className:"close-button"},r.createElement(t.CloseSvg,{onClick:()=>{g(!1)}})),r.createElement("video",{width:500,height:500,controls:!0,autoPlay:!0},r.createElement("source",{src:h,type:"video/mp4"})))))},ae=[{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}}]}],ue=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})},ce=e=>{let{config:n,onSelect:i,t:o,isDisabled:l}=e;return r.createElement(t.FormStep,{config:n,onSelect:i,t:o,isDisabled:l})},se=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 de;const fe={type:"register"},me={type:"login"},ve="/"+(null===(de=window)||void 0===de?void 0:de.contextPath)+"/citizen",pe=(e,t)=>(null==e?void 0:e.from)||(null==t?void 0:t.from)||ve,ge=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),[w,S]=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&&(w&&(clearTimeout(w),S(null)),e=setTimeout(()=>{h("")},5e3),S(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)||ve;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(()=>ae.map(e=>{const t={};for(const n in e.texts)t[n]=s(e.texts[n]);return{...e,texts:t}},[ae])),P=()=>Digit.UserService.getType(),M=function(e){return Promise.resolve(re(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(ue,{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,...me}})).then(function(e){var n;let[r,i]=e;var o,l,a;if(!i)return R(!0),void m.replace(f+"/otp",{from:pe(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:pe(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,...fe}})).then(function(e){let[t,n]=e;if(!n)return R(!0),void m.replace(f+"/otp",{from:pe(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(se,{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,...fe}})).then(function(){});{const e=function(){if(c)return Promise.resolve(M({otp:{...t,...me}})).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(re(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(ve),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(ce,{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,...fe}})).then(function(e){let[t,n]=e;t?(D(!1),m.replace(f+"/otp",{from:pe(d.state,N)})):D(!1)})}catch(e){return Promise.reject(e)}},t:s,isDisabled:I})),g&&r.createElement(t.Toast,{error:!0,label:g,onClose:()=>h(null)}))))};var he=e=>e instanceof HTMLElement;const Ee={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"};var ye=e=>null==e;const _e=e=>"object"==typeof e;var be=e=>!ye(e)&&!Array.isArray(e)&&_e(e)&&!(e instanceof Date),Ce=e=>/^\w*$/.test(e),Oe=e=>e.filter(Boolean),we=e=>Oe(e.replace(/["|']/g,"").replace(/\[/g,".").replace(/\]/g,"").split("."));function Se(e,t,n){let r=-1;const i=Ce(t)?[t]:we(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=be(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}e[t]=o,e=e[t]}return e}var Ne=function(e,t){void 0===t&&(t={});for(const n in e)Ce(n)?t[n]=e[n]:Se(t,n,e[n]);return t},Ie=e=>void 0===e,De=function(e,t,n){void 0===e&&(e={});const r=Oe(t.split(/[,[\].]+?/)).reduce((e,t)=>ye(e)?e:e[t],e);return Ie(r)||r===e?Ie(e[t])?n:e[t]:r},Te=(e,t)=>{he(e)&&e.removeEventListener&&(e.removeEventListener("input",t),e.removeEventListener("change",t),e.removeEventListener("blur",t))};const Ae={isValid:!1,value:null};var Le=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.ref.checked?{isValid:!0,value:t.ref.value}:e,Ae):Ae,Re=e=>"radio"===e.type,xe=e=>"file"===e.type,Pe=e=>"checkbox"===e.type,Me=e=>"select-multiple"===e.type;const ke={value:!1,isValid:!1},Ue={value:!0,isValid:!0};var Be=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&&!Ie(r.value)?Ie(n)||""===n?Ue:{value:n,isValid:!0}:Ue:ke}return ke};function je(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 xe(n)?n.files:Re(n)?Le(o.options).value:Me(n)?(l=n.options,[...l].filter(e=>{let{selected:t}=e;return t}).map(e=>{let{value:t}=e;return t})):Pe(n)?Be(o.options).value:i?e:a?""===e?NaN:+e:u?n.valueAsDate:c?c(e):e}var l;if(n)return De(n.current,t)}function Fe(e){return!e||e instanceof HTMLElement&&e.nodeType!==Node.DOCUMENT_NODE&&Fe(e.parentNode)}var Ve=e=>be(e)&&!Object.keys(e).length,ze=e=>"boolean"==typeof e;function We(e,t){const n=Ce(t)?[t]:we(t),r=1==n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Ie(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&&(be(r)&&Ve(r)||Array.isArray(r)&&!r.filter(e=>be(e)&&!Ve(e)||ze(e)).length)&&(i?delete i[t]:delete e[t]),i=r}}return e}const He=(e,t)=>e&&e.ref===t;var Ge=e=>ye(e)||!_e(e);function qe(e,t){if(Ge(e)||Ge(t))return t;for(const n in t){const r=e[n],i=t[n];try{e[n]=be(r)&&be(i)||Array.isArray(r)&&Array.isArray(i)?qe(r,i):i}catch(e){}}return e}function Ze(e,t,r){if(Ge(e)||Ge(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((be(n)||Array.isArray(n))&&(be(e)||Array.isArray(e))?!Ze(n,e,r):n!==e)return!1}}}return!0}function Xe(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]=[],Xe(e[o][r],De(t[o]||{},r,[]),n[o][r],n[o],r)):Ze(De(t[o]||{},r),e[o][r])?Se(n[o]||{},r):n[o]=Object.assign(Object.assign({},n[o]),{[r]:!0});r&&!n.length&&delete r[i]}return n}var $e=e=>"string"==typeof e,Ye=(e,t,n,r,i)=>{const o={};for(const t in e.current)(Ie(i)||($e(i)?t.startsWith(i):Array.isArray(i)&&i.find(e=>t.startsWith(e))))&&(o[t]=je(e,t,void 0,r));return n?Ne(o):qe(t,Ne(o))},Ke=e=>e instanceof RegExp,Je=e=>be(e)&&!Ke(e)?e:{value:e,message:""},Qe=e=>"function"==typeof e,et=e=>$e(e)||n.isValidElement(e);function tt(e,t,n){if(void 0===n&&(n="validate"),et(e)||ze(e)&&!e)return{type:n,message:et(e)?e:"",ref:t}}var nt=(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})}):{},rt=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=Re(i),h=Pe(i),E=g||h,y=""===o,_=nt.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||ye(o))||ze(o)&&!o||h&&!Be(l).isValid||g&&!Le(l).isValid)){const{value:n,message:r}=et(a)?{value:!!a,message:a}:Je(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(!(ye(s)&&ye(d)||""===o)){let e,n;const r=Je(d),l=Je(s);if(isNaN(o)){const t=i.valueAsDate||new Date(o);$e(r.value)&&(e=t>new Date(r.value)),$e(l.value)&&(n=t<new Date(l.value))}else{const t=i.valueAsNumber||parseFloat(o);ye(r.value)||(e=t>r.value),ye(l.value)||(n=t<l.value)}if((e||n)&&(b(!!e,r.message,l.message,"max","min"),!t))return Promise.resolve(p)}if($e(o)&&!y&&(u||c)){const e=Je(u),n=Je(c),r=!ye(e.value)&&o.length>e.value,i=!ye(n.value)&&o.length<n.value;if((r||i)&&(b(r,e.message,n.message),!t))return Promise.resolve(p)}if($e(o)&&f&&!y){const{value:e,message:n}=Je(f);if(Ke(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=je(e,v,r,!1,!0),a=E&&l?l[0].ref:i;return Qe(m)?Promise.resolve(m(o)).then(function(e){const r=tt(e,a);if(r&&(p[v]=Object.assign(Object.assign({},r),_("validate",r.message)),!t))return n=!0,p}):function(){if(be(m)){let r=!1;function e(){if(!Ve(i)&&(p[v]=Object.assign({ref:a},i),!t))return n=!0,p}let i={};const l=ne(Object.entries(m),function(e){let[n,l]=e;if(Ve(i)||t)return Promise.resolve(l(o)).then(function(e){const r=tt(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 it=function(e,t,n){void 0===n&&(n=[]);for(const r in t){const i=e+(be(t)?"."+r:"["+r+"]");Ge(t[r])?n.push(i):it(i,t[r],n)}return n};var ot=(e,t,n,r,i)=>{let o=void 0;return n.add(t),Ve(e)||(o=De(e,t),(be(o)||Array.isArray(o))&&it(t,o).forEach(e=>n.add(e))),Ie(o)?i?r:De(r,t):o},lt=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)},at=e=>e.substring(0,e.indexOf("[")),ut=(e,t)=>[...e].some(e=>((e,t)=>RegExp(("^"+t+"([|.)\\d+").replace(/\[/g,"\\[").replace(/\]/g,"\\]")).test(e))(t,e)),ct="undefined"!=typeof window&&"undefined"!=typeof document;function st(e){var t;let n;if(Ge(e)||ct&&(e instanceof File||he(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,st(e.get(t)));return n}n=Array.isArray(e)?[]:{};for(const t in e)n[t]=st(e[t]);return n}var dt=e=>({isOnSubmit:!e||e===Ee.onSubmit,isOnBlur:e===Ee.onBlur,isOnChange:e===Ee.onChange,isOnAll:e===Ee.all,isOnTouch:e===Ee.onTouched}),ft=e=>Re(e)||Pe(e);const mt="undefined"==typeof window,vt=ct?"Proxy"in window:"undefined"!=typeof Proxy,pt=n.createContext(null);pt.displayName="RHFContext";const gt=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(pt);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:w}=o||a.control,S=!ut(O.current,t),N=()=>!Ie(De(w.current,t))&&S?De(w.current,t):Ie(i)?De(u.current,t):i,[I,D]=n.useState(N()),T=n.useRef(I),A=n.useRef({focus:()=>null}),L=n.useRef(l||(()=>{Qe(A.current.focus)&&A.current.focus(),"production"!==process.env.NODE_ENV&&(Qe(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=>!lt(Object.assign({isBlurEvent:e,isReValidateOnBlur:v,isReValidateOnChange:p,isSubmitted:h,isTouched:!!De(E,t)},m)),[v,p,h,E,t,m]),x=n.useCallback(e=>{let[t]=e;const n=(e=>Ge(e)||!be(e.target)||be(e.target)&&!e.type?e:Ie(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=Ie(De(u.current,t))),e&&S&&D(N())},[r,t,s]);n.useEffect(()=>()=>d(t),[t]),n.useEffect(()=>{"production"!==process.env.NODE_ENV&&(Ie(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)"),!S&&Ie(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&&!De(E,t)&&(Se(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:!!De(y,t)},{isDirty:{get:()=>!!De(g.dirtyFields,t)},isTouched:{get:()=>!!De(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},ht=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(gt,{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(gt,{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.SubmitBar,{style:{marginTop:o?"510px":"25px",marginLeft:o?"0":"-30px",maxWidth:o?"100%":"240px"},label:i("ES_COMMON_APPLY"),submit:!0})))},Et=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"})},w=()=>r.createElement("div",{className:"InboxMobilePopupCloseButtonWrapper",onClick:O},r.createElement(t.CloseSvg,null)),S={Controller:o,register:l,control:a,t:u,reset:c,previousPage:s},I=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(w,null),r.createElement("div",{className:"MobilePopupHeadingWrapper"},r.createElement("h2",null,u("PRIVACY_AUDIT_REPORT"),":")),r.createElement(ht,N({},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:"searchBox"},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(I,{onSubmit:e=>{C({type:"remove"}),v(e)},handleSubmit:d,id:"search-form",className:"rm-mb form-field-flex-one inboxPopupMobileWrapper",searchFormFieldsComponentProps:S,currentlyActiveMobileModal:b,closeMobilePopupModal:O,tenantId:f})):null,p&&r.createElement(t.Loader,null),r.createElement(t.DetailsCard,{data:D}))},yt=e=>{let{tenantId:i,t:o,onSubmit:l,data:a,count:u}=e;const c=Digit.SessionStorage.get("AUDIT_APPLICATION_DETAIL")||{offset:0,limit:5,sortOrder:"DESC"},{register:s,control:d,handleSubmit:f,setValue:m,getValues:v,reset:p}=function(e){let{mode:t=Ee.onSubmit,reValidateMode:r=Ee.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({}),w=n.useRef(o),S=n.useRef(i),N=n.useRef(new Set),I=n.useRef(dt(t)),{isOnSubmit:D,isOnTouch:T}=I.current,A=c===Ee.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:!vt,dirtyFields:!vt,touched:!vt||T,isValidating:!vt,isSubmitting:!vt,isValid:!vt}),P=n.useRef(L),M=n.useRef(),{isOnBlur:k,isOnChange:U}=n.useRef(dt(r)).current;w.current=o,S.current=i,P.current=L,C.current=u?{}:Ve(C.current)?st(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=Ie(r),a=De(t,n);return l&&!!a||!l&&!Ze(a,r,!0)||l&&De(o,n)&&!De(i,n)})({errors:P.current.errors,error:t,name:e,validFields:h.current,fieldsWithValidation:g.current});const l=De(P.current.errors,e);t?(We(h.current,e),o=o||!l||!Ze(l,t,!0),Se(P.current.errors,e,t)):((De(g.current,e)||S.current)&&(Se(h.current,e,!0),o=o||l),We(P.current.errors,e)),(o&&!ye(n)||!Ve(r)||x.current.isValidating)&&B(Object.assign(Object.assign(Object.assign({},r),S.current?{isValid:!!i}:{}),{isValidating:!1}))},[]),V=n.useCallback((e,t)=>{const{ref:n,options:r}=s.current[e],i=ct&&he(n)&&ye(t)?"":t;Re(n)?(r||[]).forEach(e=>{let{ref:t}=e;return t.checked=t.value===i}):xe(n)&&!$e(i)?n.files=i:Me(n)?[...n.options].forEach(e=>e.selected=i.includes(e.value)):Pe(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&&Se(n,e,t),!Ze(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=!Ze(De(E.current,e),je(s,e,C)),r=De(P.current.dirtyFields,e),i=P.current.isDirty;n?Se(P.current.dirtyFields,e,!0):We(P.current.dirtyFields,e);const o={isDirty:z(),dirtyFields:P.current.dirtyFields},l=x.current.isDirty&&i!==o.isDirty||x.current.dirtyFields&&r!==De(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(rt(s,A,s.current[e],C)).then(function(n){const r=n[e];return F(e,r,t),Ie(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(S.current(J(),w.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=De(n,e);return t?Se(P.current.errors,e,t):We(P.current.errors,e),!t}).every(Boolean);return B({isValid:Ve(n),isValidating:!1}),t}{const t=De(n,e);return F(e,t,r!==Ve(n),{},Ve(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(),S.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={};Se(o,e,t);for(const n of it(e,t))s.current[n]&&(V(n,De(o,n)),r&&W(n),i&&q(n))},[q,V,W]),X=n.useCallback((e,t,n)=>{if(!u&&!Ge(t)&&Se(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(!Ge(t)&&(Z(e,t,n),N.current.has(e))){const r=at(e)||e;Se(d.current,e,t),O.current[r]({[r]:De(d.current,r)}),(x.current.isDirty||x.current.dirtyFields)&&n.shouldDirty&&(Se(P.current.dirtyFields,e,((e,t,n)=>qe(Xe(e,t,n.slice(0,e.length)),Xe(t,e,n.slice(0,e.length))))(t,De(E.current,e,[]),De(P.current.dirtyFields,e,[]))),B({isDirty:!Ze(Object.assign(Object.assign({},J()),{[e]:t}),E.current)}))}!u&&Se(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(!Ve(v.current))for(const n in v.current)e&&v.current[n].size&&!v.current[n].has(e)&&!v.current[n].has(at(e))||(p.current[n](),t=!1);return t};function K(e){if(!u){let t=st(e);for(const e of N.current)Ce(e)&&!t[e]&&(t=Object.assign(Object.assign({},t),{[e]:[]}));return t}return e}function J(e){if($e(e))return je(s,e,C);if(Array.isArray(e)){const t={};for(const n of e)Se(t,n,je(s,n,C));return t}return K(Ye(s,st(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=lt(Object.assign({isBlurEvent:a,isReValidateOnChange:U,isReValidateOnBlur:k,isTouched:!!De(P.current.touched,e),isSubmitted:P.current.isSubmitted},I.current));let d=W(e,!1),f=!Ve(d)||!a&&$(e);if(a&&!De(P.current.touched,e)&&x.current.touched&&(Se(P.current.touched,e,!0),d=Object.assign(Object.assign({},d),{touched:P.current.touched})),!u&&Pe(n)&&Se(C.current,e,je(s,e)),c)return!a&&Y(e),(!Ve(d)||f&&Ve(d))&&B(d);j();const m=S.current?Promise.resolve(S.current(J(),w.current,A)).then(function(t){let{errors:r}=t;const l=P.current.isValid;if(i=De(r,e),Pe(n)&&!i&&S.current){const t=at(e),n=De(r,t,{});n.type&&n.message&&(i=n),t&&(n||De(P.current.errors,t))&&(e=t)}o=Ve(r),l!==o&&(f=!0)}):Promise.resolve(rt(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=Ve(s.current)?E.current:{};return Promise.resolve(S.current(Object.assign(Object.assign(Object.assign({},t),J()),e),w.current,A)).then(function(e){let{errors:t}=e;const n=Ve(t);P.current.isValid!==n&&B({isValid:n})})}catch(e){return Promise.reject(e)}},[A]),ee=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=je(e,a,r);!Ie(t)&&Se(r.current,a,t)}l.type&&u?Re(l)||Pe(l)?Array.isArray(u.options)&&u.options.length?(Oe(u.options).forEach(function(e,n){void 0===e&&(e={}),(Fe(e.ref)&&He(e,e.ref)||o)&&(Te(e.ref,t),We(u.options,"["+n+"]"))}),u.options&&!Oe(u.options).length&&delete e.current[a]):delete e.current[a]:(Fe(l)&&He(u,l)||o)&&(Te(l,t),delete e.current[a]):delete e.current[a]}(s,b.current,e,C,u,t),u&&(We(h.current,e.ref.name),We(g.current,e.ref.name))},[u]),te=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&&(ee(e,t),u&&!Oe(e.options||[]).length&&(We(P.current.errors,e.ref.name),Se(P.current.dirtyFields,e.ref.name,!0),B({isDirty:z()}),x.current.isValid&&S.current&&Q(),te(e.ref.name)))},[Q,ee]),ie=n.useCallback((e,t,n)=>{const r=n?v.current[n]:m.current;let i=Ye(s,st(C.current),u,!1,e);if($e(e)){const n=at(e)||e;return N.current.has(n)&&(i=Object.assign(Object.assign({},f.current),i)),ot(i,e,r,Ie(De(E.current,e))?t:De(E.current,e),!0)}const o=Ie(t)?E.current:t;return Array.isArray(e)?e.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:ot(i,t,r,o)}),{}):(_.current=Ie(n),Ne(!Ve(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=ft(e),c=ut(N.current,n),d=t=>ct&&(!he(e)||t===e);let f,m=l[n],v=!0;if(m&&(a?Array.isArray(m.options)&&Oe(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:[...Oe(m&&m.options||[]),{ref:e}],ref:{type:r,name:n}},t):Object.assign({},o):o,l[n]=m;const p=Ie(De(C.current,n));Ve(E.current)&&p||(f=De(p?E.current:C.current,n),v=Ie(f),v||c||V(n,f)),Ve(t)||(Se(g.current,n,!0),!D&&x.current.isValid&&rt(s,A,m,C).then(e=>{const t=P.current.isValid;Ve(e)?Se(h.current,n,!0):We(h.current,n),t!==Ve(e)&&B()})),!u||c&&v||!c&&We(P.current.dirtyFields,n),r&&function(e,t,n){let{ref:r}=e;he(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(Ye(s,st(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(Ve(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(De(t,n)){const t=e[n];if(t){if(t.ref.focus&&Ie(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=S.current?Promise.resolve(S.current(i,w.current,A)).then(function(e){let{errors:t,values:n}=e;P.current.errors=r=t,i=n}):ne(Object.values(s.current),function(e){const t=function(){if(e){const{name:t}=e.ref;return Promise.resolve(rt(s,A,e,C)).then(function(e){e[t]?(Se(r,t,e[t]),We(h.current,t)):De(g.current,t)&&(We(P.current.errors,t),Se(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:Ve(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||!ct?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&&Fe(e.ref)&&t(n);else n&&Fe(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=Ze(h.current,g.current)&&Ve(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(!mt)if($e(e))oe({name:e},t);else{if(!be(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:vt?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:te,shouldUnregister:u,updateFormState:B,removeFieldEventListener:ee,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,te,u,ee,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={}),ct)for(const e of Object.values(s.current))if(e){const{ref:t,options:n}=e,r=ft(t)&&Array.isArray(n)?n[0].ref:t;if(he(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=>Qe(e)&&e()),C.current=u?{}:st(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]&&Ce(e)?delete P.current.errors[e]:We(P.current.errors,e)),B({errors:e?P.current.errors:{}})},[]),setError:n.useCallback(function(e,t){const n=(s.current[e]||{}).ref;Se(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:c}),g=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()},h=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},[E,y]=n.useState([]),_=e=>r.createElement("div",{onClick:e.onClick},r.createElement(t.DownloadBtnCommon,null));n.useEffect(()=>{s("offset",0),s("limit",5),s("sortOrder","DESC")},[s]),n.useEffect(()=>{(null==a?void 0:a.length)>0&&y([null==a?void 0:a.map(e=>{let t={};return t[o("AUDIT_DATE_LABEL")]=g(null==e?void 0:e.timestamp),t[o("AUDIT_TIME_LABEL")]=h(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 b=n.useCallback(e=>{0!==e.length&&(m("sortBy",e.id),m("sortOrder",e.desc?"DESC":"ASC"))},[]);function C(){m("offset",v("offset")-v("limit")),f(l)()}const O=window.Digit.Utils.browser.isMobile();if(O)return r.createElement(Et,{Controller:gt,register:s,control:d,t:o,reset:p,previousPage:C,handleSubmit:f,tenantId:i,data:a,onSubmit:l});const w=e=>r.createElement("span",{className:"cell-text"},e),S=n.useMemo(()=>[{Header:o("AUDIT_DATE_LABEL"),disableSortBy:!0,accessor:e=>{const t="NA"===e.timestamp?o("WS_NA"):g(e.timestamp);return w(""+t)}},{Header:o("AUDIT_TIME_LABEL"),disableSortBy:!0,accessor:e=>{const t="NA"===e.timestamp?o("WS_NA"):h(e.timestamp);return w(""+t)}},{Header:o(O?"AUDIT_DATAVIEWED_LABEL":"AUDIT_DATAVIEWED_PRIVACY"),disableSortBy:!0,accessor:e=>w(""+(null==e?void 0:e.dataView))},{Header:o(O?"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:f},r.createElement(ht,{register:s,control:d,reset:p,tenantId:i,t:o,previousPage:C})),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(_,{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")})(E)})),r.createElement(t.Table,{t:o,data:a,totalRecords:u,columns:S,getCellProps:e=>({style:{minWidth:e.column.Header===o("ES_INBOX_APPLICATION_NO")?"240px":"",padding:"20px 18px",fontSize:"16px"}}),onPageSizeChange:function(e){m("limit",Number(e.target.value)),f(l)()},currentPage:v("offset")/v("limit"),onNextPage:function(){m("offset",v("offset")+v("limit")),f(l)()},onPrevPage:C,manualPagination:!1,pageSizeLimit:v("limit"),onSort:b,disableSort:!1,sortParams:[{id:v("sortBy"),desc:"DESC"===v("sortOrder")}]})):r.createElement(t.Loader,null)))},_t=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(yt,{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})},bt=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:w}=Digit.Hooks.useStaticData(Digit.ULBService.getStateId()),{isLoading:S,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==w||null===(n=w.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||S?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 Ct,Ot,wt,St,Nt;const It=[(null===(Ct=window)||void 0===Ct?void 0:Ct.contextPath)+"/citizen/register/name","/"+(null===(Ot=window)||void 0===Ot?void 0:Ot.contextPath)+"/citizen/select-language","/"+(null===(wt=window)||void 0===wt?void 0:wt.contextPath)+"/citizen/select-location","/"+(null===(St=window)||void 0===St?void 0:St.contextPath)+"/citizen/login","/"+(null===(Nt=window)||void 0===Nt?void 0:Nt.contextPath)+"/citizen/register/otp"],Dt=(e,t)=>t.filter(t=>e.map(e=>e.code).includes(t.code)),Tt=e=>{var n,o,l;let{stateInfo:u,userDetails:c,CITIZEN:s,cityDetails:d,mobileView:m,handleUserDropdownSelection:g,logoUrl:h,stateCode:y,modules:_,appTenants:b,pathname:C,initData:O}=e;const{isLoading:w,data:S,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(),L=It.some(e=>window.location.href.includes(e)),R=_.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:y,moduleCode:n,userType:"citizen",tenants:Dt(i,b)})):null}),P=_.map((e,n)=>{let{code:i,bannerImage:o}=e,l=(Digit.ComponentRegistryService.getComponent(i+"Links"),N?p(S,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(bt,{moduleCode:null==i?void 0:i.toUpperCase()}))),r.createElement(a.Route,{key:"faq"+n,path:T+"/"+i.toLowerCase()+"-faq"},r.createElement(X,{module:null==i?void 0:i.toUpperCase()})),r.createElement(a.Route,{key:"hiw"+n,path:T+"/"+i.toLowerCase()+"-how-it-works"},r.createElement(le,{module:null==i?void 0:i.toUpperCase()})))});return r.createElement("div",{className:I},r.createElement(q,{t:D,stateInfo:u,userDetails:c,CITIZEN:s,cityDetails:d,mobileView:m,handleUserDropdownSelection:g,logoUrl:h,showSidebar:!0,linkData:S,islinkDataLoading:w}),r.createElement("div",{className:"main center-container citizen-home-container mb-25"},L?null:r.createElement("div",{className:"SideBarStatic"},r.createElement(x,{linkData:S,islinkDataLoading:w})),r.createElement(a.Switch,null,r.createElement(a.Route,{exact:!0,path:T},r.createElement($,null)),r.createElement(a.Route,{exact:!0,path:T+"/select-language"},r.createElement(Y,null)),r.createElement(a.Route,{exact:!0,path:T+"/select-location"},r.createElement(K,null)),r.createElement(a.Route,{path:T+"/error"},r.createElement(f,{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(E,{userType:"citizen",modules:_,getCitizenMenu:S,fetchedCitizen:N,isLoading:w})),r.createElement(a.Route,{path:T+"/login"},r.createElement(ge,{stateCode:y})),r.createElement(a.Route,{path:T+"/register"},r.createElement(ge,{stateCode:y,isUserRegistered:!1})),r.createElement(a.Route,{path:T+"/user/profile"},r.createElement(oe,{stateCode:y,userType:"citizen",cityDetails:d})),r.createElement(a.Route,{path:T+"/Audit"},r.createElement(_t,null)),r.createElement(v,{initData:O},R,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 At="function"==typeof Symbol&&Symbol.for,Lt=At?Symbol.for("react.element"):60103,Rt=At?Symbol.for("react.portal"):60106,xt=At?Symbol.for("react.fragment"):60107,Pt=At?Symbol.for("react.strict_mode"):60108,Mt=At?Symbol.for("react.profiler"):60114,kt=At?Symbol.for("react.provider"):60109,Ut=At?Symbol.for("react.context"):60110,Bt=At?Symbol.for("react.async_mode"):60111,jt=At?Symbol.for("react.concurrent_mode"):60111,Ft=At?Symbol.for("react.forward_ref"):60112,Vt=At?Symbol.for("react.suspense"):60113,zt=At?Symbol.for("react.suspense_list"):60120,Wt=At?Symbol.for("react.memo"):60115,Ht=At?Symbol.for("react.lazy"):60116,Gt=At?Symbol.for("react.block"):60121,qt=At?Symbol.for("react.fundamental"):60117,Zt=At?Symbol.for("react.responder"):60118,Xt=At?Symbol.for("react.scope"):60119;function $t(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case Lt:switch(e=e.type){case Bt:case jt:case xt:case Mt:case Pt:case Vt:return e;default:switch(e=e&&e.$$typeof){case Ut:case Ft:case Ht:case Wt:case kt:return e;default:return t}}case Rt:return t}}}function Yt(e){return $t(e)===jt}var Kt={AsyncMode:Bt,ConcurrentMode:jt,ContextConsumer:Ut,ContextProvider:kt,Element:Lt,ForwardRef:Ft,Fragment:xt,Lazy:Ht,Memo:Wt,Portal:Rt,Profiler:Mt,StrictMode:Pt,Suspense:Vt,isAsyncMode:function(e){return Yt(e)||$t(e)===Bt},isConcurrentMode:Yt,isContextConsumer:function(e){return $t(e)===Ut},isContextProvider:function(e){return $t(e)===kt},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===Lt},isForwardRef:function(e){return $t(e)===Ft},isFragment:function(e){return $t(e)===xt},isLazy:function(e){return $t(e)===Ht},isMemo:function(e){return $t(e)===Wt},isPortal:function(e){return $t(e)===Rt},isProfiler:function(e){return $t(e)===Mt},isStrictMode:function(e){return $t(e)===Pt},isSuspense:function(e){return $t(e)===Vt},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===xt||e===jt||e===Mt||e===Pt||e===Vt||e===zt||"object"==typeof e&&null!==e&&(e.$$typeof===Ht||e.$$typeof===Wt||e.$$typeof===kt||e.$$typeof===Ut||e.$$typeof===Ft||e.$$typeof===qt||e.$$typeof===Zt||e.$$typeof===Xt||e.$$typeof===Gt)},typeOf:$t},Jt=B(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,w=n,S=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=w,t.ForwardRef=S,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=_}()}),Qt=B(function(e){e.exports="production"===process.env.NODE_ENV?Kt:Jt}),en=Object.getOwnPropertySymbols,tn=Object.prototype.hasOwnProperty,nn=Object.prototype.propertyIsEnumerable;function rn(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var on=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=rn(e),o=1;o<arguments.length;o++){for(var l in n=Object(arguments[o]))tn.call(n,l)&&(i[l]=n[l]);if(en){r=en(n);for(var a=0;a<r.length;a++)nn.call(n,r[a])&&(i[r[a]]=n[r[a]])}}return i},ln="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",an=Function.call.bind(Object.prototype.hasOwnProperty),un=function(){};if("production"!==process.env.NODE_ENV){var cn=ln,sn={},dn=an;un=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function fn(e,t,n,r,i){if("production"!==process.env.NODE_ENV)for(var o in e)if(dn(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,cn)}catch(e){l=e}if(!l||l instanceof Error||un((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 sn)){sn[l.message]=!0;var u=i?i():"";un("Failed "+n+" type: "+l.message+(null!=u?u:""))}}}fn.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(sn={})};var mn=fn,vn=function(){};function pn(){return null}function gn(){}function hn(){}"production"!==process.env.NODE_ENV&&(vn=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),hn.resetWarningCache=gn;var En=B(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(pn),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+"]",ln);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 Qt.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(an(a,c)){var d=e(a,c,r,i,l+"."+c,ln);if(d instanceof Error)return d}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&vn(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."),pn;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&&vn("Invalid argument supplied to oneOfType, expected an instance of array."),pn;for(var t=0;t<e.length;t++){var n=e[t];if("function"!=typeof n)return vn("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+f(n)+" at index "+t+"."),pn}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,ln);if(null==c)return null;c.data&&an(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,ln);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=on({},t[n],e);for(var m in f){var v=e[m];if(an(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,ln);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!==ln){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=mn,r.resetWarningCache=mn.resetWarningCache,r.PropTypes=r,r}(Qt.isElement):function(){function e(e,t,n,r,i,o){if(o!==ln){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:hn,resetWarningCache:gn};return n.PropTypes=n,n}()});const yn=e=>{let{children:t}=e;return r.createElement("div",{className:"banner banner-container"},t)},_n=()=>{const{data:e,isLoading:n}=Digit.Hooks.useStore.getInitData(),{stateInfo:o}=e||{},{t:l}=i.useTranslation();return n?r.createElement(t.Loader,null):r.createElement("div",{className:"bannerHeader"},r.createElement("img",{className:"bannerLogo",src:null==o?void 0:o.logoUrl}),r.createElement("p",null,l("TENANT_TENANTS_"+(null==o?void 0:o.code.toUpperCase()))))},bn=e=>{var i,o,l;let{config:u,t:c}=e;const[s,d]=n.useState(null),{mobile_number:f,tenantId:m}=Digit.Hooks.useQueryParams(),v=a.useHistory(),[p,g]=n.useState(""),[h,E]=n.useState(!0),[y,_]=n.useState(null),b=()=>Digit.UserService.getType();n.useEffect(()=>{var e,t;if(!s)return void Digit.UserService.setType("employee");Digit.UserService.setUser(s);const n=(null===(e=location.state)||void 0===e?void 0:e.from)||"/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/employee";v.replace(n)},[s]);const C=()=>{_(null)},[O,w,S]=u.inputs,N=[{body:[{label:c(O.label),type:O.type,populators:{name:O.name},isMandatory:!0},{label:c(w.label),type:w.type,populators:{name:w.name},isMandatory:!0},{label:c(S.label),type:S.type,populators:{name:S.name},isMandatory:!0}]}];return r.createElement(yn,null,r.createElement("div",{className:"employeeBackbuttonAlign"},r.createElement(t.BackButton,{variant:"white",style:{borderBottom:"none"}})),r.createElement(t.FormComposer,{onSubmit:function(e){try{return Promise.resolve(re(function(){if(e.newPassword!==e.confirmPassword)return _(c("ERR_PASSWORD_DO_NOT_MATCH"));const t={...e,otpReference:p,tenantId:m,type:b().toUpperCase()};return Promise.resolve(Digit.UserService.changePassword(t,m)).then(function(e){(()=>{var e;v.replace("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/user/login")})()})},function(e){var t,n,r,i,o;_((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)||c("ES_SOMETHING_WRONG")),setTimeout(C,5e3)}))}catch(e){return Promise.reject(e)}},noBoxShadow:!0,inline:!0,submitInForm:!0,config:N,label:u.texts.submitButtonLabel,cardStyle:{maxWidth:"408px",margin:"auto"},className:"employeeChangePassword"},r.createElement(_n,null),r.createElement(t.CardSubHeader,{style:{textAlign:"center"}}," ",u.texts.header," "),r.createElement(t.CardText,null,c("CS_LOGIN_OTP_TEXT")+" ",r.createElement("b",null," ",""+c("+ 91 - ")," ",f)),r.createElement(se,{t:c,userType:"employee",otp:p,onOtpChange:g,error:h,onResend:function(){try{function e(){setTimeout(C,5e3)}const t={otp:{mobileNumber:f,userType:b().toUpperCase(),type:"passwordreset",tenantId:m}},n=re(function(){return Promise.resolve(Digit.UserService.sendOtp(t,m)).then(function(){_(c("ES_OTP_RESEND"))})},function(e){var t,n;_((null==e||null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.error_description)||c("ES_INVALID_LOGIN_CREDENTIALS"))});return Promise.resolve(n&&n.then?n.then(e):e())}catch(e){return Promise.reject(e)}}})),y&&r.createElement(t.Toast,{error:!0,label:c(y),onClose:C}),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()}})," "))};bn.propTypes={loginParams:En.any},bn.defaultProps={loginParams:null};const Cn=[{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"}]}],On=()=>{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(bn,{config:o[0],t:e})))},wn=[{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"}]}],Sn=e=>{var i,o,l;let{config:u,t:c}=e;const{data:s,isLoading:d}=Digit.Hooks.useTenants(),[f,m]=n.useState(null),v=a.useHistory(),[p,g]=n.useState(null);n.useEffect(()=>{var e,t;if(!f)return void Digit.UserService.setType("employee");Digit.UserService.setUser(f);const n=(null===(e=location.state)||void 0===e?void 0:e.from)||"/"+(null===(t=window)||void 0===t?void 0:t.contextPath)+"/employee";v.replace(n)},[f]);const h=()=>{g(null)},[E,y]=u.inputs,_=[{body:[{label:c(E.label),type:E.type,populators:{name:E.name,componentInFront:"+91"},isMandatory:!0},{label:c(y.label),type:y.type,populators:{name:y.name,customProps:{},component:(e,n)=>r.createElement(t.Dropdown,N({option:s,optionKey:"name",id:y.name,className:"login-city-dd",select:t=>{e.onChange(t)}},n))},isMandatory:!0}]}];return d?r.createElement(t.Loader,null):r.createElement(yn,null,r.createElement("div",{className:"employeeBackbuttonAlign"},r.createElement(t.BackButton,{variant:"white",style:{borderBottom:"none"}})),r.createElement(t.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=re(function(){return Promise.resolve(Digit.UserService.sendOtp(t,e.city.code)).then(function(){var t;v.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;g((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(h,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:_,label:u.texts.submitButtonLabel,secondaryActionLabel:u.texts.secondaryButtonLabel,onSecondayActionClick:()=>{var e;v.replace("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/login")},heading:u.texts.header,description:u.texts.description,headingStyle:{textAlign:"center"},cardStyle:{maxWidth:"408px",margin:"auto"},className:"employeeForgotPassword"},r.createElement(_n,null)),p&&r.createElement(t.Toast,{error:!0,label:c(p),onClose:h}),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()}})," "))};Sn.propTypes={loginParams:En.any},Sn.defaultProps={loginParams:null};const Nn=()=>{const{t:e}=i.useTranslation(),{path:t}=a.useRouteMatch(),o=n.useMemo(()=>wn.map(t=>{const n={};for(const r in t.texts)n[r]=e(t.texts[r]);return{...t,texts:n}},[wn]));return r.createElement(a.Switch,null,r.createElement(a.Route,{path:""+t,exact:!0},r.createElement(Sn,{config:o[0],t:e})))},In=(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)}),Dn=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:In(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"},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(Nn,null)),r.createElement(a.Route,{path:c+"/change-password"},r.createElement(On,null)),r.createElement(a.Route,null,r.createElement(E,{userType:i,modules:o,additionalComponent:u}))))},Tn=()=>{var e,o,l;const{data:u,isLoading:c}=Digit.Hooks.useStore.getInitData(),{t:s}=i.useTranslation(),d=a.useHistory(),{languages:f,stateInfo:m}=u||{},v=Digit.StoreData.getCurrentLanguage(),[p,g]=n.useState(v);return c?null:r.createElement(yn,null,r.createElement(t.Card,{className:"bannerCard removeBottomMargin"},r.createElement("div",{className:"bannerHeader"},r.createElement("img",{className:"bannerLogo",src:null==m?void 0:m.logoUrl,alt:"Digit"}),r.createElement("p",null,s("TENANT_TENANTS_"+(null==m?void 0:m.code.toUpperCase())))),r.createElement("div",{className:"language-selector",style:{justifyContent:"space-around",marginBottom:"24px",padding:"0 5%"}},f.map((e,n)=>r.createElement("div",{className:"language-button-container",key:n},r.createElement(t.CustomButton,{selected:e.value===p,text:e.label,onClick:()=>(e=>{g(e.value),Digit.LocalizationService.changeLanguage(e.value,m.code)})(e)})))),r.createElement(t.SubmitBar,{style:{width:"100%"},label:s("CORE_COMMON_CONTINUE"),onSubmit:e=>{var t;d.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===(e=window)||void 0===e||null===(o=e.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()}})," "))},An=[{texts:{header:"CORE_COMMON_LOGIN",submitButtonLabel:"CORE_COMMON_CONTINUE",secondaryButtonLabel:"CORE_COMMON_FORGOT_PASSWORD"},inputs:[{label:"CORE_LOGIN_USERNAME",type:"text",populators:{name:"username"},isMandatory:!0},{label:"CORE_LOGIN_PASSWORD",type:"password",populators:{name:"password"},isMandatory:!0},{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)}))}"}}}]}],Ln=e=>{var i,o,l,u,c,s,d,f,m,v;let{config:p,t:g,isDisabled:h}=e;const{isLoading:E}=Digit.Hooks.useTenants(),{isLoading:y}=Digit.Hooks.useStore.getInitData(),[_,b]=n.useState(null),[C,O]=n.useState(null),[w,S]=n.useState(!1),N=a.useHistory();n.useEffect(()=>{var e,t,n,r,i,o,l,a,u,c,s,d,f,m,v,p,g,h;if(!_)return;Digit.SessionStorage.set("citizen.userRequestObject",_);const E=null==_||null===(e=_.info)||void 0===e||null===(t=e.roles)||void 0===t?void 0:t.filter(e=>e.tenantId===Digit.SessionStorage.get("Employee.tenantId"));(null==_||null===(n=_.info)||void 0===n||null===(r=n.roles)||void 0===r?void 0:r.length)>0&&(_.info.roles=E),Digit.UserService.setUser(_),((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==_?void 0:_.info,null==_?void 0:_.access_token);let y="/"+(null===(i=window)||void 0===i?void 0:i.contextPath)+"/employee";var b,C,O,w,S,I,D;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===(b=window)||void 0===b||null===(C=b.location)||void 0===C||null===(O=C.href)||void 0===O||null===(w=O.split("from="))||void 0===w?void 0:w[1])||"/"+(null===(S=window)||void 0===S?void 0:S.contextPath)+"/employee"),null!=_&&null!==(u=_.info)&&void 0!==u&&u.roles&&(null==_||null===(c=_.info)||void 0===c||null===(s=c.roles)||void 0===s?void 0:s.length)>0&&null!=_&&null!==(d=_.info)&&void 0!==d&&null!==(f=d.roles)&&void 0!==f&&f.every(e=>"NATADMIN"===e.code)&&(y="/"+(null===(I=window)||void 0===I?void 0:I.contextPath)+"/employee/dss/landing/NURT_DASHBOARD"),null!=_&&null!==(m=_.info)&&void 0!==m&&m.roles&&(null==_||null===(v=_.info)||void 0===v||null===(p=v.roles)||void 0===p?void 0:p.length)>0&&null!=_&&null!==(g=_.info)&&void 0!==g&&null!==(h=g.roles)&&void 0!==h&&h.every(e=>"STADMIN"===e.code)&&(y="/"+(null===(D=window)||void 0===D?void 0:D.contextPath)+"/employee/dss/landing/home"),N.replace(y)},[_]);const I=()=>{O(null)},D={code:Digit.ULBService.getStateId(),name:Digit.Utils.locale.getTransformedLocale("TENANT_TENANTS_"+Digit.ULBService.getStateId())};let T=[{body:null==p?void 0:p.inputs}];const{mode:A}=Digit.Hooks.useQueryParams();return"admin"===A&&0==(null==T||null===(i=T[0])||void 0===i||null===(o=i.body)||void 0===o||null===(l=o[2])||void 0===l?void 0:l.disable)&&null==(null==T||null===(u=T[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)&&(T[0].body[2].disable=!0,T[0].body[2].isMandatory=!1,T[0].body[2].populators.defaultValue=D),E||y?r.createElement(t.Loader,null):r.createElement(yn,null,r.createElement("div",{className:"employeeBackbuttonAlign"},r.createElement(t.BackButton,{variant:"white",style:{borderBottom:"none"}})),r.createElement(t.FormComposerV2,{onSubmit:function(e){try{var t;function n(){S(!1)}S(!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=re(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),b({info:t,...n})})},function(e){var t,n;O((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)&&g("ES_ERROR_USER_NOT_PERMITTED")||g("INVALID_LOGIN_CREDENTIALS")),setTimeout(I,5e3)});return Promise.resolve(i&&i.then?i.then(n):n())}catch(e){return Promise.reject(e)}},isDisabled:h||w,noBoxShadow:!0,inline:!0,submitInForm:!0,config:T,label:p.texts.submitButtonLabel,secondaryActionLabel:p.texts.secondaryButtonLabel,onSecondayActionClick:()=>{var e;N.push("/"+(null===(e=window)||void 0===e?void 0:e.contextPath)+"/employee/user/forgot-password")},heading:p.texts.header,className:"loginFormStyleEmployee",cardSubHeaderClassName:"loginCardSubHeaderClassName",cardClassName:"loginCardClassName",buttonClassName:"buttonClassName"},r.createElement(_n,null)),C&&r.createElement(t.Toast,{error:!0,label:g(C),onClose:I}),r.createElement("div",{className:"employee-login-home-footer",style:{backgroundColor:"unset"}},r.createElement("img",{alt:"Powered by DIGIT",src:null===(f=window)||void 0===f||null===(m=f.globalConfigs)||void 0===m||null===(v=m.getConfig)||void 0===v?void 0:v.call(m,"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()}})," "))};Ln.propTypes={loginParams:En.any},Ln.defaultProps={loginParams:null};const Rn=()=>{const{t:e}=i.useTranslation(),{path:t}=a.useRouteMatch(),[o,l]=n.useState(An),{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(()=>{0==c&&null!=u&&u.config&&l(null==u?void 0:u.config)},[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(Ln,{config:s[0],t:e})))},xn=["user/profile","user/error"],Pn=e=>{var o,l,u,c,s,d;let{stateInfo:m,userDetails:p,CITIZEN:g,cityDetails:h,mobileView:E,handleUserDropdownSelection:y,logoUrl:_,DSO:b,stateCode:C,modules:O,appTenants:w,initData:S}=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=xn.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==S||null===(l=S.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(q,{t:I,stateInfo:m,userDetails:p,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==m?void 0:m.bannerUrl)+")",padding:"0px"}},r.createElement(a.Switch,null,r.createElement(a.Route,{path:D+"/user/login"},r.createElement(Rn,null)),r.createElement(a.Route,{path:D+"/user/forgot-password"},r.createElement(Nn,null)),r.createElement(a.Route,{path:D+"/user/change-password"},r.createElement(On,null)),r.createElement(t.PrivateRoute,{path:D+"/user/profile"},r.createElement(oe,{stateCode:C,userType:"employee",cityDetails:h})),r.createElement(a.Route,{path:D+"/user/error"},r.createElement(f,{initData:S,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(Tn,null)),r.createElement(a.Route,null,r.createElement(a.Redirect,{to:D+"/user/language-selection"}))))),r.createElement(a.Route,null,r.createElement(q,{t:I,stateInfo:m,userDetails:p,CITIZEN:g,cityDetails:h,mobileView:E,handleUserDropdownSelection:y,logoUrl:_,modules:O}),r.createElement("div",{className:"main "+(b?"m-auto":"")},r.createElement("div",{className:"employee-app-wrapper"},r.createElement(v,{initData:S},r.createElement(Dn,{stateCode:C,userType:"employee",modules:O,appTenants:w,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"}))))},Mn=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(Pn,O)),r.createElement(a.Route,{path:"/"+(null===(o=window)||void 0===o?void 0:o.contextPath)+"/citizen"},r.createElement(Tt,O)),r.createElement(a.Route,null,r.createElement(a.Redirect,{to:"/"+(null===(l=window)||void 0===l?void 0:l.contextPath)+"/"+m})))},kn=[s],Un=("object"==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({}):c.compose)(c.applyMiddleware(...kn)),Bn=function(e,t){return void 0===t&&(t={}),c.createStore(((e,t)=>{return c.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),Un)},jn=e=>{var n;let{stateCode:o,enabledModules:u,moduleReducers:c,defaultLanding:s}=e;const{isLoading:d,data:f}=Digit.Hooks.useInitStore(o,u);return d?r.createElement(t.Loader,{page:!0}):(i.getI18n(),r.createElement(l.Provider,{store:Bn(f,c(f))},r.createElement(a.BrowserRouter,null,r.createElement(t.Body,null,r.createElement(Mn,{initData:f,stateCode:o,modules:null==f?void 0:f.modules,appTenants:f.tenants,logoUrl:null==f||null===(n=f.stateInfo)||void 0===n?void 0:n.logoUrl,defaultLanding:s})))))},Fn={SelectOtp:se,ChangeCity:_,ChangeLanguage:b};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(v,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(jn,{stateCode:t,enabledModules:l,moduleReducers:a,defaultLanding:u}))))))},exports.initCoreComponents=()=>{Object.entries(Fn).forEach(e=>{let[t,n]=e;Digit.ComponentRegistryService.setComponent(t,n)})};