@egovernments/digit-ui-module-core 1.8.44 → 1.9.0-beta-1

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.
@@ -0,0 +1,3 @@
1
+ /*! For license information please see 150.main.js.LICENSE.txt */
2
+ "use strict";(this.webpackChunk_egovernments_digit_ui_module_core=this.webpackChunk_egovernments_digit_ui_module_core||[]).push([[150,713,876],{778:(e,t,n)=>{var r=n(6518),i=n(7240);r({target:"String",proto:!0,forced:n(3061)("link")},{link:function(e){return i(this,"a","href",e)}})},1761:(e,t,n)=>{var r=n(9565),i=n(9504),o=n(9228),l=n(8551),a=n(34),u=n(8014),c=n(655),s=n(7750),d=n(5966),f=n(7829),v=n(1034),p=n(6682),m=i("".indexOf);o("match",function(e,t,n){return[function(t){var n=s(this),i=a(t)?d(t,e):void 0;return i?r(i,t,n):new RegExp(t)[e](c(n))},function(e){var r=l(this),i=c(e),o=n(t,r,i);if(o.done)return o.value;var a=c(v(r));if(-1===m(a,"g"))return p(r,i);var s=-1!==m(a,"u");r.lastIndex=0;for(var d,g=[],y=0;null!==(d=p(r,i));){var b=c(d[0]);g[y]=b,""===b&&(r.lastIndex=f(i,u(r.lastIndex),s)),y++}return 0===y?null:g}]})},1926:(e,t,n)=>{n.d(t,{X:()=>r});var r="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"},2150:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Kt}),n(8706),n(2675),n(9463),n(2259),n(2008),n(3418),n(4423),n(3792),n(2062),n(6910),n(4782),n(2010),n(6099),n(3362),n(7495),n(8781),n(1699),n(7764),n(2953);var r=n(6243),i=n(4012),o=n.n(i),l=n(5953),a=n(4442),u=(n(7007),n(486)),c=n(4133),s=n(8712),d=n(8148),f=n(9229),v=n(338),p=n(4848);function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const g=function(e){var t,n,r=e.question,o=e.answer,a=e.lastIndex,u=(t=(0,i.useState)(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,l,a=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return a}}(t,n)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var n={}.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,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=u[0],s=u[1],d=(0,l.useTranslation)().t;return(0,p.jsxs)("div",{className:"faqs border-none",onClick:function(){return s(!c)},children:[(0,p.jsxs)("div",{className:"faq-question",style:{justifyContent:"space-between",display:"flex"},children:[(0,p.jsx)("span",{children:d(r)}),(0,p.jsx)("span",{className:c?"faqicon rotate":"faqicon",style:{float:"right"},children:(0,p.jsx)(v.ArrowForward,{})})]}),(0,p.jsx)("div",{className:"faq-answer",style:c?{display:"block"}:{display:"none"},children:(0,p.jsx)("span",{children:d(o)})}),a?null:(0,p.jsx)("div",{className:"cs-box-border"})]})},y=function(e){var t,n,o=e.module,a=Digit.UserService.getUser(),u=((null==a||null===(t=a.info)||void 0===t?void 0:t.tenantId)||Digit.ULBService.getCurrentTenantId(),(0,l.useTranslation)().t),c=Digit.Hooks.useGetFAQsJSON(Digit.ULBService.getStateId()),s=c.isLoading,d=c.data,f=null==d||null===(n=d.MdmsRes["common-masters"])||void 0===n||null===(n=n.faqs[0])||void 0===n?void 0:n["".concat(o)].faqs;return s?(0,p.jsx)(r.Loader,{}):(0,p.jsx)(i.Fragment,{children:(0,p.jsxs)("div",{className:"faq-page",children:[(0,p.jsx)(r.BackButton,{style:{marginLeft:"unset"}}),(0,p.jsx)("div",{style:{marginBottom:"15px"},children:(0,p.jsx)(r.HeaderComponent,{styles:{marginLeft:"0px",paddingTop:"10px",fontSize:"32px"},children:u("FAQ_S")})}),(0,p.jsx)("div",{className:"faq-list",children:f.map(function(e,t){return(0,p.jsx)(g,{question:e.question,answer:e.answer,lastIndex:t===(null==f?void 0:f.length)-1},"faq_"+t)})})]})})};n(5700),n(9572),n(2892),n(3851),n(1278),n(9432),n(3500);var b=n(5053),h=n(1599);function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach(function(t){x(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function x(e,t,n){return(t=function(e){var t=function(e){if("object"!=S(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=S(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==S(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const A=function(){var e,t,n,r,i,o,u,c,s,d,f,v,m,g,y,S,O=(0,l.useTranslation)().t,x=(0,a.useNavigate)(),A=Digit.Utils.getMultiRootTenant()?Digit.ULBService.getStateId():Digit.ULBService.getCitizenCurrentTenant(!0),_=Digit.Hooks.useStore.getInitData(),w=_.data,C=void 0===w?{}:w,N=(C.stateInfo,C.uiHomePage),D=_.isLoading,I=window.Digit.Utils.browser.isMobile(),E=function(){var e,t;return"EMPLOYEE"!==(null===(e=Digit.UserService)||void 0===e||null===(e=e.getUser())||void 0===e||null===(e=e.info)||void 0===e?void 0:e.type)&&!(null===(t=Digit.UserService)||void 0===t||null===(t=t.getUser())||void 0===t||!t.access_token)},T=Digit.Hooks.useEvents({tenantId:A,variant:"whats-new",config:{enabled:E()}}),L=T.data,P=T.isLoading;A||x("/".concat(null===(S=window)||void 0===S?void 0:S.contextPath,"/citizen/select-language"));var k,R,U=null==N?void 0:N.appBannerDesktop,B=null==N?void 0:N.appBannerMobile,M=null==N?void 0:N.citizenServicesCard,F=null==N?void 0:N.informationAndUpdatesCard,V=null==N?void 0:N.whatsAppBannerDesktop,z=null==N?void 0:N.whatsAppBannerMobile,H=null==N?void 0:N.whatsNewSection,X=null==N?void 0:N.redirectURL;X&&x("/".concat(null===(k=window)||void 0===k?void 0:k.contextPath,"/citizen/").concat(X)),(null!==(e=window)&&void 0!==e&&null!==(e=e.location)&&void 0!==e&&null!==(e=e.href)&&void 0!==e&&null!==(t=e.includes)&&void 0!==t&&t.call(e,"sanitation-ui")||null!==(n=window)&&void 0!==n&&null!==(n=n.location)&&void 0!==n&&null!==(n=n.href)&&void 0!==n&&null!==(r=n.includes)&&void 0!==r&&r.call(n,"sandbox-ui"))&&x("/".concat(null===(R=window)||void 0===R?void 0:R.contextPath,"/citizen/all-services"));var G=function(e){window.open(null==e?void 0:e.navigationUrl)},Q={header:O(null==M?void 0:M.headerLabel),sideOption:{name:O(null==M||null===(i=M.sideOption)||void 0===i?void 0:i.name),onClick:function(){var e;return x(null==M||null===(e=M.sideOption)||void 0===e?void 0:e.navigationUrl)}},options:[{name:O(null==M||null===(o=M.props)||void 0===o||null===(o=o[0])||void 0===o?void 0:o.label),Icon:(0,p.jsx)(b.ComplaintIcon,{}),onClick:function(){var e;return x(null==M||null===(e=M.props)||void 0===e||null===(e=e[0])||void 0===e?void 0:e.navigationUrl)}},{name:O(null==M||null===(u=M.props)||void 0===u||null===(u=u[1])||void 0===u?void 0:u.label),Icon:(0,p.jsx)(b.PTIcon,{className:"fill-path-primary-main"}),onClick:function(){var e;return x(null==M||null===(e=M.props)||void 0===e||null===(e=e[1])||void 0===e?void 0:e.navigationUrl)}},{name:O(null==M||null===(c=M.props)||void 0===c||null===(c=c[2])||void 0===c?void 0:c.label),Icon:(0,p.jsx)(b.CaseIcon,{className:"fill-path-primary-main"}),onClick:function(){var e;return x(null==M||null===(e=M.props)||void 0===e||null===(e=e[2])||void 0===e?void 0:e.navigationUrl)}},{name:O(null==M||null===(s=M.props)||void 0===s||null===(s=s[3])||void 0===s?void 0:s.label),Icon:(0,p.jsx)(b.OBPSIcon,{}),onClick:function(){var e;return x(null==M||null===(e=M.props)||void 0===e||null===(e=e[3])||void 0===e?void 0:e.navigationUrl)}}],styles:{display:"flex",flexWrap:"wrap",justifyContent:"flex-start",width:"100%"}},q={header:O(null==F?void 0:F.headerLabel),sideOption:{name:O(null==F||null===(d=F.sideOption)||void 0===d?void 0:d.name),onClick:function(){var e;return x(null==F||null===(e=F.sideOption)||void 0===e?void 0:e.navigationUrl)}},options:[{name:O(null==F||null===(f=F.props)||void 0===f||null===(f=f[0])||void 0===f?void 0:f.label),Icon:(0,p.jsx)(b.HomeIcon,{}),onClick:function(){var e;return x(null==F||null===(e=F.props)||void 0===e||null===(e=e[0])||void 0===e?void 0:e.navigationUrl)}},{name:O(null==F||null===(v=F.props)||void 0===v||null===(v=v[1])||void 0===v?void 0:v.label),Icon:(0,p.jsx)(b.Calender,{}),onClick:function(){var e;return x(null==F||null===(e=F.props)||void 0===e||null===(e=e[1])||void 0===e?void 0:e.navigationUrl)}},{name:O(null==F||null===(m=F.props)||void 0===m||null===(m=m[2])||void 0===m?void 0:m.label),Icon:(0,p.jsx)(b.DocumentIcon,{}),onClick:function(){var e;return x(null==F||null===(e=F.props)||void 0===e||null===(e=e[2])||void 0===e?void 0:e.navigationUrl)}},{name:O(null==F||null===(g=F.props)||void 0===g||null===(g=g[3])||void 0===g?void 0:g.label),Icon:(0,p.jsx)(b.DocumentIcon,{}),onClick:function(){var e;return x(null==F||null===(e=F.props)||void 0===e||null===(e=e[3])||void 0===e?void 0:e.navigationUrl)}}],styles:{display:"flex",flexWrap:"wrap",justifyContent:"flex-start",width:"100%"}};return D?(0,p.jsx)(b.Loader,{}):(0,p.jsx)("div",{className:"HomePageContainer",children:(0,p.jsxs)("div",{className:"HomePageWrapper",children:[(0,p.jsxs)("div",{className:"BannerWithSearch",children:[I?(0,p.jsx)(h.A,{src:null==B?void 0:B.bannerUrl,alt:"Banner Image"}):(0,p.jsx)(h.A,{src:null==U?void 0:U.bannerUrl,alt:"Banner Image"}),(0,p.jsxs)("div",{className:"ServicesSection",children:[(0,p.jsx)(b.CardBasedOptions,j({style:{marginTop:"-30px"}},Q)),(0,p.jsx)(b.CardBasedOptions,j({style:I?{}:{marginTop:"-30px"}},q))]})]}),(z||V)&&(0,p.jsx)("div",{className:"WhatsAppBanner",children:I?(0,p.jsx)(h.A,{src:null==z?void 0:z.bannerUrl,onClick:function(){return G(z)},alt:"Whatsapp Banner"}):(0,p.jsx)(h.A,{src:null==V?void 0:V.bannerUrl,onClick:function(){return G(V)},alt:"Whatsapp Banner"})}),E()?P?(0,p.jsx)(b.Loader,{}):(0,p.jsxs)("div",{className:"WhatsNewSection",children:[(0,p.jsxs)("div",{className:"headSection",children:[(0,p.jsx)("h2",{children:O(null==H?void 0:H.headerLabel)}),(0,p.jsx)("p",{onClick:function(){var e;return x(null==H||null===(e=H.sideOption)||void 0===e?void 0:e.navigationUrl)},children:O(null==H||null===(y=H.sideOption)||void 0===y?void 0:y.name)})]}),(0,p.jsx)(b.WhatsNewCard,j({},null==L?void 0:L[0]))]}):null]})})};function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach(function(t){N(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function N(e,t,n){return(t=function(e){var t=function(e){if("object"!=_(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const D=function(){var e=(0,l.useTranslation)().t,t=(0,a.useNavigate)(),n=Digit.Hooks.useStore.getInitData(),o=n.data,u=void 0===o?{}:o,c=u.languages,s=u.stateInfo,d=n.isLoading,f=Digit.StoreData.getCurrentLanguage(),v=(0,i.useMemo)(function(){return{header:e("CS_COMMON_CHOOSE_LANGUAGE"),submitBarLabel:e("CORE_COMMON_CONTINUE")}},[e]),m=(0,i.useMemo)(function(){return{options:c,optionsKey:"label",additionalWrapperClass:"digit-reverse-radio-selection-wrapper",onSelect:function(e){return Digit.LocalizationService.changeLanguage(e.value,s.code)},selectedOption:null==c?void 0:c.filter(function(e){return e.value===f})[0]}},[f,c]);return d?(0,p.jsx)(r.Loader,{}):(0,p.jsx)("div",{className:"selection-card-wrapper",children:(0,p.jsxs)(r.PageBasedInput,{texts:v,onSubmit:function(){var e;t("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/citizen/select-location"))},children:[(0,p.jsx)(r.CardHeader,{children:e("CS_COMMON_CHOOSE_LANGUAGE")}),(0,p.jsx)(r.RadioButtons,C({},m))]})})};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach(function(t){L(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function L(e,t,n){return(t=function(e){var t=function(e){if("object"!=I(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=I(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==I(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,l,a=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return k(e,t);var n={}.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)?k(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const R=function(){var e=(0,l.useTranslation)().t,t=(0,a.useNavigate)(),n=(0,a.useLocation)(),o=Digit.Hooks.useStore.getInitData(),u=o.data,c=void 0===u?{}:u,s=(c.stateInfo,c.uiHomePage),d=(o.isLoading,null==s?void 0:s.redirectURL),f=Digit.Hooks.useTenants(),v=f.data,m=f.isLoading,g=P((0,i.useState)(function(){return{code:Digit.ULBService.getCitizenCurrentTenant(!0)}}),2),y=g[0],h=g[1],S=P((0,i.useState)(!1),2),O=S[0],j=S[1],x=(0,i.useMemo)(function(){return{header:e("CS_COMMON_CHOOSE_LOCATION"),submitBarLabel:e("CORE_COMMON_CONTINUE")}},[e]);function A(e){h(e),j(!1)}var _=(0,i.useMemo)(function(){return{options:v,optionsKey:"i18nKey",additionalWrapperClass:"digit-reverse-radio-selection-wrapper",onSelect:A,selectedOption:y}},[v,e,y]);return m?(0,p.jsx)("loader",{}):(0,p.jsxs)("div",{className:"selection-card-wrapper",children:[(0,p.jsx)(r.BackLink,{onClick:function(){return window.history.back()}}),(0,p.jsxs)(b.PageBasedInput,{texts:x,onSubmit:function(){if(y){var e;Digit.SessionStorage.set("CITIZEN.COMMON.HOME.CITY",y);var r,i,o=null===(e=n.state)||void 0===e?void 0:e.redirectBackTo;d?t("/".concat(null===(r=window)||void 0===r?void 0:r.contextPath,"/citizen/").concat(d)):o?t(o,{replace:!0}):t("/".concat(null===(i=window)||void 0===i?void 0:i.contextPath,"/citizen"))}else j(!0)},className:"location-selection-container",children:[(0,p.jsx)(b.CardHeader,{children:e("CS_COMMON_CHOOSE_LOCATION")}),(0,p.jsx)(b.SearchOnRadioButtons,T(T({},_),{},{placeholder:e("COMMON_TABLE_SEARCH")})),O?(0,p.jsx)(b.CardLabelError,{children:e("CS_COMMON_LOCATION_SELECTION_ERROR")}):null]})]})};function U(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,l,a=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return B(e,t);var n={}.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)?B(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const M=function(e){var t,n,o=e.module,a=Digit.UserService.getUser(),u=((null==a||null===(t=a.info)||void 0===t?void 0:t.tenantId)||Digit.ULBService.getCurrentTenantId(),(0,l.useTranslation)().t),c=Digit.SessionStorage.get("initData").stateInfo,s=Digit.StoreData.getCurrentLanguage(),d=U((0,i.useState)(s),2),f=d[0],v=d[1],m=U((0,i.useState)(!1),2),g=m[0],y=m[1],h=U((0,i.useState)(""),2),S=h[0],O=h[1],j=function(){return(0,p.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,p.jsx)("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"})})},x=Digit.Hooks.useGetHowItWorksJSON(Digit.ULBService.getStateId()),A=x.isLoading,_=x.data,w=null==_||null===(n=_.MdmsRes["common-masters"])||void 0===n||null===(n=n.howItWorks[0])||void 0===n?void 0:n["".concat(o)];return A?(0,p.jsx)(r.Loader,{}):(0,p.jsx)(i.Fragment,{children:(0,p.jsxs)("div",{className:"how-it-works-page",children:[(0,p.jsx)(r.BackButton,{}),(0,p.jsx)("div",{className:"how-it-works-page-header",children:(0,p.jsx)(r.HeaderComponent,{children:u(w.screenHeader?w.screenHeader:"HOW_IT_WORKS")})}),(0,p.jsx)("div",{className:"language-selector",style:{margin:"10px"},children:[{label:"ENGLISH",value:"en_IN"},{label:"हिंदी",value:"hi_IN"}].map(function(e,t){return(0,p.jsx)("div",{className:"language-button-container",children:(0,p.jsx)(b.CustomButton,{selected:e.value===f,text:e.label,onClick:function(){return function(e){v(e.value),Digit.LocalizationService.changeLanguage(e.value,c.code)}(e)}})},t)})}),w.videosJson.map(function(e,t){return(0,p.jsx)("div",{children:(0,p.jsxs)("div",{className:"WhatsNewCard",style:{float:"left",position:"relative",width:"100%",marginBottom:10},children:[(0,p.jsx)("div",{className:"video-icon",onClick:function(){return t=e,O("hi_IN"===f?t.hi_IN:t.en_IN),void y(!0);var t},children:(0,p.jsx)("div",{className:"vid-svg",children:(0,p.jsx)(j,{})})}),(0,p.jsxs)("div",{className:"how-it-works-header-description",children:[(0,p.jsx)("h2",{children:u(e.headerLabel)}),(0,p.jsx)("p",{children:u(e.description)})]})]})})}),w.pdfHeader&&w.pdfDesc&&(0,p.jsx)("div",{className:"WhatsNewCard",style:{position:"relative",width:"100%",marginBottom:10,display:"inline-block"},children:(0,p.jsxs)("div",{className:"how-it-works-pdf-section",children:[(0,p.jsxs)("div",{className:"pdf-icon-header-desc",children:[(0,p.jsx)("div",{className:"pdf-icon",children:(0,p.jsx)(r.PDFSvg,{})}),(0,p.jsxs)("div",{className:"pdf-header-desc",children:[(0,p.jsx)("h2",{children:u(w.pdfHeader)}),(0,p.jsx)("p",{children:u(w.pdfDesc)})]})]}),(0,p.jsx)("div",{className:"download-icon",children:(0,p.jsx)(r.DownloadImgIcon,{})})]})}),g&&(0,p.jsxs)("div",{className:"how-it-works-video-play",children:[(0,p.jsx)("div",{className:"close-button",children:(0,p.jsx)(r.CloseSvg,{onClick:function(){y(!1)}})}),(0,p.jsx)("video",{width:500,height:500,controls:!0,autoPlay:!0,children:(0,p.jsx)("source",{src:S,type:"video/mp4"})})]})]})})};n(113),n(875),n(287);var F=[{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,maxlength:50,pattern:"^[A-Za-z]+( [A-Za-z]+)*$"}}]}];const V=function(e){var t=e.t,n=e.onSelect,i=(e.showRegisterLink,e.mobileNumber),o=e.onMobileChange,l=e.config,a=e.canSubmit;return(0,p.jsx)(r.FormStep,{isDisabled:!(10===i.length&&a),onSelect:n,config:l,t,componentInFront:"+91",onChange:o,value:i})},z=function(e){var t=e.config,n=e.onSelect,i=e.t,o=e.isDisabled;return(0,p.jsx)(r.FormStep,{config:t,onSelect:n,t:i,isDisabled:o})};var H=n(5713);function X(e){return X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},X(e)}var G,Q=["ResponseInfo","UserRequest"],q=["ResponseInfo","UserRequest"];function W(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Z(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof a?r:a,c=Object.create(u.prototype);return Y(c,"_invoke",function(n,r,i){var o,a,u,c=0,s=i||[],d=!1,f={p:0,n:0,v:e,a:v,f:v.bind(e,4),d:function(t,n){return o=t,a=0,u=e,f.n=n,l}};function v(n,r){for(a=n,u=r,t=0;!d&&c&&!i&&t<s.length;t++){var i,o=s[t],v=f.p,p=o[2];n>3?(i=p===r)&&(u=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):o[0]<=v&&((i=n<2&&v<o[1])?(a=0,f.v=r,f.n=o[1]):v<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return l;throw d=!0,r}return function(i,s,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===s&&v(s,p),a=s,u=p;(t=a<2?e:u)||!d;){o||(a?a<3?(a>1&&(f.n=-1),v(a,u)):f.n=u:f.v=u);try{if(c=2,o){if(a||(i="next"),t=o[i]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,a<2&&(a=0)}else 1===a&&(t=o.return)&&t.call(o),a<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=e}else if((t=(d=f.n<0)?u:n.call(r,f))!==l)break}catch(t){o=e,a=1,u=t}finally{c=1}}return{value:t,done:d}}}(n,i,o),!0),c}var l={};function a(){}function u(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(Y(t={},r,function(){return this}),t),d=c.prototype=a.prototype=Object.create(s);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Y(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return u.prototype=c,Y(d,"constructor",c),Y(c,"constructor",u),u.displayName="GeneratorFunction",Y(c,i,"GeneratorFunction"),Y(d),Y(d,i,"Generator"),Y(d,r,function(){return this}),Y(d,"toString",function(){return"[object Generator]"}),(Z=function(){return{w:o,m:f}})()}function Y(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}Y=function(e,t,n,r){function o(t,n){Y(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},Y(e,t,n,r)}function K(e,t,n,r,i,o,l){try{var a=e[o](l),u=a.value}catch(e){return void n(e)}a.done?t(u):Promise.resolve(u).then(r,i)}function J(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function l(e){K(o,r,i,l,a,"next",e)}function a(e){K(o,r,i,l,a,"throw",e)}l(void 0)})}}function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach(function(t){te(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function te(e,t,n){return(t=function(e){var t=function(e){if("object"!=X(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=X(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==X(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ne(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,l,a=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return re(e,t);var n={}.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)?re(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function re(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ie={type:"register"},oe={type:"login"},le="/".concat(null===(G=window)||void 0===G?void 0:G.contextPath,"/citizen"),ae=function(e,t){return(null==e?void 0:e.from)||(null==t?void 0:t.from)||le};const ue=function(e){var t,n,o=e.stateCode,u=e.isUserRegistered,c=void 0===u||u,s=(0,l.useTranslation)().t,d=(0,a.useLocation)(),f=(0,a.useNavigate)(),v=ne((0,i.useState)(null),2),m=v[0],g=v[1],y=ne((0,i.useState)(null),2),b=y[0],h=y[1],S=ne((0,i.useState)(!0),2),O=S[0],j=S[1],x=ne((0,i.useState)(null),2),A=(x[0],x[1],ne((0,i.useState)(c?{}:null==d||null===(t=d.state)||void 0===t?void 0:t.data),2)),_=A[0],w=A[1],C=ne((0,i.useState)(null),2),N=C[0],D=C[1],I=Digit.Hooks.useQueryParams(),E=ne((0,i.useState)(!1),2),T=E[0],L=E[1],P=ne((0,i.useState)(!0),2),k=P[0],R=P[1],U=ne((0,i.useState)(!0),2),B=U[0],M=U[1];(0,i.useEffect)(function(){var e;return b&&(N&&(clearTimeout(N),D(null)),e=setTimeout(function(){h("")},5e3),D(e)),function(){e&&clearTimeout(e)}},[b]),(0,i.useEffect)(function(){var e;if(m){Digit.SessionStorage.set("citizen.userRequestObject",m),Digit.UserService.setUser(m),function(e,t,n){var r;if(!Digit.Utils.getMultiRootTenant()){var i=null===(r=JSON.parse(sessionStorage.getItem("Digit.initData")))||void 0===r||null===(r=r.value)||void 0===r?void 0:r.selectedLanguage;localStorage.setItem("Citizen.tenant-id",n),localStorage.setItem("tenant-id",n),localStorage.setItem("citizen.userRequestObject",JSON.stringify(e)),localStorage.setItem("locale",i),localStorage.setItem("Citizen.locale",i),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==m?void 0:m.info,null==m?void 0:m.access_token,o);var t,n=(null===(e=d.state)||void 0===e?void 0:e.from)||le;Digit.ULBService.getCitizenCurrentTenant(!0)?f(n,{replace:!0}):f("/".concat(null===(t=window)||void 0===t?void 0:t.contextPath,"/citizen/select-location"),{state:{redirectBackTo:n},replace:!0})}},[m]);var X=(0,i.useMemo)(function(){return F.map(function(e){var t={};for(var n in e.texts)t[n]=s(e.texts[n]);return ee(ee({},e),{},{texts:t})},[F])}),G=function(){return"citizen"},Y=function(){var e=J(Z().m(function e(t){var n,r,i,l,a,u,v,p,m;return Z().w(function(e){for(;;)switch(e.n){case 0:if(M(!1),w(ee(ee({},_),t)),n=ee(ee({},t),{},{tenantId:o,userType:G()}),!c){e.n=4;break}return e.n=1,re({otp:ee(ee({},n),oe)});case 1:if(i=e.v,(l=ne(i,2))[0],l[1]){e.n=2;break}return M(!0),f("otp",{state:{from:ae(d.state,I),role:null===(a=d.state)||void 0===a?void 0:a.role},replace:!0}),e.a(2);case 2:M(!0),d.state&&"FSM_DSO"===d.state.role||f("/".concat(null===(u=window)||void 0===u?void 0:u.contextPath,"/citizen/register/name"),{state:{from:ae(d.state,I),data:n}});case 3:null!==(r=d.state)&&void 0!==r&&r.role&&(M(!0),h("FSM_DSO"===(null===(v=d.state)||void 0===v?void 0:v.role)?s("ES_ERROR_DSO_LOGIN"):"User not registered.")),e.n=7;break;case 4:return e.n=5,re({otp:ee(ee({},n),ie)});case 5:if(p=e.v,(m=ne(p,2))[0],m[1]){e.n=6;break}return M(!0),f("otp",{state:{from:ae(d.state,I)},replace:!0}),e.a(2);case 6:M(!0);case 7:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),K=function(){var e=J(Z().m(function e(t){var n,r,i,l;return Z().w(function(e){for(;;)switch(e.n){case 0:return n=ee(ee({},_),{},{tenantId:o,userType:G()},t),w(ee(ee({},_),t)),L(!0),e.n=1,re({otp:ee(ee({},n),ie)});case 1:r=e.v,i=ne(r,2),l=i[0],i[1],l?(L(!1),f("otp",{state:{from:ae(d.state,I)},replace:!0})):L(!1);case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),$=function(){var e=J(Z().m(function e(){var t,n,r,i,l,a,u,v,p,m,y,b,S,O,x;return Z().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,j(!0),R(!1),t=_.mobileNumber,n=_.otp,r=_.name,!c){e.n=3;break}return a={username:t,password:n,tenantId:o,userType:G()},e.n=1,Digit.UserService.authenticate(a);case 1:if((u=e.v).ResponseInfo,v=u.UserRequest,p=W(u,Q),null===(i=d.state)||void 0===i||!i.role){e.n=2;break}if((m=v.roles.find(function(e){return e.code===d.state.role}))&&m.code){e.n=2;break}return h(s("ES_ERROR_USER_NOT_PERMITTED")),setTimeout(function(){return f(le,{replace:!0})},5e3),e.a(2);case 2:null!==(l=window)&&void 0!==l&&null!==(l=l.globalConfigs)&&void 0!==l&&l.getConfig("ENABLE_SINGLEINSTANCE")&&(v.tenantId=Digit.ULBService.getStateId()),g(ee({info:v},p)),e.n=5;break;case 3:if(c){e.n=5;break}return b={name:r,username:t,otpReference:n,tenantId:o},e.n=4,Digit.UserService.registerUser(b,o);case 4:(S=e.v).ResponseInfo,O=S.UserRequest,x=W(S,q),null!==(y=window)&&void 0!==y&&null!==(y=y.globalConfigs)&&void 0!==y&&y.getConfig("ENABLE_SINGLEINSTANCE")&&(O.tenantId=Digit.ULBService.getStateId()),g(ee({info:O},x));case 5:e.n=7;break;case 6:e.p=6,e.v,R(!0),j(!1);case 7:return e.a(2)}},e,null,[[0,6]])}));return function(){return e.apply(this,arguments)}}(),te=function(){var e=J(Z().m(function e(){var t,n,r,i,l,a;return Z().w(function(e){for(;;)switch(e.n){case 0:if(t=_.mobileNumber,n={mobileNumber:t,tenantId:o,userType:G()},c){e.n=2;break}return e.n=1,re({otp:ee(ee({},n),ie)});case 1:r=e.v,(i=ne(r,2))[0],i[1],e.n=4;break;case 2:if(!c){e.n=4;break}return e.n=3,re({otp:ee(ee({},n),oe)});case 3:l=e.v,(a=ne(l,2))[0],a[1];case 4:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),re=function(){var e=J(Z().m(function e(t){var n,r;return Z().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,Digit.UserService.sendOtp(t,o);case 1:return n=e.v,e.a(2,[n,null]);case 2:return e.p=2,r=e.v,e.a(2,[null,r])}},e,null,[[0,2]])}));return function(t){return e.apply(this,arguments)}}();return(0,p.jsx)("div",{className:"citizen-form-wrapper",children:(0,p.jsxs)(r.AppContainer,{children:[d.pathname.includes("login")?null:(0,p.jsx)(r.BackLink,{onClick:function(){return f(-1)}}),(0,p.jsxs)(a.Routes,{children:[" ",(0,p.jsx)(a.Route,{path:"/",element:(0,p.jsx)(V,{onSelect:Y,config:X[0],mobileNumber:_.mobileNumber||"",onMobileChange:function(e){var t=e.target.value;w(ee(ee({},_),{},{mobileNumber:t}))},canSubmit:B,showRegisterLink:c&&!(null!==(n=d.state)&&void 0!==n&&n.role),t:s})}),(0,p.jsx)(a.Route,{path:"otp",element:(0,p.jsx)(H.default,{config:ee(ee({},X[1]),{},{texts:ee(ee({},X[1].texts),{},{cardText:"".concat(X[1].texts.cardText," ").concat(_.mobileNumber||"")})}),onOtpChange:function(e){w(ee(ee({},_),{},{otp:e}))},onResend:te,onSelect:$,otp:_.otp,error:O,canSubmit:k,t:s})}),(0,p.jsx)(a.Route,{path:"name",element:(0,p.jsx)(z,{config:X[2],onSelect:K,t:s,isDisabled:T})}),b&&(0,p.jsx)(r.Toast,{type:"error",label:b,onClose:function(){return h(null)}})]})]})})};n(1761),n(8598);var ce=e=>e instanceof HTMLElement;const se="blur",de="change",fe="input",ve="onChange",pe="onSubmit",me="select",ge="undefined",ye="pattern",be="required";var he=e=>null==e;const Se=e=>"object"==typeof e;var Oe=e=>!he(e)&&!Array.isArray(e)&&Se(e)&&!(e instanceof Date),je=e=>/^\w*$/.test(e),xe=e=>e.filter(Boolean),Ae=e=>xe(e.replace(/["|']/g,"").replace(/\[/g,".").replace(/\]/g,"").split("."));function _e(e,t,n){let r=-1;const i=je(t)?[t]:Ae(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=Oe(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}e[t]=o,e=e[t]}return e}var we=(e,t={})=>{for(const n in e)je(n)?t[n]=e[n]:_e(t,n,e[n]);return t},Ce=e=>void 0===e,Ne=(e={},t,n)=>{const r=xe(t.split(/[,[\].]+?/)).reduce((e,t)=>he(e)?e:e[t],e);return Ce(r)||r===e?Ce(e[t])?n:e[t]:r},De=(e,t)=>{ce(e)&&e.removeEventListener&&(e.removeEventListener(fe,t),e.removeEventListener(de,t),e.removeEventListener(se,t))};const Ie={isValid:!1,value:null};var Ee=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.ref.checked?{isValid:!0,value:t.ref.value}:e,Ie):Ie,Te=e=>"radio"===e.type,Le=e=>"file"===e.type,Pe=e=>"checkbox"===e.type,ke=e=>e.type===`${me}-multiple`;const Re={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(({ref:{value:e}})=>e);return{value:t,isValid:!!t.length}}const{checked:t,value:n,attributes:r}=e[0].ref;return t?r&&!Ce(r.value)?Ce(n)||""===n?Ue:{value:n,isValid:!0}:Ue:Re}return Re};function Me(e,t,n,r,i){const o=e.current[t];if(o){const{ref:{value:e,disabled:t},ref:n,valueAsNumber:a,valueAsDate:u,setValueAs:c}=o;if(t&&r)return;return Le(n)?n.files:Te(n)?Ee(o.options).value:ke(n)?(l=n.options,[...l].filter(({selected:e})=>e).map(({value:e})=>e)):Pe(n)?Be(o.options).value:i?e:a?""===e?NaN:+e:u?n.valueAsDate:c?c(e):e}var l;if(n)return Ne(n.current,t)}function Fe(e){return!e||e instanceof HTMLElement&&e.nodeType!==Node.DOCUMENT_NODE&&Fe(e.parentNode)}var Ve=e=>Oe(e)&&!Object.keys(e).length,ze=e=>"boolean"==typeof e;function He(e,t){const n=je(t)?[t]:Ae(t),r=1==n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Ce(e)?r++:e[t[r++]];return e}(e,n),i=n[n.length-1];let o;r&&delete r[i];for(let t=0;t<n.slice(0,-1).length;t++){let r,i=-1;const l=n.slice(0,-(t+1)),a=l.length-1;for(t>0&&(o=e);++i<l.length;){const t=l[i];r=r?r[t]:e[t],a===i&&(Oe(r)&&Ve(r)||Array.isArray(r)&&!r.filter(e=>Oe(e)&&!Ve(e)||ze(e)).length)&&(o?delete o[t]:delete e[t]),o=r}}return e}const Xe=(e,t)=>e&&e.ref===t;var Ge=e=>he(e)||!Se(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]=Oe(r)&&Oe(i)||Array.isArray(r)&&Array.isArray(i)?Qe(r,i):i}catch(e){}}return e}function qe(e,t,n){if(Ge(e)||Ge(t)||e instanceof Date||t instanceof Date)return e===t;if(!(0,i.isValidElement)(e)){const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(const i of r){const r=e[i];if(!n||"ref"!==i){const e=t[i];if((Oe(r)||Array.isArray(r))&&(Oe(e)||Array.isArray(e))?!qe(r,e,n):r!==e)return!1}}}return!0}function We(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]=[],We(e[o][r],Ne(t[o]||{},r,[]),n[o][r],n[o],r)):qe(Ne(t[o]||{},r),e[o][r])?_e(n[o]||{},r):n[o]=Object.assign(Object.assign({},n[o]),{[r]:!0});r&&!n.length&&delete r[i]}return n}var Ze=e=>"string"==typeof e,Ye=(e,t,n,r,i)=>{const o={};for(const t in e.current)(Ce(i)||(Ze(i)?t.startsWith(i):Array.isArray(i)&&i.find(e=>t.startsWith(e))))&&(o[t]=Me(e,t,void 0,r));return n?we(o):Qe(t,we(o))},Ke=e=>e instanceof RegExp,Je=e=>Oe(e)&&!Ke(e)?e:{value:e,message:""},$e=e=>"function"==typeof e,et=e=>Ze(e)||(0,i.isValidElement)(e);function tt(e,t,n="validate"){if(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=async(e,t,{ref:n,ref:{value:r},options:i,required:o,maxLength:l,minLength:a,min:u,max:c,pattern:s,validate:d},f)=>{const v=n.name,p={},m=Te(n),g=Pe(n),y=m||g,b=""===r,h=nt.bind(null,v,t,p),S=(e,t,r,i="maxLength",o="minLength")=>{const l=e?t:r;p[v]=Object.assign({type:e?i:o,message:l,ref:n},h(e?i:o,l))};if(o&&(!m&&!g&&(b||he(r))||ze(r)&&!r||g&&!Be(i).isValid||m&&!Ee(i).isValid)){const{value:r,message:i}=et(o)?{value:!!o,message:o}:Je(o);if(r&&(p[v]=Object.assign({type:be,message:i,ref:y?((e.current[v].options||[])[0]||{}).ref:n},h(be,i)),!t))return p}if(!(he(u)&&he(c)||""===r)){let e,i;const o=Je(c),l=Je(u);if(isNaN(r)){const t=n.valueAsDate||new Date(r);Ze(o.value)&&(e=t>new Date(o.value)),Ze(l.value)&&(i=t<new Date(l.value))}else{const t=n.valueAsNumber||parseFloat(r);he(o.value)||(e=t>o.value),he(l.value)||(i=t<l.value)}if((e||i)&&(S(!!e,o.message,l.message,"max","min"),!t))return p}if(Ze(r)&&!b&&(l||a)){const e=Je(l),n=Je(a),i=!he(e.value)&&r.length>e.value,o=!he(n.value)&&r.length<n.value;if((i||o)&&(S(i,e.message,n.message),!t))return p}if(Ze(r)&&s&&!b){const{value:e,message:i}=Je(s);if(Ke(e)&&!e.test(r)&&(p[v]=Object.assign({type:ye,message:i,ref:n},h(ye,i)),!t))return p}if(d){const r=Me(e,v,f,!1,!0),o=y&&i?i[0].ref:n;if($e(d)){const e=tt(await d(r),o);if(e&&(p[v]=Object.assign(Object.assign({},e),h("validate",e.message)),!t))return p}else if(Oe(d)){let e={};for(const[n,i]of Object.entries(d)){if(!Ve(e)&&!t)break;const l=tt(await i(r),o,n);l&&(e=Object.assign(Object.assign({},l),h(n,l.message)),t&&(p[v]=e))}if(!Ve(e)&&(p[v]=Object.assign({ref:o},e),!t))return p}}return p};const it=(e,t,n=[])=>{for(const r in t){const i=e+(Oe(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;return n.add(t),Ve(e)||(o=Ne(e,t),(Oe(o)||Array.isArray(o))&&it(t,o).forEach(e=>n.add(e))),Ce(o)?i?r:Ne(r,t):o},lt=({isOnBlur:e,isOnChange:t,isOnTouch:n,isTouched:r,isReValidateOnBlur:i,isReValidateOnChange:o,isBlurEvent:l,isSubmitted:a,isOnAll:u})=>!u&&(!a&&n?!(r||l):(a?i:e)?!l:!(a?o:t)||l),at=e=>e.substring(0,e.indexOf("["));var ut=(e,t)=>[...e].some(e=>((e,t)=>RegExp(`^${t}([|.)\\d+`.replace(/\[/g,"\\[").replace(/\]/g,"\\]")).test(e))(t,e)),ct=typeof window!==ge&&typeof document!==ge;function st(e){var t;let n;if(Ge(e)||ct&&(e instanceof File||ce(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===pe,isOnBlur:"onBlur"===e,isOnChange:e===ve,isOnAll:"all"===e,isOnTouch:"onTouched"===e}),ft=e=>Te(e)||Pe(e);const vt=typeof window===ge,pt=ct?"Proxy"in window:typeof Proxy!==ge;function mt({mode:e=pe,reValidateMode:t=ve,resolver:n,context:r,defaultValues:o={},shouldFocusError:l=!0,shouldUnregister:a=!0,criteriaMode:u}={}){const c=(0,i.useRef)({}),s=(0,i.useRef)({}),d=(0,i.useRef)({}),f=(0,i.useRef)(new Set),v=(0,i.useRef)({}),p=(0,i.useRef)({}),m=(0,i.useRef)({}),g=(0,i.useRef)({}),y=(0,i.useRef)(o),b=(0,i.useRef)(!1),h=(0,i.useRef)(!1),S=(0,i.useRef)(),O=(0,i.useRef)({}),j=(0,i.useRef)({}),x=(0,i.useRef)(r),A=(0,i.useRef)(n),_=(0,i.useRef)(new Set),w=(0,i.useRef)(dt(e)),{isOnSubmit:C,isOnTouch:N}=w.current,D="all"===u,[I,E]=(0,i.useState)({isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touched:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!C,errors:{}}),T=(0,i.useRef)({isDirty:!pt,dirtyFields:!pt,touched:!pt||N,isValidating:!pt,isSubmitting:!pt,isValid:!pt}),L=(0,i.useRef)(I),P=(0,i.useRef)(),{isOnBlur:k,isOnChange:R}=(0,i.useRef)(dt(t)).current;x.current=r,A.current=n,L.current=I,O.current=a?{}:Ve(O.current)?st(o):O.current;const U=(0,i.useCallback)((e={})=>{b.current||(L.current=Object.assign(Object.assign({},L.current),e),E(L.current))},[]),B=()=>T.current.isValidating&&U({isValidating:!0}),M=(0,i.useCallback)((e,t,n=!1,r={},i)=>{let o=n||(({errors:e,name:t,error:n,validFields:r,fieldsWithValidation:i})=>{const o=Ce(n),l=Ne(e,t);return o&&!!l||!o&&!qe(l,n,!0)||o&&Ne(i,t)&&!Ne(r,t)})({errors:L.current.errors,error:t,name:e,validFields:g.current,fieldsWithValidation:m.current});const l=Ne(L.current.errors,e);t?(He(g.current,e),o=o||!l||!qe(l,t,!0),_e(L.current.errors,e,t)):((Ne(m.current,e)||A.current)&&(_e(g.current,e,!0),o=o||l),He(L.current.errors,e)),(o&&!he(n)||!Ve(r)||T.current.isValidating)&&U(Object.assign(Object.assign(Object.assign({},r),A.current?{isValid:!!i}:{}),{isValidating:!1}))},[]),F=(0,i.useCallback)((e,t)=>{const{ref:n,options:r}=c.current[e],i=ct&&ce(n)&&he(t)?"":t;Te(n)?(r||[]).forEach(({ref:e})=>e.checked=e.value===i):Le(n)&&!Ze(i)?n.files=i:ke(n)?[...n.options].forEach(e=>e.selected=i.includes(e.value)):Pe(n)&&r?r.length>1?r.forEach(({ref:e})=>e.checked=Array.isArray(i)?!!i.find(t=>t===e.value):i===e.value):r[0].ref.checked=!!i:n.value=i},[]),V=(0,i.useCallback)((e,t)=>{if(T.current.isDirty){const n=K();return e&&t&&_e(n,e,t),!qe(n,y.current)}return!1},[]),z=(0,i.useCallback)((e,t=!0)=>{if(T.current.isDirty||T.current.dirtyFields){const n=!qe(Ne(y.current,e),Me(c,e,O)),r=Ne(L.current.dirtyFields,e),i=L.current.isDirty;n?_e(L.current.dirtyFields,e,!0):He(L.current.dirtyFields,e);const o={isDirty:V(),dirtyFields:L.current.dirtyFields},l=T.current.isDirty&&i!==o.isDirty||T.current.dirtyFields&&r!==Ne(L.current.dirtyFields,e);return l&&t&&U(o),l?o:{}}return{}},[]),H=(0,i.useCallback)(async(e,t)=>{const n=(await rt(c,D,c.current[e],O))[e];return M(e,n,t),Ce(n)},[M,D]),X=(0,i.useCallback)(async e=>{const{errors:t}=await A.current(K(),x.current,D),n=L.current.isValid;if(Array.isArray(e)){const n=e.map(e=>{const n=Ne(t,e);return n?_e(L.current.errors,e,n):He(L.current.errors,e),!n}).every(Boolean);return U({isValid:Ve(t),isValidating:!1}),n}{const r=Ne(t,e);return M(e,r,n!==Ve(t),{},Ve(t)),!r}},[M,D]),G=(0,i.useCallback)(async e=>{const t=e||Object.keys(c.current);if(B(),A.current)return X(t);if(Array.isArray(t)){!e&&(L.current.errors={});const n=await Promise.all(t.map(async e=>await H(e,null)));return U({isValidating:!1}),n.every(Boolean)}return await H(t)},[X,H]),Q=(0,i.useCallback)((e,t,{shouldDirty:n,shouldValidate:r})=>{const i={};_e(i,e,t);for(const o of it(e,t))c.current[o]&&(F(o,Ne(i,o)),n&&z(o),r&&G(o))},[G,F,z]),q=(0,i.useCallback)((e,t,n)=>{if(!a&&!Ge(t)&&_e(O.current,e,Array.isArray(t)?[...t]:Object.assign({},t)),c.current[e])F(e,t),n.shouldDirty&&z(e),n.shouldValidate&&G(e);else if(!Ge(t)&&(Q(e,t,n),_.current.has(e))){const r=at(e)||e;_e(s.current,e,t),j.current[r]({[r]:Ne(s.current,r)}),(T.current.isDirty||T.current.dirtyFields)&&n.shouldDirty&&(_e(L.current.dirtyFields,e,((e,t,n)=>Qe(We(e,t,n.slice(0,e.length)),We(t,e,n.slice(0,e.length))))(t,Ne(y.current,e,[]),Ne(L.current.dirtyFields,e,[]))),U({isDirty:!qe(Object.assign(Object.assign({},K()),{[e]:t}),y.current)}))}!a&&_e(O.current,e,t)},[z,F,Q]),W=e=>h.current||f.current.has(e)||f.current.has((e.match(/\w+/)||[])[0]),Z=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 Y(e){if(!a){let t=st(e);for(const e of _.current)je(e)&&!t[e]&&(t=Object.assign(Object.assign({},t),{[e]:[]}));return t}return e}function K(e){if(Ze(e))return Me(c,e,O);if(Array.isArray(e)){const t={};for(const n of e)_e(t,n,Me(c,n,O));return t}return Y(Ye(c,st(O.current),a))}S.current=S.current?S.current:async({type:e,target:t})=>{let n=t.name;const r=c.current[n];let i,o;if(r){const l=e===se,u=lt(Object.assign({isBlurEvent:l,isReValidateOnChange:R,isReValidateOnBlur:k,isTouched:!!Ne(L.current.touched,n),isSubmitted:L.current.isSubmitted},w.current));let s=z(n,!1),d=!Ve(s)||!l&&W(n);if(l&&!Ne(L.current.touched,n)&&T.current.touched&&(_e(L.current.touched,n,!0),s=Object.assign(Object.assign({},s),{touched:L.current.touched})),!a&&Pe(t)&&_e(O.current,n,Me(c,n)),u)return!l&&Z(n),(!Ve(s)||d&&Ve(s))&&U(s);if(B(),A.current){const{errors:e}=await A.current(K(),x.current,D),r=L.current.isValid;if(i=Ne(e,n),Pe(t)&&!i&&A.current){const t=at(n),r=Ne(e,t,{});r.type&&r.message&&(i=r),t&&(r||Ne(L.current.errors,t))&&(n=t)}o=Ve(e),r!==o&&(d=!0)}else i=(await rt(c,D,r,O))[n];!l&&Z(n),M(n,i,d,s,o)}};const J=(0,i.useCallback)(async(e={})=>{const t=Ve(c.current)?y.current:{},{errors:n}=await A.current(Object.assign(Object.assign(Object.assign({},t),K()),e),x.current,D)||{},r=Ve(n);L.current.isValid!==r&&U({isValid:r})},[D]),$=(0,i.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=Me(e,a,r);!Ce(t)&&_e(r.current,a,t)}l.type&&u?Te(l)||Pe(l)?Array.isArray(u.options)&&u.options.length?(xe(u.options).forEach((e={},n)=>{(Fe(e.ref)&&Xe(e,e.ref)||o)&&(De(e.ref,t),He(u.options,`[${n}]`))}),u.options&&!xe(u.options).length&&delete e.current[a]):delete e.current[a]:(Fe(l)&&Xe(u,l)||o)&&(De(l,t),delete e.current[a]):delete e.current[a]}(c,S.current,e,O,a,t),a&&(He(g.current,e.ref.name),He(m.current,e.ref.name))},[a]),ee=(0,i.useCallback)(e=>{if(h.current)U();else{for(const t of f.current)if(t.startsWith(e)){U();break}Z(e)}},[]),te=(0,i.useCallback)((e,t)=>{e&&($(e,t),a&&!xe(e.options||[]).length&&(He(L.current.errors,e.ref.name),_e(L.current.dirtyFields,e.ref.name,!0),U({isDirty:V()}),T.current.isValid&&A.current&&J(),ee(e.ref.name)))},[J,$]),ne=(0,i.useCallback)((e,t,n)=>{const r=n?v.current[n]:f.current;let i=Ye(c,st(O.current),a,!1,e);if(Ze(e)){const n=at(e)||e;return _.current.has(n)&&(i=Object.assign(Object.assign({},d.current),i)),ot(i,e,r,Ce(Ne(y.current,e))?t:Ne(y.current,e),!0)}const o=Ce(t)?y.current:t;return Array.isArray(e)?e.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:ot(i,t,r,o)}),{}):(h.current=Ce(n),we(!Ve(i)&&i||o))},[]);function re(e,t={}){const{name:n,type:r,value:i}=e,o=Object.assign({ref:e},t),l=c.current,u=ft(e),s=ut(_.current,n),d=t=>ct&&(!ce(e)||t===e);let f,v=l[n],p=!0;if(v&&(u?Array.isArray(v.options)&&xe(v.options).find(e=>i===e.ref.value&&d(e.ref)):d(v.ref)))return void(l[n]=Object.assign(Object.assign({},v),t));v=r?u?Object.assign({options:[...xe(v&&v.options||[]),{ref:e}],ref:{type:r,name:n}},t):Object.assign({},o):o,l[n]=v;const b=Ce(Ne(O.current,n));Ve(y.current)&&b||(f=Ne(b?y.current:O.current,n),p=Ce(f),p||s||F(n,f)),Ve(t)||(_e(m.current,n,!0),!C&&T.current.isValid&&rt(c,D,v,O).then(e=>{const t=L.current.isValid;Ve(e)?_e(g.current,n,!0):He(g.current,n),t!==Ve(e)&&U()})),!a||s&&p||!s&&He(L.current.dirtyFields,n),r&&function({ref:e},t,n){ce(e)&&n&&(e.addEventListener(t?de:fe,n),e.addEventListener(se,n))}(u&&v.options?v.options[v.options.length-1]:v,u||e.type===`${me}-one`,S.current)}const ie=(0,i.useCallback)((e,t)=>async n=>{n&&n.preventDefault&&(n.preventDefault(),n.persist());let r={},i=Y(Ye(c,st(O.current),a,!0));T.current.isSubmitting&&U({isSubmitting:!0});try{if(A.current){const{errors:e,values:t}=await A.current(i,x.current,D);L.current.errors=r=e,i=t}else for(const e of Object.values(c.current))if(e){const{name:t}=e.ref,n=await rt(c,D,e,O);n[t]?(_e(r,t,n[t]),He(g.current,t)):Ne(m.current,t)&&(He(L.current.errors,t),_e(g.current,t,!0))}Ve(r)&&Object.keys(L.current.errors).every(e=>e in c.current)?(U({errors:{},isSubmitting:!0}),await e(i,n)):(L.current.errors=Object.assign(Object.assign({},L.current.errors),r),t&&await t(L.current.errors,n),l&&((e,t)=>{for(const n in e)if(Ne(t,n)){const t=e[n];if(t){if(t.ref.focus&&Ce(t.ref.focus()))break;if(t.options){t.options[0].ref.focus();break}}}})(c.current,L.current.errors))}finally{L.current.isSubmitting=!1,U({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ve(L.current.errors),submitCount:L.current.submitCount+1})}},[l,D]);(0,i.useEffect)(()=>{n&&T.current.isValid&&J(),P.current=P.current||!ct?P.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}(c,te)},[te,y.current]),(0,i.useEffect)(()=>()=>{P.current&&P.current.disconnect(),b.current=!0,Object.values(c.current).forEach(e=>te(e,!0))},[]),!n&&T.current.isValid&&(I.isValid=qe(g.current,m.current)&&Ve(L.current.errors));const oe={trigger:G,setValue:(0,i.useCallback)(function(e,t,n){q(e,t,n||{}),W(e)&&U(),Z(e)},[q,G]),getValues:(0,i.useCallback)(K,[]),register:(0,i.useCallback)(function(e,t){if(!vt)if(Ze(e))re({name:e},t);else{if(!Oe(e)||!("name"in e))return t=>t&&re(t,e);re(e,t)}},[y.current]),unregister:(0,i.useCallback)(function(e){for(const t of Array.isArray(e)?e:[e])te(c.current[t],!0)},[]),formState:pt?new Proxy(I,{get:(e,t)=>{if(t in e)return T.current[t]=!0,e[t]}}):I},le=(0,i.useMemo)(()=>Object.assign({isFormDirty:V,updateWatchedValue:ee,shouldUnregister:a,updateFormState:U,removeFieldEventListener:$,watchInternal:ne,mode:w.current,reValidateMode:{isReValidateOnBlur:k,isReValidateOnChange:R},validateResolver:n?J:void 0,fieldsRef:c,resetFieldArrayFunctionRef:j,useWatchFieldsRef:v,useWatchRenderFunctionsRef:p,fieldArrayDefaultValuesRef:s,validFieldsRef:g,fieldsWithValidationRef:m,fieldArrayNamesRef:_,readFormStateRef:T,formStateRef:L,defaultValuesRef:y,shallowFieldsStateRef:O,fieldArrayValuesRef:d},oe),[y.current,ee,a,$,ne]);return Object.assign({watch:function(e,t){return ne(e,t)},control:le,handleSubmit:ie,reset:(0,i.useCallback)((e,t={})=>{if(ct)for(const e of Object.values(c.current))if(e){const{ref:t,options:n}=e,r=ft(t)&&Array.isArray(n)?n[0].ref:t;if(ce(r))try{r.closest("form").reset();break}catch(e){}}c.current={},y.current=Object.assign({},e||y.current),e&&Z(""),Object.values(j.current).forEach(e=>$e(e)&&e()),O.current=a?{}:st(e||y.current),(({errors:e,isDirty:t,isSubmitted:n,touched:r,isValid:i,submitCount:o,dirtyFields:l})=>{i||(g.current={},m.current={}),s.current={},f.current=new Set,h.current=!1,U({submitCount:o?L.current.submitCount:0,isDirty:!!t&&L.current.isDirty,isSubmitted:!!n&&L.current.isSubmitted,isValid:!!i&&L.current.isValid,dirtyFields:l?L.current.dirtyFields:{},touched:r?L.current.touched:{},errors:e?L.current.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})})(t)},[]),clearErrors:(0,i.useCallback)(function(e){e&&(Array.isArray(e)?e:[e]).forEach(e=>c.current[e]&&je(e)?delete L.current.errors[e]:He(L.current.errors,e)),U({errors:e?L.current.errors:{}})},[]),setError:(0,i.useCallback)(function(e,t){const n=(c.current[e]||{}).ref;_e(L.current.errors,e,Object.assign(Object.assign({},t),{ref:n})),U({isValid:!1}),t.shouldFocus&&n&&n.focus&&n.focus()},[]),errors:I.errors},oe)}const gt=(0,i.createContext)(null);gt.displayName="RHFContext";function yt({name:e,rules:t,defaultValue:n,control:r,onFocus:o}){const l=(0,i.useContext)(gt),{defaultValuesRef:a,setValue:u,register:c,unregister:s,trigger:d,mode:f,reValidateMode:{isReValidateOnBlur:v,isReValidateOnChange:p},formState:m,formStateRef:{current:{isSubmitted:g,touched:y,errors:b}},updateFormState:h,readFormStateRef:S,fieldsRef:O,fieldArrayNamesRef:j,shallowFieldsStateRef:x}=r||l.control,A=!ut(j.current,e),_=()=>!Ce(Ne(x.current,e))&&A?Ne(x.current,e):Ce(n)?Ne(a.current,e):n,[w,C]=(0,i.useState)(_()),N=(0,i.useRef)(w),D=(0,i.useRef)({focus:()=>null}),I=(0,i.useRef)(o||(()=>{$e(D.current.focus)&&D.current.focus()})),E=(0,i.useCallback)(t=>!lt(Object.assign({isBlurEvent:t,isReValidateOnBlur:v,isReValidateOnChange:p,isSubmitted:g,isTouched:!!Ne(y,e)},f)),[v,p,g,y,e,f]),T=(0,i.useCallback)(([e])=>{const t=(e=>Ge(e)||!Oe(e.target)||Oe(e.target)&&!e.type?e:Ce(e.target.value)?e.target.checked:e.target.value)(e);return C(t),N.current=t,t},[]),L=(0,i.useCallback)(n=>{O.current[e]?O.current[e]=Object.assign({ref:O.current[e].ref},t):(c(Object.defineProperties({name:e,focus:I.current},{value:{set(e){C(e),N.current=e},get:()=>N.current}}),t),n=Ce(Ne(a.current,e))),n&&A&&C(_())},[t,e,c]);(0,i.useEffect)(()=>()=>s(e),[e]),(0,i.useEffect)(()=>{L()},[L]),(0,i.useEffect)(()=>{!O.current[e]&&L(!0)});const P=(0,i.useCallback)(()=>{S.current.touched&&!Ne(y,e)&&(_e(y,e,!0),h({touched:y})),E(!0)&&d(e)},[e,h,E,d,S]);return{field:{onChange:(0,i.useCallback)((...t)=>u(e,T(t),{shouldValidate:E(),shouldDirty:!0}),[u,e,E]),onBlur:P,name:e,value:w,ref:D},meta:Object.defineProperties({invalid:!!Ne(b,e)},{isDirty:{get:()=>!!Ne(m.dirtyFields,e)},isTouched:{get:()=>!!Ne(m.touched,e)}})}}const bt=e=>{const{rules:t,as:n,render:r,defaultValue:o,control:l,onFocus:a}=e,u=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:c,meta:s}=yt(e),d=Object.assign(Object.assign({},u),c);return n?(0,i.isValidElement)(n)?(0,i.cloneElement)(n,d):(0,i.createElement)(n,d):r?r(c,s):null},ht=function(e){e.register;var t=e.control,n=(e.reset,e.tenantId,e.t),i=(e.previousPage,e.formState,e.isLoading,window.Digit.Utils.browser.isMobile());return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(r.SearchField,{className:"pt-form-field",children:[(0,p.jsx)("label",{children:n("AUDIT_FROM_DATE_LABEL")}),(0,p.jsx)(bt,{render:function(e){return(0,p.jsx)(r.DatePicker,{date:e.value,onChange:e.onChange})},name:"fromDate",control:t})]}),(0,p.jsxs)(r.SearchField,{className:"pt-form-field",children:[(0,p.jsx)("label",{children:n("AUDIT_TO_DATE_LABEL")}),(0,p.jsx)(bt,{render:function(e){return(0,p.jsx)(r.DatePicker,{date:e.value,onChange:e.onChange})},name:"toDate",control:t})]}),(0,p.jsx)(r.SearchField,{className:"pt-search-action-submit",children:(0,p.jsx)(r.Button,{style:{marginTop:i?"510px":"25px",marginLeft:i?"0":"-30px",maxWidth:i?"100%":"240px"},label:n("ES_COMMON_APPLY"),submit:!0})})]})};function St(e){return St="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},St(e)}var Ot=["currentlyActiveMobileModal","searchFormFieldsComponentProps","tenantId"],jt=["currentlyActiveMobileModal","searchFormFieldsComponentProps","tenantId"];function xt(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function At(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _t(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?At(Object(n),!0).forEach(function(t){wt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):At(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function wt(e,t,n){return(t=function(e){var t=function(e){if("object"!=St(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=St(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==St(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ct(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,l,a=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Nt(e,t);var n={}.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)?Nt(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const Dt=function(e){var t,n=e.Controller,l=e.register,a=e.control,u=e.t,c=e.reset,s=e.previousPage,d=e.handleSubmit,f=e.tenantId,v=e.data,m=e.onSubmit,g=e.isLoading,y=Ct((0,i.useState)([]),2),b=y[0],h=y[1],S=function(e){return(0,p.jsx)("div",{onClick:e.onClick,children:(0,p.jsx)(r.DownloadBtnCommon,{})})};(0,i.useEffect)(function(){(null==v?void 0:v.length)>0&&h([null==v?void 0:v.map(function(e){var t={};return t[u("AUDIT_DATE_LABEL")]=O(null==e?void 0:e.timestamp),t[u("AUDIT_TIME_LABEL")]=j(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(","),_t({},t)})])},[v]);var O=function(e){if(null==e||null==e||""==e)return"NA";var t=new Date(e),n=t.getMonth()+1,r=t.getDate(),i=t.getFullYear();return n=(n>9?"":"0")+n,"".concat(r=(r>9?"":"0")+r,"/").concat(n,"/").concat(i)},j=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 r=(r>9?"":"0")+r,"".concat(n=((n=n>12?n-12:n)>9?"":"0")+n,":").concat(r," ").concat(i)},x=Ct((0,i.useReducer)(function(e,t){switch(t.type){case"set":return t.payload;case"remove":return!1}},!1),2),A=x[0],_=x[1],w=function(){_({type:"remove"})},C=function(){return(0,p.jsx)("div",{className:"InboxMobilePopupCloseButtonWrapper",onClick:w,children:(0,p.jsx)(r.CloseSvg,{})})},N={Controller:n,register:l,control:a,t:u,reset:c,previousPage:s},D=(0,i.useCallback)(function(e){return function(e){var t=e.currentlyActiveMobileModal,n=e.searchFormFieldsComponentProps,i=e.tenantId,o=xt(e,Ot),l=o.closeMobilePopupModal;return"SearchFormComponent"===t?(0,p.jsxs)(r.SearchForm,_t(_t({},o),{},{children:[(0,p.jsx)(C,{}),(0,p.jsx)("div",{className:"MobilePopupHeadingWrapper",children:(0,p.jsxs)("h2",{children:[u("PRIVACY_AUDIT_REPORT"),":"]})}),(0,p.jsx)(ht,_t(_t({},n),{},{closeMobilePopupModal:l,tenantId:i,t:u}))]})):(0,p.jsx)("span",{})}(_t({currentlyActiveMobileModal:e.currentlyActiveMobileModal,searchFormFieldsComponentProps:e.searchFormFieldsComponentProps,tenantId:e.tenantId},xt(e,jt)))},[A]),I=[];null==v||null===(t=v.roles)||void 0===t||t.forEach(function(e){I.push(null==e?void 0:e.name)});var E=(0,i.useMemo)(function(){return null!=v&&v.display||""===v?[]:null==v?void 0:v.map(function(e){var t;return wt(wt(wt(wt(wt({},u("AUDIT_DATE_LABEL"),O(e.timestamp)),u("AUDIT_TIME_LABEL"),j(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(function(e){return e.name}).join(","))})},[v]);return(0,p.jsxs)(o().Fragment,{children:[(0,p.jsx)(r.BackButton,{}),(0,p.jsx)("div",{className:"sideContent",style:{marginLeft:"70%",marginTop:"-12%"},children:(0,p.jsx)(S,{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)}})}),(0,p.jsxs)(r.HeaderComponent,{children:[u("PRIVACY_AUDIT_REPORT"),":"]}),(0,p.jsx)("div",{className:"digit-search-box",children:(0,p.jsx)(r.SearchAction,{text:u("ES_COMMON_SEARCH"),handleActionClick:function(){return _({type:"set",payload:"SearchFormComponent"})},tenantId:f,t:u})}),A?(0,p.jsx)(r.PopUp,{children:(0,p.jsx)(D,{onSubmit:function(e){_({type:"remove"}),m(e)},handleSubmit:d,id:"search-form",className:"rm-mb form-field-flex-one inboxPopupMobileWrapper",searchFormFieldsComponentProps:N,currentlyActiveMobileModal:A,closeMobilePopupModal:w,tenantId:f})}):null,g&&(0,p.jsx)(r.Loader,{}),(0,p.jsx)(r.DetailsCard,{data:E})]})};function It(e){return It="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},It(e)}function Et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Tt(e,t,n){return(t=function(e){var t=function(e){if("object"!=It(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=It(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==It(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const Pt=function(e){var t,n,l=e.tenantId,a=e.t,u=e.onSubmit,c=e.data,s=e.count,d=mt({defaultValues:Digit.SessionStorage.get("AUDIT_APPLICATION_DETAIL")||{offset:0,limit:5,sortOrder:"DESC"}}),f=d.register,v=d.control,m=d.handleSubmit,g=d.setValue,y=d.getValues,h=d.reset,S=function(e){if(null==e||null==e||""==e)return"NA";var t=new Date(e),n=t.getMonth()+1,r=t.getDate(),i=t.getFullYear();return n=(n>9?"":"0")+n,"".concat(r=(r>9?"":"0")+r,"/").concat(n,"/").concat(i)},O=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 r=(r>9?"":"0")+r,"".concat(n=((n=n>12?n-12:n)>9?"":"0")+n,":").concat(r," ").concat(i)},j=(t=(0,i.useState)([]),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,l,a=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return a}}(t,n)||function(e,t){if(e){if("string"==typeof e)return Lt(e,t);var n={}.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)?Lt(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),x=j[0],A=j[1],_=function(e){return(0,p.jsx)("div",{onClick:e.onClick,children:(0,p.jsx)(b.DownloadBtnCommon,{})})};(0,i.useEffect)(function(){f("offset",0),f("limit",5),f("sortOrder","DESC")},[f]),(0,i.useEffect)(function(){(null==c?void 0:c.length)>0&&A([null==c?void 0:c.map(function(e){var t={};return t[a("AUDIT_DATE_LABEL")]=S(null==e?void 0:e.timestamp),t[a("AUDIT_TIME_LABEL")]=O(null==e?void 0:e.timestamp),t[a("AUDIT_DATAVIEWED_LABEL")]=(null==e?void 0:e.dataView[0])+","+(null==e?void 0:e.dataView[1]),t[a("AUDIT_DATAVIEWED_BY_LABEL")]=null==e?void 0:e.dataViewedBy,t[a("AUDIT_ROLE_LABEL")]=null==e?void 0:e.roles.map(function(e){return e.name}).join(","),function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Et(Object(n),!0).forEach(function(t){Tt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Et(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},t)})])},[c]);var w=(0,i.useCallback)(function(e){0!==e.length&&(g("sortBy",e.id),g("sortOrder",e.desc?"DESC":"ASC"))},[]);function C(){g("offset",y("offset")-y("limit")),m(u)()}var N=window.Digit.Utils.browser.isMobile();if(N)return(0,p.jsx)(Dt,{Controller:bt,register:f,control:v,t:a,reset:h,previousPage:C,handleSubmit:m,tenantId:l,data:c,onSubmit:u});var D=function(e){return(0,p.jsx)("span",{className:"cell-text",children:e})},I=(0,i.useMemo)(function(){return[{Header:a("AUDIT_DATE_LABEL"),disableSortBy:!0,accessor:function(e){var t="NA"===e.timestamp?a("WS_NA"):S(e.timestamp);return D("".concat(t))}},{Header:a("AUDIT_TIME_LABEL"),disableSortBy:!0,accessor:function(e){var t="NA"===e.timestamp?a("WS_NA"):O(e.timestamp);return D("".concat(t))}},{Header:a(N?"AUDIT_DATAVIEWED_LABEL":"AUDIT_DATAVIEWED_PRIVACY"),disableSortBy:!0,accessor:function(e){return D("".concat(null==e?void 0:e.dataView))}},{Header:a(N?"AUDIT_DATAVIEWED_BY_LABEL":"AUDIT_DATAVIEWED_BY_PRIVACY"),disableSortBy:!0,accessor:function(e){return D("".concat(null==e?void 0:e.dataViewedBy))}},{Header:a("AUDIT_ROLE_LABEL"),disableSortBy:!0,accessor:function(e){var t;return D("".concat(null==e||null===(t=e.roles.slice(0,3))||void 0===t?void 0:t.map(function(e){return e.name})))}}]},[]);return(0,p.jsxs)(o().Fragment,{children:[(0,p.jsxs)("div",{style:{marginRight:"-70px"},children:[" ",(0,p.jsx)(r.BackButton,{})," "]}),(0,p.jsxs)("div",{style:{marginTop:"30px",marginLeft:"30px"},children:[" ",(0,p.jsx)(r.HeaderComponent,{children:a("PRIVACY_AUDIT_REPORT")})," "]}),(0,p.jsx)(r.SearchForm,{className:"audit-card",onSubmit:u,handleSubmit:m,children:(0,p.jsx)(ht,{register:f,control:v,reset:h,tenantId:l,t:a,previousPage:C})}),(0,p.jsx)("div",{style:{marginTop:"240px",marginLeft:"-55%",maxWidth:"80%",marginRight:"52px"},children:null!=c&&c.display?(0,p.jsx)("div",{style:{marginTop:"20x",width:"1025px",marginLeft:"25px",backgroundColor:"white",height:"60px"},children:a(c.display).split("\\n").map(function(e,t){return(0,p.jsx)("p",{style:{textAlign:"center"},children:e},t)})}):""!==c?(0,p.jsxs)("div",{style:{backgroundColor:"white",marginRight:"-30px",marginLeft:"30px"},children:[(0,p.jsx)("div",{className:"sideContent",style:{float:"right",padding:"10px 30px"},children:(0,p.jsx)(_,{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")}(x)}})}),(0,p.jsx)(b.Table,{t:a,data:c,totalRecords:s,columns:I,getCellProps:function(e){return{style:{minWidth:e.column.Header===a("ES_INBOX_APPLICATION_NO")?"240px":"",padding:"20px 18px",fontSize:"16px"}}},onPageSizeChange:function(e){g("limit",Number(e.target.value)),m(u)()},currentPage:y("offset")/y("limit"),onNextPage:function(){g("offset",y("offset")+y("limit")),m(u)()},onPrevPage:C,manualPagination:!1,pageSizeLimit:y("limit"),onSort:w,disableSort:!1,sortParams:[{id:y("sortBy"),desc:"DESC"===y("sortOrder")}]})]}):(0,p.jsx)(r.Loader,{})})]})};function kt(e){return kt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kt(e)}function Rt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ut(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rt(Object(n),!0).forEach(function(t){Bt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Bt(e,t,n){return(t=function(e){var t=function(e){if("object"!=kt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=kt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==kt(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const Ft=function(e){e.path;var t,n,r,o,a=(0,l.useTranslation)().t,u=Digit.ULBService.getCitizenCurrentTenant(),c=(r=(0,i.useState)({}),o=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,l,a=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return a}}(r,o)||function(e,t){if(e){if("string"==typeof e)return Mt(e,t);var n={}.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)?Mt(e,t):void 0}}(r,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=c[0],d=c[1],f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"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}};(0,i.useEffect)(function(){var e=Digit.SessionStorage.get("AUDIT_APPLICATION_DETAIL")||{};if(e){var t=Ut({},e);d(Object.keys(t).filter(function(e){return t[e]}).reduce(function(e,n){return Ut(Ut({},e),{},Bt({},n,"object"===kt(t[n])?t[n].code:t[n]))},{}))}},[]);var v={enabled:!!(s&&Object.keys(s).length>0)},m=Ut({},s),g=Digit.Hooks.useAudit({tenantId:u,filters:Ut({},m),config:v}),y=g.isLoading,b=g.data;return(0,p.jsx)(Pt,{t:a,tenantId:u,onSubmit:function(e){Digit.SessionStorage.set("AUDIT_APPLICATION_DETAIL",{offset:0,limit:5,sortBy:"commencementDate",sortOrder:"DESC"});var t=Ut(Ut({},e),{},{fromDate:f(null==e?void 0:e.fromDate),toDate:f(null==e?void 0:e.toDate)});d(Object.keys(t).filter(function(e){return t[e]}).reduce(function(e,n){return Ut(Ut({},e),{},Bt({},n,(kt(t[n]),t[n])))},{}))},data:y?"":(null==b||null===(t=b.ElasticSearchData)||void 0===t?void 0:t.length)>0?null==b?void 0:b.ElasticSearchData:{display:"ES_COMMON_NO_DATA"},count:null==b||null===(n=b.ElasticSearchData)||void 0===n?void 0:n.length})};var Vt,zt,Ht,Xt,Gt;function Qt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var qt=o().lazy(function(){return n.e(387).then(n.bind(n,8387))}),Wt=o().lazy(function(){return n.e(772).then(n.bind(n,8772))}),Zt=["".concat(null===(Vt=window)||void 0===Vt?void 0:Vt.contextPath,"/citizen/register/name"),"/".concat(null===(zt=window)||void 0===zt?void 0:zt.contextPath,"/citizen/select-language"),"/".concat(null===(Ht=window)||void 0===Ht?void 0:Ht.contextPath,"/citizen/select-location"),"/".concat(null===(Xt=window)||void 0===Xt?void 0:Xt.contextPath,"/citizen/login"),"/".concat(null===(Gt=window)||void 0===Gt?void 0:Gt.contextPath,"/citizen/register/otp")],Yt=function(e,t){return t.filter(function(t){return e.map(function(e){return e.code}).includes(t.code)})};const Kt=function(e){var t,n,v=e.stateInfo,m=e.userDetails,g=e.CITIZEN,b=e.cityDetails,S=e.mobileView,O=e.handleUserDropdownSelection,j=e.logoUrl,x=(e.DSO,e.stateCode),_=e.modules,w=e.appTenants,C=(e.sourceUrl,e.pathname),N=e.initData,I=Digit.Hooks.useCustomMDMS(Digit.ULBService.getStateId(),"ACCESSCONTROL-ACTIONS-TEST",[{name:"actions-test",filter:"[?(@.url == '".concat(Digit.Utils.getMultiRootTenant()?window.globalPath:window.contextPath,"-card')]")}],{select:function(e){var t;return null==e||null===(t=e["ACCESSCONTROL-ACTIONS-TEST"])||void 0===t||null===(t=t["actions-test"])||void 0===t?void 0:t.filter(function(e){return!0===e.enabled}).reduce(function(e,t){var n,r;return e[t.parentModule]=(null===(n=e[t.parentModule])||void 0===n?void 0:n.length)>0?[t].concat(function(e){if(Array.isArray(e))return Qt(e)}(r=e[t.parentModule])||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return Qt(e,t);var n={}.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)?Qt(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):[t],e},{})}}),E=I.isLoading,T=I.data,L=I.isFetched,P=Digit.Hooks.useRouteSubscription(C),k=(0,l.useTranslation)().t,U=(0,a.useNavigate)(),B=((0,a.useLocation)(),Zt.some(function(e){return window.location.href.includes(e)})),F=_.map(function(e,t){var n=e.code,r=e.tenants,i=Digit.ComponentRegistryService.getComponent("".concat(n,"Module"));return i?(0,p.jsx)(a.Route,{path:"".concat(n.toLowerCase(),"/*"),element:(0,p.jsx)(i,{stateCode:x,moduleCode:n,userType:"citizen",tenants:Yt(r,w)})},t):null}),V=_.map(function(e,t){var n=e.code,l=e.bannerImage,u=(Digit.ComponentRegistryService.getComponent("".concat(n,"Links")),L?(0,s.q)(T,n,k):void 0);return"ACTION_TEST_WS"===(null==u?void 0:u.header)&&(null==u||u.links.sort(function(e,t){return t.orderNumber-e.orderNumber})),(0,p.jsxs)(o().Fragment,{children:[" ",(0,p.jsx)(a.Route,{path:"".concat(n.toLowerCase(),"-home"),element:(0,p.jsxs)("div",{className:"moduleLinkHomePage",children:[(0,p.jsx)(h.A,{src:l||(null==v?void 0:v.bannerUrl),alt:"noimagefound"}),(0,p.jsx)(r.BackLink,{className:"moduleLinkHomePageBackButton",onClick:function(){return U(-1)}})," ",(0,p.jsx)("h1",{children:k("MODULE_"+n.toUpperCase())}),(0,p.jsx)("div",{className:"moduleLinkHomePageModuleLinks",children:u&&(0,p.jsx)(r.CitizenHomeCard,{header:k(null==u?void 0:u.header),links:null==u?void 0:u.links,Icon:function(){return(0,p.jsx)("span",{})},Info:"OBPS"===n?function(){return(0,p.jsx)(r.CitizenInfoLabel,{style:{margin:"0px",padding:"10px"},info:k("CS_FILE_APPLICATION_INFO_LABEL"),text:k("BPA_CITIZEN_HOME_STAKEHOLDER_INCLUDES_INFO_LABEL")})}:null,isInfo:"OBPS"===n})}),(0,p.jsx)(c.A,{children:(0,p.jsx)(i.Suspense,{fallback:(0,p.jsx)(r.Loader,{page:!0,variant:"PageLoader"}),children:(0,p.jsx)(Wt,{moduleCode:null==n?void 0:n.toUpperCase()})})})]})}),(0,p.jsx)(a.Route,{path:"".concat(n.toLowerCase(),"-faq"),element:(0,p.jsx)(y,{module:null==n?void 0:n.toUpperCase()})}),(0,p.jsx)(a.Route,{path:"".concat(n.toLowerCase(),"-how-it-works"),element:(0,p.jsx)(M,{module:null==n?void 0:n.toUpperCase()})})]},n+"-routes")});return(0,p.jsxs)("div",{className:P,children:[(0,p.jsx)(d.A,{t:k,stateInfo:v,userDetails:m,CITIZEN:g,cityDetails:b,mobileView:S,handleUserDropdownSelection:O,logoUrl:j,showSidebar:!!g,linkData:T,islinkDataLoading:E}),(0,p.jsxs)("div",{className:"main center-container citizen-home-container mb-25",children:[B?null:(0,p.jsx)("div",{className:"SideBarStatic",children:(0,p.jsx)(f.A,{linkData:T,islinkDataLoading:E})}),(0,p.jsxs)(a.Routes,{children:[" ",(0,p.jsx)(a.Route,{path:"/",element:(0,p.jsx)(A,{})})," ",(0,p.jsx)(a.Route,{path:"select-language",element:(0,p.jsx)(D,{})}),(0,p.jsx)(a.Route,{path:"select-location",element:(0,p.jsx)(R,{})}),(0,p.jsx)(a.Route,{path:"error",element:(0,p.jsx)(u.A,{initData:N,goToHome:function(){var e,t,n;U("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/").concat(null===(t=Digit)||void 0===t||null===(t=t.UserService)||void 0===t||null===(n=t.getType)||void 0===n?void 0:n.call(t)))}})}),(0,p.jsx)(a.Route,{path:"all-services",element:(0,p.jsx)(s.j,{userType:"citizen",modules:_,getCitizenMenu:T,fetchedCitizen:L,isLoading:E})}),(0,p.jsx)(a.Route,{path:"login/*",element:(0,p.jsx)(ue,{stateCode:x})})," ",(0,p.jsx)(a.Route,{path:"register/*",element:(0,p.jsx)(ue,{stateCode:x,isUserRegistered:!1})})," ",(0,p.jsx)(a.Route,{path:"user/profile",element:(0,p.jsx)(c.A,{children:(0,p.jsx)(i.Suspense,{fallback:(0,p.jsx)(r.Loader,{page:!0,variant:"PageLoader"}),children:(0,p.jsx)(qt,{stateCode:x,userType:"citizen",cityDetails:b})})})}),(0,p.jsx)(a.Route,{path:"Audit",element:(0,p.jsx)(Ft,{})}),F,V]})]}),(0,p.jsx)("div",{className:"citizen-home-footer",style:window.location.href.includes("citizen/obps")?{zIndex:"-1"}:{},children:(0,p.jsx)(h.A,{alt:"Powered by DIGIT",src:null===(t=window)||void 0===t||null===(t=t.globalConfigs)||void 0===t||null===(n=t.getConfig)||void 0===n?void 0:n.call(t,"DIGIT_FOOTER"),style:{height:"1.2em",cursor:"pointer"},onClick:function(){var e,t;window.open(null===(e=window)||void 0===e||null===(e=e.globalConfigs)||void 0===e||null===(t=e.getConfig)||void 0===t?void 0:t.call(e,"DIGIT_HOME_URL"),"_blank").focus()}})})]})}},3061:(e,t,n)=>{var r=n(9039);e.exports=function(e){return r(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})}},3607:(e,t,n)=>{var r=n(2839).match(/AppleWebKit\/(\d+)\./);e.exports=!!r&&+r[1]},3709:(e,t,n)=>{var r=n(2839).match(/firefox\/(\d+)/i);e.exports=!!r&&+r[1]},3763:(e,t,n)=>{var r=n(2839);e.exports=/MSIE|Trident/.test(r)},3875:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(4012);const i=function(e,t){var n=(0,r.useRef)();(0,r.useEffect)(function(){n.current=e},[e]),(0,r.useEffect)(function(){if(null!==t){var e=setInterval(function(){n.current()},t);return function(){return clearInterval(e)}}},[t])}},3921:(e,t,n)=>{var r=n(6518),i=n(2652),o=n(4659);r({target:"Object",stat:!0},{fromEntries:function(e){var t={};return i(e,function(e,n){o(t,e,n)},{AS_ENTRIES:!0}),t}})},4488:(e,t,n)=>{var r=n(7680),i=Math.floor,o=function(e,t){var n=e.length;if(n<8)for(var l,a,u=1;u<n;){for(a=u,l=e[u];a&&t(e[a-1],l)>0;)e[a]=e[--a];a!==u++&&(e[a]=l)}else for(var c=i(n/2),s=o(r(e,0,c),t),d=o(r(e,c),t),f=s.length,v=d.length,p=0,m=0;p<f||m<v;)e[p+m]=p<f&&m<v?t(s[p],d[m])<=0?s[p++]:d[m++]:p<f?s[p++]:d[m++];return e};e.exports=o},4527:(e,t,n)=>{var r=n(3724),i=n(4376),o=TypeError,l=Object.getOwnPropertyDescriptor,a=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=a?function(e,t){if(i(e)&&!l(e,"length").writable)throw new o("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},4554:(e,t,n)=>{var r=n(6518),i=n(8981),o=n(5610),l=n(1291),a=n(6198),u=n(4527),c=n(6837),s=n(1469),d=n(4659),f=n(4606),v=n(597)("splice"),p=Math.max,m=Math.min;r({target:"Array",proto:!0,forced:!v},{splice:function(e,t){var n,r,v,g,y,b,h=i(this),S=a(h),O=o(e,S),j=arguments.length;for(0===j?n=r=0:1===j?(n=0,r=S-O):(n=j-2,r=m(p(l(t),0),S-O)),c(S+n-r),v=s(h,r),g=0;g<r;g++)(y=O+g)in h&&d(v,g,h[y]);if(v.length=r,n<r){for(g=O;g<S-r;g++)b=g+n,(y=g+r)in h?h[b]=h[y]:f(h,b);for(g=S;g>S-r+n;g--)f(h,g-1)}else if(n>r)for(g=S-r;g>O;g--)b=g+n-1,(y=g+r-1)in h?h[b]=h[y]:f(h,b);for(g=0;g<n;g++)h[g+O]=arguments[g+2];return u(h,S-r+n),v}})},4606:(e,t,n)=>{var r=n(6823),i=TypeError;e.exports=function(e,t){if(!delete e[t])throw new i("Cannot delete property "+r(t)+" of "+r(e))}},5713:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c}),n(2675),n(9463),n(2259),n(8706),n(3418),n(3792),n(4782),n(2010),n(6099),n(7495),n(8781),n(7764),n(2953);var r=n(6243),i=n(4012),o=n(3875),l=n(5053),a=n(4848);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const c=function(e){var t,n,c=e.config,s=e.otp,d=e.onOtpChange,f=e.onResend,v=e.onSelect,p=e.t,m=e.error,g=e.userType,y=void 0===g?"citizen":g,b=e.canSubmit,h=(t=(0,i.useState)(30),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,l,a=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return a}}(t,n)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n={}.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)?u(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),S=h[0],O=h[1];(0,o.A)(function(){O(S-1)},S>0?1e3:null);var j=function(){f(),O(2)};return"employee"===y?(0,a.jsxs)(i.Fragment,{children:[(0,a.jsx)(l.OTPInput,{length:6,onChange:d,value:s}),S>0?(0,a.jsx)(r.CardText,{children:"".concat(p("CS_RESEND_ANOTHER_OTP")," ").concat(S," ").concat(p("CS_RESEND_SECONDS"))}):(0,a.jsx)("p",{className:"card-text-button resend-otp",onClick:j,children:p("CS_RESEND_OTP")}),!m&&(0,a.jsx)(r.CardLabelError,{children:p("CS_INVALID_OTP")})]}):(0,a.jsxs)(r.FormStep,{onSelect:v,config:c,t:p,isDisabled:!(6===(null==s?void 0:s.length)&&b),children:[(0,a.jsx)(l.OTPInput,{length:6,onChange:d,value:s}),S>0?(0,a.jsx)(r.CardText,{children:"".concat(p("CS_RESEND_ANOTHER_OTP")," ").concat(S," ").concat(p("CS_RESEND_SECONDS"))}):(0,a.jsx)("p",{className:"card-text-button",onClick:j,children:p("CS_RESEND_OTP")}),!m&&(0,a.jsx)(r.CardLabelError,{children:p("CS_INVALID_OTP")})]})}},6034:(e,t,n)=>{var r=n(6518),i=n(2357).values;r({target:"Object",stat:!0},{values:function(e){return i(e)}})},6724:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(6243),i=(n(4012),n(5953)),o=n(4848);const l=function(e){var t=e.onSelect,n=e.onCancel,l=e.onDismiss,a=e.PopupStyles,u=e.isDisabled,c=e.hideSubmit,s=(0,i.useTranslation)().t,d=[(0,o.jsx)("div",{children:(0,o.jsxs)(r.CardText,{children:[s("CORE_LOGOUT_WEB_CONFIRMATION_MESSAGE")+" ",(0,o.jsx)("strong",{children:s("CORE_LOGOUT_MESSAGE")})]})})],f=[(0,o.jsx)(r.Button,{type:"button",size:"large",variation:"secondary",label:s("CORE_LOGOUT_CANCEL"),className:"logout-cancel-button",onClick:n}),(0,o.jsx)(r.Button,{type:"button",size:"large",variation:"primary",label:s("CORE_LOGOUT_WEB_YES"),formId:"modal-action",onClick:t,isDisabled:u})],v=[(0,o.jsx)(r.Button,{type:"button",size:"large",variation:"digit-action-cancel",label:s("CORE_LOGOUT_CANCEL"),className:"logout-cancel-button",onClick:n})];return(0,o.jsx)(r.PopUp,{type:"default",children:d,heading:s("CORE_LOGOUT_WEB_HEADER"),footerChildren:c?v:f,sortFooterButtons:!0,onClose:l,className:"digit-logout-popup-wrapper",onOverlayClick:l,equalWidthButtons:!0,style:a})}},6910:(e,t,n)=>{var r=n(6518),i=n(9504),o=n(9306),l=n(8981),a=n(6198),u=n(4606),c=n(655),s=n(9039),d=n(4488),f=n(4598),v=n(3709),p=n(3763),m=n(9519),g=n(3607),y=[],b=i(y.sort),h=i(y.push),S=s(function(){y.sort(void 0)}),O=s(function(){y.sort(null)}),j=f("sort"),x=!s(function(){if(m)return m<70;if(!(v&&v>3)){if(p)return!0;if(g)return g<603;var e,t,n,r,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)y.push({k:t+r,v:n})}for(y.sort(function(e,t){return t.v-e.v}),r=0;r<y.length;r++)t=y[r].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}});r({target:"Array",proto:!0,forced:S||!O||!j||!x},{sort:function(e){void 0!==e&&o(e);var t=l(this);if(x)return void 0===e?b(t):b(t,e);var n,r,i=[],s=a(t);for(r=0;r<s;r++)r in t&&h(i,t[r]);for(d(i,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:c(t)>c(n)?1:-1}}(e)),n=a(i),r=0;r<n;)t[r]=i[r++];for(;r<s;)u(t,r++);return t}})},7240:(e,t,n)=>{var r=n(9504),i=n(7750),o=n(655),l=/"/g,a=r("".replace);e.exports=function(e,t,n,r){var u=o(i(e)),c="<"+t;return""!==n&&(c+=" "+n+'="'+a(o(r),l,"&quot;")+'"'),c+">"+u+"</"+t+">"}},7918:(e,t,n)=>{var r=n(8907).Y,i="undefined"!=typeof window?window.matchMedia:null;function o(e,t,n){var o,l=this;function a(e){l.matches=e.matches,l.media=e.media}i&&!n&&(o=i.call(window,e)),o?(this.matches=o.matches,this.media=o.media,o.addListener(a)):(this.matches=r(e,t),this.media=e),this.addListener=function(e){o&&o.addListener(e)},this.removeListener=function(e){o&&o.removeListener(e)},this.dispose=function(){o&&o.removeListener(a)}}e.exports=function(e,t,n){return new o(e,t,n)}},8148:(e,t,n)=>{n.d(t,{A:()=>ie}),n(2675),n(9463),n(2259),n(3418),n(3792),n(4782),n(2010),n(6099),n(7495),n(8781),n(7764),n(2953);var r=n(4012),i=n.n(r),o=(n(4423),n(875),n(287),n(3362),n(5440),n(5053)),l=n(6243),a=n(4442),u=n(8876),c=n(5957),s=n(1599),d=n(4848);function f(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof a?r:a,c=Object.create(u.prototype);return v(c,"_invoke",function(n,r,i){var o,a,u,c=0,s=i||[],d=!1,f={p:0,n:0,v:e,a:v,f:v.bind(e,4),d:function(t,n){return o=t,a=0,u=e,f.n=n,l}};function v(n,r){for(a=n,u=r,t=0;!d&&c&&!i&&t<s.length;t++){var i,o=s[t],v=f.p,p=o[2];n>3?(i=p===r)&&(u=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):o[0]<=v&&((i=n<2&&v<o[1])?(a=0,f.v=r,f.n=o[1]):v<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return l;throw d=!0,r}return function(i,s,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===s&&v(s,p),a=s,u=p;(t=a<2?e:u)||!d;){o||(a?a<3?(a>1&&(f.n=-1),v(a,u)):f.n=u:f.v=u);try{if(c=2,o){if(a||(i="next"),t=o[i]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,a<2&&(a=0)}else 1===a&&(t=o.return)&&t.call(o),a<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=e}else if((t=(d=f.n<0)?u:n.call(r,f))!==l)break}catch(t){o=e,a=1,u=t}finally{c=1}}return{value:t,done:d}}}(n,i,o),!0),c}var l={};function a(){}function u(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(v(t={},r,function(){return this}),t),d=c.prototype=a.prototype=Object.create(s);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,v(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return u.prototype=c,v(d,"constructor",c),v(c,"constructor",u),u.displayName="GeneratorFunction",v(c,i,"GeneratorFunction"),v(d),v(d,i,"Generator"),v(d,r,function(){return this}),v(d,"toString",function(){return"[object Generator]"}),(f=function(){return{w:o,m:p}})()}function v(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}v=function(e,t,n,r){function o(t,n){v(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},v(e,t,n,r)}function p(e,t,n,r,i,o,l){try{var a=e[o](l),u=a.value}catch(e){return void n(e)}a.done?t(u):Promise.resolve(u).then(r,i)}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const g=function(e){var t,n,r,v,g,y,b,h,S,O=e.t,j=e.stateInfo,x=e.toggleSidebar,A=e.isSidebarOpen,_=e.handleLogout,w=e.userDetails,C=e.CITIZEN,N=e.cityDetails,D=e.mobileView,I=e.userOptions,E=e.handleUserDropdownSelection,T=e.logoUrl,L=e.logoUrlWhite,P=e.showLanguageChange,k=void 0===P||P,R=(h=i().useState(null),S=2,function(e){if(Array.isArray(e))return e}(h)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,l,a=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return a}}(h,S)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var n={}.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,t):void 0}}(h,S)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),U=R[0],B=R[1];i().useEffect(function(){var e=function(){var e,t=(e=f().m(function e(){var t,n,r,i,o,l,a;return f().w(function(e){for(;;)switch(e.n){case 0:if(n=Digit.Utils.getMultiRootTenant()?Digit.ULBService.getStateId():Digit.ULBService.getCurrentTenantId(),!(r=null==w||null===(t=w.info)||void 0===t?void 0:t.uuid)){e.n=2;break}return e.n=1,Digit.UserService.userSearch(n,{uuid:[r]},{});case 1:(i=e.v)&&i.user&&i.user.length&&(l=i.user[0],a=null==l||null===(o=l.photo)||void 0===o?void 0:o.split(","),B(null==a?void 0:a.at(0)));case 2:return e.a(2)}},e)}),function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function l(e){p(o,r,i,l,a,"next",e)}function a(e){p(o,r,i,l,a,"throw",e)}l(void 0)})});return function(){return t.apply(this,arguments)}}();e()},[null!==U,null==w||null===(t=w.info)||void 0===t?void 0:t.uuid]);var M,F,V=Digit.ULBService.getCitizenCurrentTenant(!0),z=(0,a.useNavigate)(),H=(0,a.useLocation)().pathname,X=Digit.Hooks.useNotificationCount({tenantId:V,config:{enabled:"EMPLOYEE"!==(null===(M=Digit.UserService)||void 0===M||null===(M=M.getUser())||void 0===M||null===(M=M.info)||void 0===M?void 0:M.type)&&"CITIZEN"===(null===(F=Digit.UserService)||void 0===F||null===(F=F.getUser())||void 0===F||null===(F=F.info)||void 0===F?void 0:F.type)&&!!V}}),G=X.data,Q=(void 0===G?{}:G).unreadCount,q=X.isSuccess;if(C)return(0,d.jsx)("div",{children:(0,d.jsx)(o.TopBar,{img:null==j?void 0:j.logoUrlWhite,isMobile:!0,toggleSidebar:function(){Digit.clikOusideFired?Digit.clikOusideFired=!1:x(!0)},logoUrl:null==j?void 0:j.logoUrlWhite,onLogout:_,userDetails:w,notificationCount:Q<99?Q:99,notificationCountLoaded:q,cityOfCitizenShownBesideLogo:O(V),onNotificationIconClick:function(){var e;z("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/citizen/engagement/notifications"))},hideNotificationIconOnSomeUrlsWhenNotLoggedIn:function(e){var t,n,r;return(null===(t=Digit.UserService)||void 0===t||null===(t=t.getUser())||void 0===t||!t.access_token)&&["/".concat(null===(n=window)||void 0===n?void 0:n.contextPath,"/citizen/select-language"),"/".concat(null===(r=window)||void 0===r?void 0:r.contextPath,"/citizen/select-location")].includes(e)}(H),changeLanguage:D?null:(0,d.jsx)(c.A,{dropdown:!0})})});var W=!(null==w||!w.access_token),Z=null===(n=Digit.ComponentRegistryService)||void 0===n?void 0:n.getComponent("CustomEmployeeTopBar");return Z?(0,d.jsx)(Z,{t:O,stateInfo:j,toggleSidebar:x,isSidebarOpen:A,handleLogout:_,userDetails:w,CITIZEN:C,cityDetails:N,mobileView:D,userOptions:I,handleUserDropdownSelection:E,logoUrl:T,showLanguageChange:k,loggedin:W}):(0,d.jsx)(l.Header,{actionFields:[(0,d.jsx)(u.default,{dropdown:!0,t:O}),k&&(0,d.jsx)(c.A,{dropdown:!0}),(null==w?void 0:w.access_token)&&(0,d.jsx)(l.Dropdown,{option:I,optionKey:"name",profilePic:U||(null==w||null===(r=w.info)||void 0===r?void 0:r.name)||(null==w||null===(v=w.info)||void 0===v||null===(v=v.userInfo)||void 0===v?void 0:v.name)||"Employee",select:E,showArrow:!0,menuStyles:{marginTop:"1rem"},theme:"light"})],onHamburgerClick:function(){x()},className:"",img:T,logoWidth:"48px",logoHeight:"48px",logo:W?null==N?void 0:N.logoId:null==j?void 0:j.statelogo,onImageClick:function(){},onLogoClick:function(){},props:{},showDeafultImg:!0,style:{},theme:"light",ulb:W?null!=N&&null!==(g=N.city)&&void 0!==g&&g.ulbGrade?(0,d.jsxs)(d.Fragment,{children:[O(null==N?void 0:N.i18nKey).toUpperCase()," ",O("ULBGRADE_".concat(null==N||null===(y=N.city)||void 0===y?void 0:y.ulbGrade.toUpperCase().replace(" ","_").replace(".","_"))).toUpperCase()]}):(0,d.jsx)(s.A,{className:"state",src:L,alt:"State Logo"}):(0,d.jsxs)(d.Fragment,{children:[O("MYCITY_".concat(null==j||null===(b=j.code)||void 0===b?void 0:b.toUpperCase(),"_LABEL"))," ",O("MYCITY_STATECODE_LABEL")]})})};n(5700),n(8706),n(2008),n(8980),n(2062),n(6910),n(4554),n(9572),n(2892),n(3851),n(1278),n(9432),n(1699),n(778),n(3500);var y=n(5953),b=(n(1926),n(9229));function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach(function(t){j(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function j(e,t,n){return(t=function(e){var t=function(e){if("object"!=h(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof a?r:a,c=Object.create(u.prototype);return A(c,"_invoke",function(n,r,i){var o,a,u,c=0,s=i||[],d=!1,f={p:0,n:0,v:e,a:v,f:v.bind(e,4),d:function(t,n){return o=t,a=0,u=e,f.n=n,l}};function v(n,r){for(a=n,u=r,t=0;!d&&c&&!i&&t<s.length;t++){var i,o=s[t],v=f.p,p=o[2];n>3?(i=p===r)&&(u=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):o[0]<=v&&((i=n<2&&v<o[1])?(a=0,f.v=r,f.n=o[1]):v<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return l;throw d=!0,r}return function(i,s,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===s&&v(s,p),a=s,u=p;(t=a<2?e:u)||!d;){o||(a?a<3?(a>1&&(f.n=-1),v(a,u)):f.n=u:f.v=u);try{if(c=2,o){if(a||(i="next"),t=o[i]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,a<2&&(a=0)}else 1===a&&(t=o.return)&&t.call(o),a<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=e}else if((t=(d=f.n<0)?u:n.call(r,f))!==l)break}catch(t){o=e,a=1,u=t}finally{c=1}}return{value:t,done:d}}}(n,i,o),!0),c}var l={};function a(){}function u(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(A(t={},r,function(){return this}),t),d=c.prototype=a.prototype=Object.create(s);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,A(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return u.prototype=c,A(d,"constructor",c),A(c,"constructor",u),u.displayName="GeneratorFunction",A(c,i,"GeneratorFunction"),A(d),A(d,i,"Generator"),A(d,r,function(){return this}),A(d,"toString",function(){return"[object Generator]"}),(x=function(){return{w:o,m:f}})()}function A(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}A=function(e,t,n,r){function o(t,n){A(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},A(e,t,n,r)}function _(e,t,n,r,i,o,l){try{var a=e[o](l),u=a.value}catch(e){return void n(e)}a.done?t(u):Promise.resolve(u).then(r,i)}function w(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function l(e){_(o,r,i,l,a,"next",e)}function a(e){_(o,r,i,l,a,"throw",e)}l(void 0)})}}function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,l,a=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return N(e,t);var n={}.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)?N(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var D=function(e){e.isOpen;var t,n,i,u,c=e.isMobile,s=void 0!==c&&c,f=e.toggleSidebar,v=e.onLogout,p=e.isEmployee,m=void 0!==p&&p,g=e.linkData,h=e.islinkDataLoading,S=e.userProfile,j=(Digit.Utils.getMultiRootTenant(),Digit.Hooks.useStore.getInitData()),A=j.data,_=j.isFetched,N=Digit.StoreData.getCurrentLanguage(),D=C((0,r.useState)(null),2),I=D[0],E=D[1],T=A||{},L=T.languages,P=T.stateInfo,k=Digit.UserService.getUser(),R=C((0,r.useState)(""),2),U=R[0],B=(R[1],C((0,r.useState)(null),2)),M=B[0],F=B[1],V=C((0,r.useState)([]),2),z=V[0],H=V[1],X=C((0,r.useState)([]),2),G=(X[0],X[1],C((0,r.useState)(N),2)),Q=(G[0],G[1]),q=Digit.Hooks.useAccessControl(),W=q.isLoading,Z=q.data,Y=Digit.ULBService.getCurrentTenantId(),K=(0,y.useTranslation)().t,J=(0,a.useNavigate)(),$=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(""==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};(0,r.useEffect)(function(){var e,t=Digit.SessionStorage.get("citizen.userRequestObject"),n=[],r=[];null==t||null===(e=t.info)||void 0===e||null===(e=e.roles)||void 0===e||e.forEach(function(e){return n.push(e.tenantId)});var i=n.filter(function(e,t,n){return n.indexOf(e)===t});null==i||i.forEach(function(e){var t;r.push({label:K("TENANT_TENANTS_".concat(null===(t=$(e,".","_"))||void 0===t?void 0:t.toUpperCase())),value:e})}),null==r||r.filter(function(e){return e.value==Digit.SessionStorage.get("Employee.tenantId")}),H(r)},[M]);var ee=function(){Digit.clikOusideFired=!0,f(!1)};(0,r.useEffect)(function(){var e=function(){var e=w(x().m(function e(){var t,n,r,i,o,l,a,u;return x().w(function(e){for(;;)switch(e.n){case 0:if(n=Digit.ULBService.getCurrentTenantId(),!(r=null==k||null===(t=k.info)||void 0===t?void 0:t.uuid)){e.n=2;break}return e.n=1,Digit.UserService.userSearch(n,{uuid:[r]},{});case 1:(o=e.v)&&o.user&&null!=o&&null!==(i=o.user)&&void 0!==i&&i.length&&(a=o.user[0],u=null==a||null===(l=a.photo)||void 0===l?void 0:l.split(","),E(null==u?void 0:u.at(0)));case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();I||e()},[I]);var te=function(e){var t,n,r=null;Digit.Utils.getMultiRootTenant()?(r=m?e.replace("/sandbox-ui/employee","/sandbox-ui/".concat(Y,"/employee")):e.replace("/sandbox-ui/citizen","/sandbox-ui/".concat(Y,"/citizen")),J(r),f()):("/"===e[0]?J("/".concat(null===(t=window)||void 0===t?void 0:t.contextPath,"/").concat(m?"employee":"citizen").concat(e)):J("/".concat(null===(n=window)||void 0===n?void 0:n.contextPath,"/").concat(m?"employee":"citizen","/").concat(e)),f())};if(h||W)return(0,d.jsx)(l.Loader,{});var ne=[{id:"login-btn",element:"LOGIN",text:K("CORE_COMMON_LOGIN"),icon:(0,d.jsx)(o.LogoutIcon,{className:"icon"}),populators:{onClick:function(){var e,t;J(m?"/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/employee/user/language-selection"):"/".concat(null===(t=window)||void 0===t?void 0:t.contextPath,"/citizen/login")),ee()}}}];_&&k&&k.access_token&&(null==k||k.info,null==P||P.name,ne=ne.filter(function(e){return"login-btn"!==(null==e?void 0:e.id)}));var re={};if(m){var ie;null==Z||Z.actions.filter(function(e){return"url"===e.url&&"Home"!==e.displayName}).forEach(function(e){var t;if(""==U&&""!==e.path){var n=e.path.split(".")[0];"TradeLicense"===n&&(n="Trade License"),re[n]?re[n].push(e):re[n]=[e]}else if(""!==e.path&&null!=e&&null!==(t=e.displayName)&&void 0!==t&&t.toLowerCase().includes(U.toLowerCase())){var r=e.path.split(".")[0];"TradeLicense"===r&&(r="Trade License"),re[r]?re[r].push(e):re[r]=[e]}});for(var oe=Object.keys(re),le=function(e){var t,n,r,i,o,l,a=null===(t=re[oe[e]][0])||void 0===t||null===(t=t.displayName)||void 0===t||null===(t=t.toUpperCase())||void 0===t?void 0:t.replace(/[ -]/g,"_"),u=null===(n=oe[e])||void 0===n||null===(n=n.toUpperCase())||void 0===n?void 0:n.replace(/[ -]/g,"_");-1===re[oe[e]][0].path.indexOf(".")?ne.splice(1,0,{type:"link",text:K("ACTION_TEST_".concat(a)),link:null===(r=re[oe[e]][0])||void 0===r?void 0:r.navigationURL,icon:null===(i=re[oe[e]][0])||void 0===i?void 0:i.leftIcon,populators:{onClick:function(){var t;J(null===(t=re[oe[e]][0])||void 0===t?void 0:t.navigationURL),ee()}}}):ne.splice(1,0,{type:"dynamic",moduleName:K("ACTION_TEST_".concat(u)),links:null===(o=re[oe[e]])||void 0===o?void 0:o.map(function(e){var t;return O(O({},e),{},{displayName:K("ACTION_TEST_".concat(null==e||null===(t=e.displayName)||void 0===t||null===(t=t.toUpperCase())||void 0===t?void 0:t.replace(/[ -]/g,"_")))})}),icon:null===(l=re[oe[e]][1])||void 0===l?void 0:l.leftIcon})},ae=0;ae<(null==oe?void 0:oe.length);ae++)le(ae);var ue=ne.findIndex(function(e){return"HOME"===e.element}),ce=ne.splice(ue,1),se=ne.findIndex(function(e){return"LANGUAGE"===e.element}),de=ne.splice(se,(null===(ie=ne)||void 0===ie?void 0:ie.length)-se);ne.sort(function(e,t){var n="dynamic"===(null==e?void 0:e.type)?null==e?void 0:e.moduleName:null==e?void 0:e.text,r="dynamic"===(null==t?void 0:t.type)?null==t?void 0:t.moduleName:null==t?void 0:t.text;return n.localeCompare(r)}),(null==ce?void 0:ce[0])&&ne.splice(0,0,ce[0]),ne=(null==de?void 0:de.length)>0?ne.concat(de):ne}else{var fe;null===(fe=Object.keys(g))||void 0===fe||null===(fe=fe.sort(function(e,t){return t.localeCompare(e)}))||void 0===fe||fe.map(function(e){var t,n,r,i,o;"digit-ui-links"===(null===(t=g[e][0])||void 0===t?void 0:t.sidebar)&&ne.splice(1,0,{type:null!==(n=g[e][0])&&void 0!==n&&null!==(n=n.sidebarURL)&&void 0!==n&&n.includes(null===(r=window)||void 0===r?void 0:r.contextPath)?"link":"external-link",text:K("ACTION_TEST_".concat(Digit.Utils.locale.getTransformedLocale(e))),links:g[e],icon:null===(i=g[e][0])||void 0===i?void 0:i.leftIcon,link:null===(o=g[e][0])||void 0===o?void 0:o.sidebarURL})})}location.pathname.includes("/openlink")&&(ne=ne.filter(function(e){return"LANGUAGE"===e.element})),ne=null===(t=ne)||void 0===t?void 0:t.map(function(e){return O(O({},e),{},{label:(null==e?void 0:e.text)||(null==e?void 0:e.moduleName)||"",icon:null!=e&&e.icon?null==e?void 0:e.icon:void 0})});var ve,pe="";pe=Digit.Utils.getMultiRootTenant()?K("TENANT_TENANTS_".concat(Y)):K("TENANT_TENANTS_".concat(null===(ve=$(Digit.SessionStorage.get("Employee.tenantId"),".","_"))||void 0===ve?void 0:ve.toUpperCase()));var me=null===(n=ne)||void 0===n?void 0:n.map(function(e){var t;return"dynamic"===(null==e?void 0:e.type)?O(O({},e),{},{children:null==e||null===(t=e.links)||void 0===t?void 0:t.map(function(e){return O(O({},e),{},{label:null==e?void 0:e.displayName,icon:null==e?void 0:e.leftIcon})})}):e}),ge=null==z?void 0:z.map(function(e){return O(O({},e),{},{type:"custom",key:"city"})}),ye=null==L?void 0:L.map(function(e){return O(O({},e),{},{type:"custom",key:"language",icon:"Language"})}),be=[{label:"HOME",value:"HOME",icon:"Home",type:"custom",key:"home"},{label:pe,value:pe,children:(null==ge?void 0:ge.length)>0?ge:void 0,type:"custom",icon:"LocationCity",key:"city"},{label:K("Language"),children:(null==ye?void 0:ye.length)>0?ye:void 0,type:"custom",icon:"Language",key:"language"},{label:K("EDIT_PROFILE"),type:"custom",icon:"Edit",key:"editProfile"},{label:K("Modules"),icon:"DriveFileMove",children:me}];return s?(0,d.jsx)(l.Hamburger,{items:be,profileName:null==k||null===(i=k.info)||void 0===i?void 0:i.name,profileNumber:null==k||null===(u=k.info)||void 0===u?void 0:u.mobileNumber,theme:"dark",transitionDuration:.3,styles:{marginTop:"64px",height:"93%"},onLogout:v,hideUserManuals:!0,profile:I||void 0,isSearchable:!0,onSelect:function(e){return function(e){var t,n,r,i=e.item;if(e.index,e.parentIndex,null!=i&&i.navigationURL)te(null==i?void 0:i.navigationURL);else if(null!=i&&i.link)te(null==i?void 0:i.link);else{if("custom"!==(null==i?void 0:i.type))return;switch(null==i?void 0:i.key){case"home":J(m?"/".concat(null===(n=window)||void 0===n?void 0:n.contextPath,"/employee"):"/".concat(null===(r=window)||void 0===r?void 0:r.contextPath,"/citizen")),f();break;case"editProfile":S(),f();break;case"language":Q((t=i).value),Digit.LocalizationService.changeLanguage(t.value,P.code),f();break;case"city":!function(e){var t,n,r,i=Digit.SessionStorage.get("citizen.userRequestObject"),o=null===(t=Digit.SessionStorage.get("citizen.userRequestObject"))||void 0===t||null===(t=t.info)||void 0===t||null===(t=t.roles)||void 0===t?void 0:t.filter(function(t){return t.tenantId===e.value});if((null==o?void 0:o.length)>0&&(i.info.roles=o,i.info.tenantId=null==e?void 0:e.value),Digit.SessionStorage.set("Employee.tenantId",null==e?void 0:e.value),Digit.UserService.setUser(i),F(e),"undefined"!=typeof window&&null!==(n=window.location)&&void 0!==n&&null!==(n=n.href)&&void 0!==n&&n.includes("/".concat(null===(r=window)||void 0===r?void 0:r.contextPath,"/employee/"))){var l,a,u=(null===(l=location.state)||void 0===l?void 0:l.from)||"/".concat(null===(a=window)||void 0===a?void 0:a.contextPath,"/employee");J(u,{replace:!0})}try{"undefined"!=typeof window&&window.location.reload()}catch(e){console.warn("Failed to reload page:",e)}}(i),f()}}}({item:e.item,index:e.index,parentIndex:e.parentIndex})}}):(0,d.jsx)(b.A,{logout:v})},I=(n(5506),n(3921),n(7918)),E=n.n(I),T=/[A-Z]/g,L=/^ms-/,P={};function k(e){return"-"+e.toLowerCase()}const R=function(e){if(P.hasOwnProperty(e))return P[e];var t=e.replace(T,k);return P[e]=L.test(t)?"-"+t:t};var U=n(5556),B=n.n(U);const M=B().oneOfType([B().string,B().number]),F={all:B().bool,grid:B().bool,aural:B().bool,braille:B().bool,handheld:B().bool,print:B().bool,projection:B().bool,screen:B().bool,tty:B().bool,tv:B().bool,embossed:B().bool},V={orientation:B().oneOf(["portrait","landscape"]),scan:B().oneOf(["progressive","interlace"]),aspectRatio:B().string,deviceAspectRatio:B().string,height:M,deviceHeight:M,width:M,deviceWidth:M,color:B().bool,colorIndex:B().bool,monochrome:B().bool,resolution:M,type:Object.keys(F)},{type:z,...H}=V,X={minAspectRatio:B().string,maxAspectRatio:B().string,minDeviceAspectRatio:B().string,maxDeviceAspectRatio:B().string,minHeight:M,maxHeight:M,minDeviceHeight:M,maxDeviceHeight:M,minWidth:M,maxWidth:M,minDeviceWidth:M,maxDeviceWidth:M,minColor:B().number,maxColor:B().number,minColorIndex:B().number,maxColorIndex:B().number,minMonochrome:B().number,maxMonochrome:B().number,minResolution:M,maxResolution:M,...H};var G={all:{...F,...X},types:F,matchers:V,features:X};const Q=(0,r.createContext)(void 0),q=e=>{if(e)return Object.keys(e).reduce((t,n)=>(t[R(n)]=e[n],t),{})},W=()=>{const e=(0,r.useRef)(!1);return(0,r.useEffect)(()=>{e.current=!0},[]),e.current},Z=e=>{const t=()=>(e=>e.query||(e=>{const t=[];return Object.keys(G.all).forEach(n=>{const r=e[n];null!=r&&t.push(((e,t)=>{const n=R(e);return"number"==typeof t&&(t=`${t}px`),!0===t?n:!1===t?`not ${n}`:`(${n}: ${t})`})(n,r))}),t.join(" and ")})(e))(e),[n,i]=(0,r.useState)(t);return(0,r.useEffect)(()=>{const e=t();n!==e&&i(e)},[e]),n},Y=(e,t,n)=>{const i=(e=>{const t=(0,r.useContext)(Q),n=()=>q(e)||q(t),[i,o]=(0,r.useState)(n);return(0,r.useEffect)(()=>{const e=n();(function(e,t){if(e===t)return!0;if(!e||!t)return!1;const n=Object.keys(e),r=Object.keys(t),i=n.length;if(r.length!==i)return!1;for(let r=0;r<i;r++){const i=n[r];if(e[i]!==t[i]||!Object.prototype.hasOwnProperty.call(t,i))return!1}return!0})(i,e)||o(e)},[e,t]),i})(t),o=Z(e);if(!o)throw new Error("Invalid or missing MediaQuery!");const l=((e,t)=>{const n=()=>E()(e,t||{},!!t),[i,o]=(0,r.useState)(n),l=W();return(0,r.useEffect)(()=>{if(l){const e=n();return o(e),()=>{e&&e.dispose()}}},[e,t]),i})(o,i),a=(e=>{const[t,n]=(0,r.useState)(e.matches);return(0,r.useEffect)(()=>{const t=e=>{n(e.matches)};return e.addListener(t),n(e.matches),()=>{e.removeListener(t)}},[e]),t})(l),u=W();return(0,r.useEffect)(()=>{u&&n&&n(a)},[a]),(0,r.useEffect)(()=>()=>{l&&l.dispose()},[]),a},K=({children:e,device:t,onChange:n,...r})=>{const i=Y(r,t,n);return"function"==typeof e?e(i):i?e:null};function J(e){return J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},J(e)}const $=function(){var e,t=Digit.Hooks.useAccessControl(),n=t.isLoading,r=t.data,i=Digit.Utils.getMultiRootTenant(),o=(0,y.useTranslation)().t,u=(0,a.useNavigate)(),c=null===(e=Digit)||void 0===e||null===(e=e.ULBService)||void 0===e?void 0:e.getStateId();function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t in e){var n=e[t];if("item"===t&&""!==(null==n?void 0:n.leftIcon))return null==n?void 0:n.leftIcon;if("object"===J(e[t])&&!Array.isArray(e[t])){var r=s(e[t]);if(r)return r}}return null}function f(e,t){for(var n in t)t.hasOwnProperty(n)&&("object"!==J(t[n])||Array.isArray(t[n])?e[n]||(e[n]=t[n]):(e[n]||(e[n]={}),f(e[n],t[n])))}var v={};null==r||r.actions.filter(function(e){return"url"===e.url}).forEach(function(e){var t;if(null==e||null===(t=e.path)||void 0===t||null===(t=t.split("."))||void 0===t||t[0],""!==(null==e?void 0:e.path)){var n,r=null==e||null===(n=e.path)||void 0===n?void 0:n.split("."),i={};r.reduce(function(t,n,i){if(i!==r.length-1)return t[n]={},t[n];t[n]={item:e}},i),f(v,i)}});var p=function(e){return e.sort(function(e,t){return(void 0!==e.orderNumber?e.orderNumber:1/0)-(void 0!==t.orderNumber?t.orderNumber:1/0)}),e.forEach(function(e){e.children&&e.children.length>0&&p(e.children)}),e},m=function(e){var t=function(e,n){if(n.item)return{label:o(n.item.displayName),icon:{icon:n.item.leftIcon,width:"1.5rem",height:"1.5rem"},navigationUrl:n.item.navigationURL,orderNumber:n.item.orderNumber};var r=Object.keys(n).map(function(e){return t(e,n[e])}),i=s(n);return{label:o(e),icon:{icon:i,width:"1.5rem",height:"1.5rem"},children:r}};return Object.keys(e).map(function(n){return t(n,e[n])})}(function(e){var t=Object.entries(e);return t.sort(function(e,t){return e[0]<t[0]?-1:e[0]>t[0]?1:0}),Object.fromEntries(t)}(v)),g=p(m);return n?(0,d.jsx)(l.Loader,{}):v?(0,d.jsx)(K,{minWidth:768,children:(0,d.jsx)(l.SideNav,{items:g,hideAccessbilityTools:!0,onSelect:function(e){return function(e){var t=e.item;e.index,e.parentIndex,null!=t&&t.navigationUrl&&function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("/"!=r)if(-1===(null===(e=r)||void 0===e?void 0:e.indexOf("/".concat(null===(t=window)||void 0===t?void 0:t.contextPath)))){var o=window.location.origin,l=null;if(i)n(l=r=r.replace("/sandbox-ui/employee","/sandbox-ui/".concat(c,"/employee")));else{l=o+r;try{"undefined"!=typeof window&&(window.location.href=l)}catch(e){console.warn("Navigation failed, attempting fallback:",e);try{window.location.replace(l)}catch(e){console.error("All navigation methods failed:",e)}}}}else n(r)}(u,null==t?void 0:t.navigationUrl)}({item:e.item,index:e.index,parentIndex:e.parentIndex})},theme:"dark",variant:"primary",transitionDuration:"",className:"",styles:{},expandedWidth:"",collapsedWidth:"",onBottomItemClick:function(){}})}):""},ee=function(e){e.t;var t=e.CITIZEN,n=e.isSidebarOpen,r=e.toggleSidebar,i=e.handleLogout,o=e.mobileView,l=e.userDetails,a=e.modules,u=e.linkData,c=e.islinkDataLoading,s=e.userProfile;return t?(0,d.jsx)(D,{isOpen:n,isMobile:!0,toggleSidebar:r,onLogout:i,linkData:u,islinkDataLoading:c,userProfile:s,isEmployee:!1}):!n&&null!=l&&l.access_token?(0,d.jsx)("div",{className:"digit-employeeSidebar",children:(0,d.jsx)($,{mobileView:o,userDetails:l,modules:a})}):(0,d.jsx)("div",{className:"digit-citizenSidebar",children:(0,d.jsx)(D,{isOpen:n,isMobile:!0,toggleSidebar:r,onLogout:i,isEmployee:!0,userProfile:s})})};var te=n(6724);function ne(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,l,a=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return re(e,t);var n={}.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)?re(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function re(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const ie=function(e){var t=e.t,n=e.stateInfo,o=e.userDetails,l=e.CITIZEN,u=e.cityDetails,c=e.mobileView,s=e.handleUserDropdownSelection,f=e.logoUrl,v=e.logoUrlWhite,p=e.showSidebar,m=void 0===p||p,y=e.showLanguageChange,b=e.linkData,h=e.islinkDataLoading,S=ne((0,r.useState)(!1),2),O=S[0],j=S[1],x=(0,a.useNavigate)(),A=ne((0,r.useState)(!1),2),_=A[0],w=A[1],C=function(){j(!1),w(!0)},N=function(){w(!1)},D=function(){j(!O)},I=function(){var e,t;x(l?"/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/citizen/user/profile"):"/".concat(null===(t=window)||void 0===t?void 0:t.contextPath,"/employee/user/profile"))},E=[{name:t("EDIT_PROFILE"),icon:"Edit",func:I},{name:t("CORE_COMMON_LOGOUT"),icon:"Logout",func:C}];return(0,d.jsxs)(i().Fragment,{children:[(0,d.jsx)(g,{t,stateInfo:n,toggleSidebar:D,isSidebarOpen:O,handleLogout:C,userDetails:o,CITIZEN:l,cityDetails:u,mobileView:c,userOptions:E,handleUserDropdownSelection:s,logoUrl:f,logoUrlWhite:v,showLanguageChange:y}),_&&(0,d.jsx)(te.A,{onSelect:function(){Digit.UserService.logout(),w(!1)},onCancel:N,onDismiss:N}),l?l?m&&O&&(0,d.jsx)(ee,{t,CITIZEN:l,isSidebarOpen:O,toggleSidebar:D,handleLogout:C,mobileView:c,userDetails:o,linkData:b,userProfile:I,islinkDataLoading:h}):null:m&&(0,d.jsx)(ee,{t,CITIZEN:l,isSidebarOpen:O,toggleSidebar:D,handleLogout:C,mobileView:c,userDetails:o,linkData:b,userProfile:I,islinkDataLoading:h})]})}},8598:(e,t,n)=>{var r=n(6518),i=n(9504),o=n(7055),l=n(5397),a=n(4598),u=i([].join);r({target:"Array",proto:!0,forced:o!==Object||!a("join",",")},{join:function(e){return u(l(this),void 0===e?",":e)}})},8712:(e,t,n)=>{n.d(t,{j:()=>N,q:()=>_}),n(2675),n(9463),n(2259),n(8706),n(2008),n(3418),n(4423),n(3792),n(2062),n(4782),n(6910),n(2010),n(6099),n(7495),n(8781),n(1699),n(7764),n(5440),n(778),n(2953);var r=n(5053),i=n(6243),o=n(4012),l=n.n(o),a=n(5953),u=(n(5700),n(113),n(9572),n(2892),n(3851),n(1278),n(9432),n(3500),n(4442)),c=n(4848);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach(function(t){v(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function v(e,t,n){return(t=function(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var m=function(e){e.modules,e.additionalComponent;var t,n,r,s,d,v=Digit.Hooks.useAccessControl(),m=v.isLoading,g=v.data,y=Digit.Utils.getMultiRootTenant(),b=(0,a.useTranslation)().t,h=(0,u.useNavigate)(),S=null===(t=Digit)||void 0===t||null===(t=t.ULBService)||void 0===t?void 0:t.getStateId(),O=(s=(0,o.useState)([{}]),d=2,function(e){if(Array.isArray(e))return e}(s)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,l,a=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return a}}(s,d)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var n={}.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)?p(e,t):void 0}}(s,d)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),j=O[0],x=O[1],A=Digit.Hooks.useCustomMDMS(S,"HomeScreenOrder",[{name:"CardsAndLinksOrder"}],{select:function(e){var t;return null==e||null===(t=e.HomeScreenOrder)||void 0===t?void 0:t.CardsAndLinksOrder}}),_=A.data,w=Digit.Hooks.useCustomMDMS(S,"SandBoxLanding",[{name:"AdditionalModuleLinks"}],{select:function(e){var t;return null==e||null===(t=e.SandBoxLanding)||void 0===t?void 0:t.AdditionalModuleLinks}}),C=w.data;w.isLoading,(0,o.useEffect)(function(){x(_)},[_]);var N=function(e,t){if(!e||!t)return null;var n=null==C?void 0:C.find(function(t){return t.moduleName===e.module}),r=null==n?void 0:n[t],i=null==e?void 0:e.links;return(null==i?void 0:i.find(function(e){return(null==e?void 0:e.displayName)===r}))||null},D=function(e){var t,n=null==C?void 0:C.find(function(t){return t.moduleName===e.module});return null==e||null===(t=e.links)||void 0===t?void 0:t.filter(function(e){var t=e.displayName,r="Configure_master"!==t,i=t!==(null==n?void 0:n.howItWorksLink),o=t!==(null==n?void 0:n.userManualLink);return r&&i&&o})},I=null==g?void 0:g.actions.filter(function(e){return"card"===e.url&&e.parentModule}).reduce(function(e,t){var n=t.parentModule;e[n]||(e[n]={module:n,kpis:[],icon:t.leftIcon?Digit.Utils.iconRender(t.leftIcon,"white"):"",label:Digit.Utils.locale.getTransformedLocale("".concat(n,"_CARD_HEADER")),links:[]});var r=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if("/"!=n)return-1===(null===(e=n)||void 0===e?void 0:e.indexOf("/".concat(null===(t=window)||void 0===t?void 0:t.contextPath)))&&y?n=n.replace("/sandbox-ui/employee","/sandbox-ui/".concat(S,"/employee")):n}(t.navigationURL),i=r.indexOf("?");return e[n].links.push({link:r,icon:t.leftIcon,queryParams:-1===i?null:r.substring(i),label:b(Digit.Utils.locale.getTransformedLocale("".concat(n,"_LINK_").concat(t.displayName))),displayName:t.displayName}),e},{});if(m)return(0,c.jsx)(i.Loader,{page:!1,variant:"PageLoader"});if(!I)return"";r=y?function(e){return Object.keys(e).sort(function(e,t){var n,r;return((null==j||null===(n=j.find(function(t){return"card"===t.moduleType&&t.name===e}))||void 0===n?void 0:n.order)||null)-((null==j||null===(r=j.find(function(e){return"card"===e.moduleType&&e.name===t}))||void 0===r?void 0:r.order)||null)}).reduce(function(t,n){var r,i=null==e||null===(r=e[n])||void 0===r||null===(r=r.links)||void 0===r?void 0:r.sort(function(e,t){var r,i,o=null==e?void 0:e.displayName,l=null==t?void 0:t.displayName;return((null==j||null===(r=j.find(function(e){return"link"===e.moduleType&&e.name==="".concat(n,".").concat(o.replace(/\s+/g,"_"))}))||void 0===r?void 0:r.order)||null)-((null==j||null===(i=j.find(function(e){return"link"===e.moduleType&&e.name==="".concat(n,".").concat(l.replace(/\s+/g,"_"))}))||void 0===i?void 0:i.order)||null)});return t[n]=f(f({},e[n]),{},{links:i}),t},{})}(I):I;var E=null===(n=Object.keys(r))||void 0===n?void 0:n.map(function(e,t){var n,o,l=null===(n=r)||void 0===n?void 0:n[e],a=null==l||null===(o=l.links)||void 0===o?void 0:o.find(function(e){return"Configure_master"===(null==e?void 0:e.displayName)}),u=N(l,"howItWorksLink"),s=N(l,"userManualLink"),d={icon:"SupervisorAccount",moduleName:b(null==l?void 0:l.label),metrics:[],links:Digit.Utils.getMultiRootTenant()?D(l):null==l?void 0:l.links,centreChildren:[(0,c.jsx)("div",{children:b(Digit.Utils.locale.getTransformedLocale("MODULE_CARD_DESC_".concat(e)))}),u&&(0,c.jsx)(i.Button,{variation:"teritiary",label:null==u?void 0:u.label,icon:null==u?void 0:u.icon,type:"button",size:"medium",onClick:function(){return window.open(null==u?void 0:u.link,"_blank")},style:{padding:"0px"}})],endChildren:Digit.Utils.getMultiRootTenant()?[a&&(0,c.jsx)(i.Button,{variation:"teritiary",label:null==a?void 0:a.label,icon:null==a?void 0:a.icon,type:"button",size:"medium",onClick:function(){return h(null==a?void 0:a.link)},style:{padding:"0px"}}),s&&(0,c.jsx)(i.Button,{variation:"teritiary",label:null==s?void 0:s.label,icon:null==s?void 0:s.icon,type:"button",size:"medium",onClick:function(){return window.open(null==s?void 0:s.link,"_blank")},style:{padding:"0px"}})]:null};return(0,c.jsx)(i.LandingPageCard,f({buttonSize:"medium"},d))});return(0,c.jsx)(c.Fragment,{children:(0,c.jsx)(i.LandingPageWrapper,{children:l().Children.map(E,function(e){return l().cloneElement(e)})})})};n(6034);var g=n(338);function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var b=function(e){var t,n,l=e.question,u=e.isLabelLink,s=(e.answer,e.type),d=e.actions,f=e.content,v=e.lastIndex,p=(t=(0,o.useState)(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,l,a=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return a}}(t,n)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var n={}.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)?y(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),m=p[0],b=p[1],h=(0,a.useTranslation)().t,S=Digit.ULBService.getStateId(),O="number"===s?"ol":"ul";return(0,c.jsxs)("div",{className:"faqs border-none",onClick:function(){return b(!m)},children:[(0,c.jsxs)("div",{className:"faq-question",style:{justifyContent:"space-between",display:"flex"},children:[(0,c.jsx)("span",{children:h(l)}),(0,c.jsx)("span",{className:m?"faqicon rotate":"faqicon",style:{float:"right"},children:(0,c.jsx)(g.ArrowForward,{})})]}),(0,c.jsxs)("div",{className:"faq-answer",style:m?{display:"block"}:{display:"none"},children:[(0,c.jsx)(r.CardSectionSubText,{style:{marginTop:"1rem"},children:h(f)}),(0,c.jsx)("div",{style:{marginTop:"1rem"},children:d&&(0,c.jsx)(O,{children:d.map(function(e,t){return(0,c.jsxs)("li",{style:{listStyleType:"ul"===O?"disc":"auto",margin:"8px 0"},children:[u?null!=e&&e.label?(0,c.jsx)(i.Button,{variation:"teritiary",label:h(null==e?void 0:e.label),type:"button",size:"medium",onClick:function(){if(null!=e&&e.fulllink)window.open(null==e?void 0:e.link,"_blank");else{var t,n="https://".concat(window.location.hostname,"/").concat(null===(t=window)||void 0===t?void 0:t.globalPath,"/").concat(S);window.open("".concat(n,"/").concat(null==e?void 0:e.link),"_blank")}},style:{padding:"0px"}}):null:null!=e&&e.label?(0,c.jsxs)("strong",{children:[h(null==e?void 0:e.label),":"]}):null,h(null==e?void 0:e.description)]},t)})})})]}),v?null:(0,c.jsx)("div",{className:"cs-box-border"})]})},h=function(e){var t=e.type,n=e.title,i=e.content,o=e.actions,l=(e.style,(0,a.useTranslation)().t),u="number"===t?"ol":"ul";return(0,c.jsxs)("div",{children:[(0,c.jsx)(r.CardSectionHeader,{children:l(n)}),(0,c.jsx)(r.CardSectionSubText,{style:{marginTop:"1rem"},children:l(i)}),(0,c.jsx)("div",{style:{marginTop:"1rem"},children:o&&(0,c.jsx)(u,{children:o.map(function(e,t){return(0,c.jsxs)("li",{style:{listStyleType:"ul"===u?"disc":"auto",margin:"8px 0"},children:[null!=e&&e.label?(0,c.jsxs)("strong",{children:[l(null==e?void 0:e.label),":"]}):null," ",l(null==e?void 0:e.description)]},t)})})})]})},S=function(e){e.key,e.title,e.content;var t=e.faqs,n=e.type;return(0,a.useTranslation)().t,(0,c.jsx)("div",{style:{width:"100%"},children:(0,c.jsx)("div",{style:{width:"100%"},children:t.map(function(e,r){return(0,c.jsx)(b,{question:e.question,answer:e.answer,isLabelLink:e.isLabelLink,type:n,actions:e.answer,content:e.content,lastIndex:r===(null==t?void 0:t.length)-1},"faq_"+r)})})})};const O=function(e){var t=e.cardConfig,n=(0,a.useTranslation)().t;return(0,c.jsxs)(i.Card,{className:"sandbox-guide",style:{width:"25rem",height:"47rem",overflowY:"scroll"},children:[(0,c.jsx)(i.CardHeader,{children:n("GUIDE_TO_SETUP")}),(0,c.jsx)("div",{style:{display:"flex",flexWrap:"wrap"},children:t.map(function(e,n){return"faqs"===(null==e?void 0:e.type)?(0,c.jsx)(S,{title:e.title,type:null==e?void 0:e.type,content:e.content,faqs:e.actions},e.id):(0,c.jsxs)(l().Fragment,{children:[(0,c.jsx)(h,{type:null==e?void 0:e.type,title:e.title,content:e.content,actions:e.actions,style:e.style},e.id),n!==(null==t?void 0:t.length)-1&&(0,c.jsx)(r.BreakLine,{style:{width:"100%",border:"1px solid #d6d5d4"}})]})})})]})};var j=["onSelect","formData","control","formState"];const x=function(e){e.onSelect,e.formData,e.control,e.formState,function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}}(e,j);var t=(0,a.useTranslation)().t,n=Digit.Hooks.useAccessControl(),r=(n.isLoading,n.data),i=(Digit.Utils.getMultiRootTenant(),Digit.ULBService.getStateId());return(null==r?void 0:r.actions.filter(function(e){return"card"===e.url&&e.parentModule}).reduce(function(e,n){var r=n.parentModule;e[r]||(e[r]={module:r,label:Digit.Utils.locale.getTransformedLocale("".concat(r,"_CARD_HEADER")),links:[]});var o=Digit.Utils.transformURL(n.navigationURL,i),l=o.indexOf("?");return e[r].links.push({link:-1===l?o:o.substring(0,l),label:t(Digit.Utils.locale.getTransformedLocale("".concat(r,"_LINK_").concat(n.displayName))),queryParams:-1===l?null:o.substring(l),description:t(Digit.Utils.locale.getTransformedLocale("".concat(r,"_LINK_").concat(n.displayName,"_DESCRIPTION")))}),e},{}))?(0,c.jsx)(O,{cardConfig:[{id:1,type:"faqs",actions:[{question:"SANDBOX_FAQ_QUES_14",isLabelLink:!0,answer:[{label:"SANDBOX_FAQ_ANS_14_LABEL_1",fulllink:!0,link:"https://egov-digit.gitbook.io/digit-sandbox/specifications/user-manual/walkthrough-videos"}]},{question:"SANDBOX_FAQ_QUES_1",content:"SANDBOX_FAQ_CONTENT_1",isLabelLink:!0,answer:[{label:"SANDBOX_FAQ_ANS_1_LABEL_1",link:"citizen/login",description:"SANDBOX_FAQ_ANS_1_DESCRIPTION_1"},{label:"SANDBOX_FAQ_ANS_1_LABEL_2",link:"employee/user/login",description:"SANDBOX_FAQ_ANS_1_DESCRIPTION_2"}]},{question:"SANDBOX_FAQ_QUES_2",content:"SANDBOX_FAQ_CONTENT_2",answer:[{label:null,description:"SANDBOX_FAQ_ANS_2_DESCRIPTION_1"},{label:null,description:"SANDBOX_FAQ_ANS_2_DESCRIPTION_2"},{label:null,description:"SANDBOX_FAQ_ANS_2_DESCRIPTION_3"},{label:null,description:"SANDBOX_FAQ_ANS_2_DESCRIPTION_4"}]},{question:"SANDBOX_FAQ_QUES_3",content:"SANDBOX_FAQ_CONTENT_3",answer:[{label:null,description:"SANDBOX_FAQ_ANS_3_DESCRIPTION_1"},{label:null,description:"SANDBOX_FAQ_ANS_3_DESCRIPTION_2"},{label:null,description:"SANDBOX_FAQ_ANS_3_DESCRIPTION_3"},{label:null,description:"SANDBOX_FAQ_ANS_3_DESCRIPTION_4"}]},{question:"SANDBOX_FAQ_QUES_4",content:"SANDBOX_FAQ_CONTENT_4",answer:[{label:null,description:"SANDBOX_FAQ_ANS_4_DESCRIPTION_1"},{label:null,description:"SANDBOX_FAQ_ANS_4_DESCRIPTION_2"}]},{question:"SANDBOX_FAQ_QUES_5",content:"SANDBOX_FAQ_CONTENT_5",answer:[{label:"SANDBOX_FAQ_ANS_5_LABEL_1",description:"SANDBOX_FAQ_ANS_5_DESCRIPTION_1"},{label:"SANDBOX_FAQ_ANS_5_LABEL_2",description:"SANDBOX_FAQ_ANS_5_DESCRIPTION_2"},{label:"SANDBOX_FAQ_ANS_5_LABEL_3",description:"SANDBOX_FAQ_ANS_5_DESCRIPTION_3"},{label:"SANDBOX_FAQ_ANS_5_LABEL_4",description:"SANDBOX_FAQ_ANS_5_DESCRIPTION_4"},{label:"SANDBOX_FAQ_ANS_5_LABEL_5",description:"SANDBOX_FAQ_ANS_5_DESCRIPTION_5"}]},{question:"SANDBOX_FAQ_QUES_6",content:"SANDBOX_FAQ_CONTENT_6"},{question:"SANDBOX_FAQ_QUES_7",content:"SANDBOX_FAQ_CONTENT_7",answer:[{label:null,description:"SANDBOX_FAQ_ANS_7_DESCRIPTION_1"},{label:null,description:"SANDBOX_FAQ_ANS_7_DESCRIPTION_2"}]},{question:"SANDBOX_FAQ_QUES_8",content:"SANDBOX_FAQ_CONTENT_8",answer:[{label:null,description:"SANDBOX_FAQ_ANS_8_DESCRIPTION_1"},{label:null,description:"SANDBOX_FAQ_ANS_8_DESCRIPTION_2"},{label:null,description:"SANDBOX_FAQ_ANS_8_DESCRIPTION_3"},{label:null,description:"SANDBOX_FAQ_ANS_8_DESCRIPTION_4"}]},{question:"SANDBOX_FAQ_QUES_9",content:"SANDBOX_FAQ_CONTENT_9",answer:[{label:"SANDBOX_FAQ_ANS_9_LABEL_1",description:"SANDBOX_FAQ_ANS_9_DESCRIPTION_1"},{label:"SANDBOX_FAQ_ANS_9_LABEL_2",description:"SANDBOX_FAQ_ANS_9_DESCRIPTION_2"}]},{question:"SANDBOX_FAQ_QUES_10",content:"SANDBOX_FAQ_CONTENT_10",answer:[{label:"SANDBOX_FAQ_ANS_10_LABEL_1",description:"SANDBOX_FAQ_ANS_10_DESCRIPTION_1"},{label:"SANDBOX_FAQ_ANS_10_LABEL_2",description:"SANDBOX_FAQ_ANS_10_DESCRIPTION_2"},{label:"SANDBOX_FAQ_ANS_10_LABEL_3",description:"SANDBOX_FAQ_ANS_10_DESCRIPTION_3"},{label:"SANDBOX_FAQ_ANS_10_LABEL_4",description:"SANDBOX_FAQ_ANS_10_DESCRIPTION_4"}]},{question:"SANDBOX_FAQ_QUES_11",content:"SANDBOX_FAQ_CONTENT_11"},{question:"SANDBOX_FAQ_QUES_12",content:"SANDBOX_FAQ_CONTENT_12"},{question:"SANDBOX_FAQ_QUES_13",content:"SANDBOX_FAQ_CONTENT_13"}]}]}):""};function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var _=function(e,t,n){var r=null==e?void 0:e["".concat(t)];r&&r.map(function(e){Digit.Utils.getMultiRootTenant()&&(e.navigationURL=e.navigationURL.replace("/sandbox-ui/citizen","/sandbox-ui/".concat(Digit.ULBService.getStateId(),"/citizen"))),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_".concat(t)),iconName:"CITIZEN_".concat(t,"_ICON")};return"FSM"===t&&[{role:"FSM_DSO",from:"/".concat(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,l=e.role,a=e.from,u=e.loginLink,c=e.dashoardLink;Digit.UserService.hasAccess(l)?null==o||null===(t=o.links)||void 0===t||t.push({link:a,i18nKey:n(c)}):null==o||null===(r=o.links)||void 0===r||r.push({link:"/".concat(null===(i=window)||void 0===i?void 0:i.contextPath,"/citizen/login"),state:{role:"FSM_DSO",from:a},i18nKey:n(u)})}),o},w=function(e){var t,n=e.modules,o=e.getCitizenMenu,u=e.fetchedCitizen,s=e.isLoading,d=n.filter(function(e){return"Payment"===e.code})[0],f=n.filter(function(e){return"Payment"!==e.code}),v=[d].concat(function(e){if(Array.isArray(e))return A(e)}(t=f)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return A(e,t);var n={}.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)?A(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),p=(0,a.useTranslation)().t;return s?(0,c.jsx)(r.Loader,{}):(0,c.jsx)(l().Fragment,{children:(0,c.jsxs)("div",{className:"citizen-all-services-wrapper",children:[location.pathname.includes("sanitation-ui/citizen/all-services")||location.pathname.includes("sandbox-ui")&&location.pathname.includes("all-services")?null:(0,c.jsx)(i.BackLink,{onClick:function(){return window.history.back()}}),(0,c.jsx)("div",{className:"citizenAllServiceGrid",children:v.filter(function(e){return e}).map(function(e,t){var n,a,s,d,f=e.code;return u&&(a=u?_(o,f,p):void 0),(null===(n=a)||void 0===n||null===(n=n.links)||void 0===n?void 0:n.length)>0?(0,c.jsx)(r.CitizenHomeCard,{header:p(null===(s=a)||void 0===s?void 0:s.header),links:null===(d=a)||void 0===d||null===(d=d.links)||void 0===d||null===(d=d.filter(function(e){return null==e?void 0:e.link}))||void 0===d?void 0:d.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":default:return(0,c.jsx)(i.CustomSVG.PTIcon,{className:"fill-path-primary-main"});case"WS":return(0,c.jsx)(i.CustomSVG.WSICon,{className:"fill-path-primary-main"});case"FSM":return(0,c.jsx)(i.CustomSVG.FSMIcon,{className:"fill-path-primary-main"});case"MCollect":return(0,c.jsx)(i.CustomSVG.MCollectIcon,{className:"fill-path-primary-main"});case"PGR":return(0,c.jsx)(i.CustomSVG.PGRIcon,{className:"fill-path-primary-main"});case"TL":return(0,c.jsx)(i.CustomSVG.TLIcon,{className:"fill-path-primary-main"});case"OBPS":return(0,c.jsx)(i.CustomSVG.OBPSIcon,{className:"fill-path-primary-main"});case"Bills":return(0,c.jsx)(i.CustomSVG.BillsIcon,{className:"fill-path-primary-main"})}}(f)},Info:"OBPS"===f?function(){return(0,c.jsx)(r.CitizenInfoLabel,{style:{margin:"0px",padding:"10px"},info:p("CS_FILE_APPLICATION_INFO_LABEL"),text:p("BPA_CITIZEN_HOME_STAKEHOLDER_INCLUDES_INFO_LABEL")})}:null,isInfo:"OBPS"===f}):(0,c.jsx)(l().Fragment,{})})})]})})},C=function(e){var t=e.modules,n=e.additionalComponent;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:"employee-app-container digit-home-employee-app",children:(0,c.jsx)(i.LandingPageWrapper,{children:null==t?void 0:t.map(function(e,t){var n=e.code,r=Digit.ComponentRegistryService.getComponent("".concat(n,"Card"))||function(){return(0,c.jsx)(l().Fragment,{})};return(0,c.jsx)(r,{},t)})})}),n&&(null==n?void 0:n.length)>0&&n.map(function(e){var t="string"==typeof e?Digit.ComponentRegistryService.getComponent(e):null;return t?(0,c.jsx)("div",{className:"additional-component-wrapper",children:(0,c.jsx)(t,{})}):null})]})},N=function(e){var t=e.userType,n=e.modules,r=e.getCitizenMenu,i=e.fetchedCitizen,o=e.isLoading,l=e.additionalComponent;if("citizen"===t)return(0,c.jsx)(w,{modules:n,getCitizenMenu:r,fetchedCitizen:i,isLoading:o});var a=Digit.UserService.hasAccess("SUPERUSER")&&Digit.Utils.getMultiRootTenant();return Digit.Utils.getRoleBasedHomeCard()?(0,c.jsxs)("div",{className:a?"homeWrapper":"",children:[(0,c.jsx)(m,{modules:n,additionalComponent:l}),a&&!window.Digit.Utils.browser.isMobile()?(0,c.jsx)(x,{}):null]}):(0,c.jsx)(C,{modules:n,additionalComponent:l})}},8876:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s}),n(2675),n(9463),n(2259),n(2008),n(113),n(3418),n(4423),n(3792),n(4782),n(2010),n(6099),n(7495),n(8781),n(1699),n(7764),n(5440),n(3500),n(2953);var r=n(6243),i=n(4012),o=n(4442),l=n(4848);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,l,a=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n={}.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)?u(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(""==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};const s=function(e){var t,n,u=a((0,i.useState)(null),2),s=u[0],d=u[1],f=a((0,i.useState)([]),2),v=f[0],p=f[1],m=a((0,i.useState)([]),2),g=(m[0],m[1],(0,o.useNavigate)()),y=(e.dropdown,Digit.Utils.getMultiRootTenant());return(0,i.useEffect)(function(){var e,t=Digit.SessionStorage.get("citizen.userRequestObject"),n=[],r=[];null==t||null===(e=t.info)||void 0===e||null===(e=e.roles)||void 0===e||e.forEach(function(e){return n.push(e.tenantId)});var i=n.filter(function(e,t,n){return n.indexOf(e)===t});null==i||i.forEach(function(e){var t;r.push({label:"TENANT_TENANTS_".concat(null===(t=c(e,".","_"))||void 0===t?void 0:t.toUpperCase()),value:e})}),null==r||r.filter(function(e){return e.value==Digit.SessionStorage.get("Employee.tenantId")}),p(r)},[s]),(0,l.jsx)("div",{style:null!=e&&e.mobileView?{color:"#767676"}:{},children:y&&1==v.length?(0,l.jsx)(r.CardText,{style:{color:"#363636"},children:null==v||null===(t=v[0])||void 0===t?void 0:t.value}):(0,l.jsx)(r.Dropdown,{t:null==e?void 0:e.t,option:v,selected:v.find(function(e){return e.value===(null==s?void 0:s.value)}),optionKey:"label",select:function(e){var t,n,r,i=Digit.SessionStorage.get("citizen.userRequestObject"),o=null===(t=Digit.SessionStorage.get("citizen.userRequestObject"))||void 0===t||null===(t=t.info)||void 0===t||null===(t=t.roles)||void 0===t?void 0:t.filter(function(t){return t.tenantId===e.value});if((null==o?void 0:o.length)>0&&(i.info.roles=o,i.info.tenantId=null==e?void 0:e.value),Digit.SessionStorage.set("Employee.tenantId",null==e?void 0:e.value),Digit.UserService.setUser(i),d(e),"undefined"!=typeof window&&null!==(n=window.location)&&void 0!==n&&null!==(n=n.href)&&void 0!==n&&n.includes("/".concat(null===(r=window)||void 0===r?void 0:r.contextPath,"/employee/"))){var l,a,u=(null===(l=location.state)||void 0===l?void 0:l.from)||"/".concat(null===(a=window)||void 0===a?void 0:a.contextPath,"/employee");g(u,{replace:!0})}try{"undefined"!=typeof window&&window.location.reload()}catch(e){console.warn("Failed to reload page:",e)}},freeze:!0,customSelector:(0,l.jsx)("label",{className:"cp",children:null==e?void 0:e.t("TENANT_TENANTS_".concat(null===(n=c(Digit.SessionStorage.get("Employee.tenantId"),".","_"))||void 0===n?void 0:n.toUpperCase()))})})})}},8907:(e,t)=>{t.Y=function(e,t){return function(e){return e.split(",").map(function(e){var t=(e=e.trim()).match(n),o=t[1],l=t[2],a=t[3]||"",u={};return u.inverse=!!o&&"not"===o.toLowerCase(),u.type=l?l.toLowerCase():"all",a=a.match(/\([^\)]+\)/g)||[],u.expressions=a.map(function(e){var t=e.match(r),n=t[1].toLowerCase().match(i);return{modifier:n[1],feature:n[2],value:t[2]}}),u})}(e).some(function(e){var n=e.inverse,r="all"===e.type||t.type===e.type;if(r&&n||!r&&!n)return!1;var i=e.expressions.every(function(e){var n=e.feature,r=e.modifier,i=e.value,o=t[n];if(!o)return!1;switch(n){case"orientation":case"scan":return o.toLowerCase()===i.toLowerCase();case"width":case"height":case"device-width":case"device-height":i=c(i),o=c(o);break;case"resolution":i=u(i),o=u(o);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":i=a(i),o=a(o);break;case"grid":case"color":case"color-index":case"monochrome":i=parseInt(i,10)||1,o=parseInt(o,10)||0}switch(r){case"min":return o>=i;case"max":return o<=i;default:return o===i}});return i&&!n||!i&&n})};var n=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,r=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,i=/^(?:(min|max)-)?(.+)/,o=/(em|rem|px|cm|mm|in|pt|pc)?$/,l=/(dpi|dpcm|dppx)?$/;function a(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function u(e){var t=parseFloat(e);switch(String(e).match(l)[1]){case"dpcm":return t/2.54;case"dppx":return 96*t;default:return t}}function c(e){var t=parseFloat(e);switch(String(e).match(o)[1]){case"em":case"rem":return 16*t;case"cm":return 96*t/2.54;case"mm":return 96*t/2.54/10;case"in":return 96*t;case"pt":return 72*t;case"pc":return 72*t/12;default:return t}}},8980:(e,t,n)=>{var r=n(6518),i=n(9213).findIndex,o=n(6469),l="findIndex",a=!0;l in[]&&Array(1)[l](function(){a=!1}),r({target:"Array",proto:!0,forced:a},{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o(l)},9229:(e,t,n)=>{n.d(t,{A:()=>A}),n(2675),n(9463),n(2259),n(5700),n(8706),n(2008),n(3418),n(4423),n(3792),n(2062),n(4782),n(6910),n(4554),n(9572),n(2010),n(2892),n(3851),n(1278),n(9432),n(6099),n(7495),n(8781),n(1699),n(7764),n(778),n(3500),n(2953);var r=n(4012),i=n.n(r),o=n(5053),l=n(4442),a=n(5957),u=n(4848);var c=n(5953),s=n(6724),d=n(8876),f=n(1926),v=n(1599);function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach(function(t){y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function y(e,t,n){return(t=function(e){var t=function(e){if("object"!=p(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==p(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||S(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,l,a=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return a}}(e,t)||S(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){if(e){if("string"==typeof e)return O(e,t);var n={}.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)?O(e,t):void 0}}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var j=function(e){var t=e.info,n=(e.stateName,e.t);return(0,u.jsxs)("div",{className:"profile-section",children:[(0,u.jsx)("div",{className:"imageloader imageloader-loaded",children:(0,u.jsx)(v.A,{className:"img-responsive img-circle img-Profile",src:f.X,alt:"Profile Logo"})}),(0,u.jsx)("div",{id:"profile-name",className:"label-container name-Profile",children:(0,u.jsxs)("div",{className:"label-text",children:[" ",null==t?void 0:t.name," "]})}),(0,u.jsx)("div",{id:"profile-location",className:"label-container loc-Profile",children:(0,u.jsxs)("div",{className:"label-text",children:[" ",null==t?void 0:t.mobileNumber," "]})}),(null==t?void 0:t.emailId)&&(0,u.jsx)("div",{id:"profile-emailid",className:"label-container loc-Profile",children:(0,u.jsxs)("div",{className:"label-text",children:[" ",t.emailId," "]})}),(0,u.jsx)("div",{className:"profile-divider"}),window.location.href.includes("/employee")&&!window.location.href.includes("/employee/user/login")&&!window.location.href.includes("employee/user/language-selection")&&(0,u.jsx)(d.default,{t:n,mobileView:!0})]})},x={CommonPTIcon:(0,u.jsx)(o.PTIcon,{className:"icon"}),OBPSIcon:(0,u.jsx)(o.OBPSIcon,{className:"icon"}),propertyIcon:(0,u.jsx)(o.PropertyHouse,{className:"icon"}),TLIcon:(0,u.jsx)(o.CaseIcon,{className:"icon"}),PGRIcon:(0,u.jsx)(o.PGRIcon,{className:"icon"}),FSMIcon:(0,u.jsx)(o.FSMIcon,{className:"icon"}),WSIcon:(0,u.jsx)(o.WSICon,{className:"icon"}),MCollectIcon:(0,u.jsx)(o.MCollectIcon,{className:"icon"}),BillsIcon:(0,u.jsx)(o.CollectionIcon,{className:"icon"}),BirthIcon:(0,u.jsx)(o.BirthIcon,{className:"icon"}),DeathIcon:(0,u.jsx)(o.DeathIcon,{className:"icon"}),FirenocIcon:(0,u.jsx)(o.FirenocIcon,{className:"icon"}),HomeIcon:(0,u.jsx)(o.HomeIcon,{className:"icon"}),EditPencilIcon:(0,u.jsx)(o.EditPencilIcon,{className:"icon"}),LogoutIcon:(0,u.jsx)(o.LogoutIcon,{className:"icon"}),Phone:(0,u.jsx)(o.Phone,{className:"icon"})};const A=function(e){var t,n,d,f=e.linkData,v=e.islinkDataLoading,p=(0,c.useTranslation)().t,m=(0,l.useNavigate)(),y=(0,l.useLocation)().pathname,S=Digit.Hooks.useStore.getInitData(),O=S.data,A=S.isFetched,_=(O||{}).stateInfo,w=Digit.UserService.getUser(),C=window.Digit.Utils.browser.isMobile(),N=h((0,r.useState)(!1),2),D=N[0],I=(N[1],h((0,r.useState)(!1),2)),E=(I[0],I[1]),T=h((0,r.useState)(!1),2),L=T[0],P=T[1],k=function(){P(!1)};if(v)return(0,u.jsx)(o.Loader,{});var R=function(){var e;m("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/citizen/user/profile"))},U=b(function(e,t,n){return[{type:"component",element:"LANGUAGE",action:(0,u.jsx)(a.A,{}),icon:"LanguageIcon"},{id:"login-btn",element:"LOGIN",text:e("CORE_COMMON_LOGIN"),icon:(0,u.jsx)(o.LogoutIcon,{className:"icon"}),populators:{onClick:n}}]}(p,0,function(){var e;m("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/citizen/login"))}));U=U.filter(function(e){return"LANGUAGE"!==e.element});var B,M,F,V,z,H,X=Digit.ULBService.getCurrentTenantId(),G=function(e){var t,n,r=e.item,i=(null==r?void 0:r.icon)||(null===(t=r.icon)||void 0===t||null===(t=t.type)||void 0===t?void 0:t.name),o=i?x[i]:x.BillsIcon;n="component"===r.type?r.action:r.text;var a=function(){return(0,u.jsxs)("span",g(g({className:"menu-item"},r.populators),{},{children:[o,(0,u.jsx)("div",{className:"menu-label",children:n})]}))};return"external-link"===r.type?(0,u.jsx)("a",{href:r.link,children:(0,u.jsx)(a,{})}):"link"===r.type?(0,u.jsx)(l.Link,{to:null==r?void 0:r.link,children:(0,u.jsx)(a,{})}):(0,u.jsx)(a,{})};return A&&w&&w.access_token&&"CITIZEN"===(null==w||null===(t=w.info)||void 0===t?void 0:t.type)&&(B=(0,u.jsx)(j,{info:null==w?void 0:w.info,stateName:null==_?void 0:_.name,t:p}),U=U.filter(function(e){return"login-btn"!==(null==e?void 0:e.id)}),U=[].concat(b(U),[{type:"link",icon:"HomeIcon",element:"HOME",text:p("COMMON_BOTTOM_NAVIGATION_HOME"),link:D?"/".concat(null===(M=window)||void 0===M?void 0:M.contextPath,"/employee"):"/".concat(null===(F=window)||void 0===F?void 0:F.contextPath,"/citizen"),populators:{onClick:function(){var e;m("/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/citizen/all-services"))}}},{text:p("EDIT_PROFILE"),element:"PROFILE",icon:"EditPencilIcon",populators:{onClick:R}},{text:p("CORE_COMMON_LOGOUT"),element:"LOGOUT",icon:"LogoutIcon",populators:{onClick:function(){E(!1),P(!0)}}},{text:(0,u.jsxs)(i().Fragment,{children:[p("CS_COMMON_HELPLINE"),(0,u.jsxs)("div",{className:"telephone",style:{marginTop:"-10%"},children:[null==O||null===(V=O.tenants)||void 0===V?void 0:V.map(function(e){var t,n,r,i;e.code===X?("tel:".concat(null==O||null===(t=O.tenants)||void 0===t?void 0:t[e].contactNumber),null==O||null===(n=O.tenants)||void 0===n||n[e].contactNumber):("tel:".concat(null==O||null===(r=O.tenants)||void 0===r?void 0:r[0].contactNumber),null==O||null===(i=O.tenants)||void 0===i||i[0].contactNumber)}),(0,u.jsx)("div",{className:"link",children:(0,u.jsx)("a",{href:"tel:".concat(null==O||null===(z=O.tenants)||void 0===z?void 0:z[0].contactNumber),children:null==O||null===(H=O.tenants)||void 0===H?void 0:H[0].contactNumber})})]})]}),element:"Helpline",icon:"Phone"}])),null===(n=Object.keys(f))||void 0===n||null===(n=n.sort(function(e,t){return t.localeCompare(e)}))||void 0===n||n.map(function(e){var t,n,r,i,o;(null===(t=f[e][0])||void 0===t?void 0:t.sidebar)==="".concat(window.contextPath,"-links")&&U.splice(1,0,{type:null!==(n=f[e][0])&&void 0!==n&&null!==(n=n.sidebarURL)&&void 0!==n&&n.includes(null===(r=window)||void 0===r?void 0:r.contextPath)?"link":"external-link",text:p("ACTION_TEST_".concat(Digit.Utils.locale.getTransformedLocale(e))),links:f[e],icon:null===(i=f[e][0])||void 0===i?void 0:i.leftIcon,link:null===(o=f[e][0])||void 0===o?void 0:o.sidebarURL})}),(0,u.jsx)(i().Fragment,{children:(0,u.jsxs)("div",{children:[(0,u.jsx)("div",{style:{height:"100%",width:"100%",top:"0px",backgroundColor:"rgba(0, 0, 0, 0.54)",pointerzevents:"auto"}}),(0,u.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:C?"calc(100vh - 56px)":"auto",zIndex:"99"},children:[B,(0,u.jsx)("div",{className:"drawer-desktop",children:null===(d=U)||void 0===d?void 0:d.map(function(e,t){return(0,u.jsx)("div",{className:"sidebar-list ".concat(y===(null==e?void 0:e.link)||y===(null==e?void 0:e.sidebarURL)?"active":""),children:(0,u.jsx)(G,{item:e})},t)})})]}),(0,u.jsx)("div",{children:L&&(0,u.jsx)(s.A,{onSelect:function(){var e;Digit.Utils.getMultiRootTenant()?(Digit.UserService.logout(),P(!1),window.location.href="/".concat(null===(e=window)||void 0===e?void 0:e.contextPath,"/citizen/login")):(Digit.UserService.logout(),P(!1))},onCancel:k,onDismiss:k})})]})})}}}]);
3
+ //# sourceMappingURL=150.main.js.map
@@ -0,0 +1,16 @@
1
+ /*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation.
3
+
4
+ Permission to use, copy, modify, and/or distribute this software for any
5
+ purpose with or without fee is hereby granted.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
+ PERFORMANCE OF THIS SOFTWARE.
14
+ ***************************************************************************** */
15
+
16
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */