@ukpc-lib/react 0.6.0 → 0.7.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.
- package/dist/components/GlobalMenu/components/MenuIconComponent.d.ts +6 -0
- package/dist/components/GlobalMenu/components/MenuItem.d.ts +2 -2
- package/dist/components/GlobalMenu/data.json.d.ts +2 -2
- package/dist/components/index.cjs +3 -3
- package/dist/components/index.js +86 -82
- package/dist/components/main.d.ts +1 -0
- package/dist/{index.module-cfbc6ea7.js → index.module-63de61bd.js} +15141 -15111
- package/dist/{index.module-e5aa92d9.cjs → index.module-f5520a90.cjs} +110 -110
- package/dist/share/index.cjs +1 -1
- package/dist/share/index.js +5 -5
- package/package.json +1 -1
- package/web-components-bundle/favorite-menu/index.js +1 -1
- package/web-components-bundle/global-menu/index.js +1 -1
- package/web-components-bundle/global-topbar/index.js +1 -1
- package/web-components-bundle/has-permission/index.js +1 -1
- package/web-components-bundle/{index-e2fdbb1b.js → index-743ae6f9.js} +8152 -8121
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { MenuItemDto } from '../models';
|
|
3
|
+
export type IconType = 'text' | 'svgHtml' | 'svgHttp' | 'img';
|
|
4
|
+
export declare function IconComponent({ item }: {
|
|
5
|
+
item: MenuItemDto;
|
|
6
|
+
}): ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Identity, MenuItemDto } from '../models';
|
|
2
|
-
import { ColorsType } from '../../../theme/Colors';
|
|
3
1
|
import { NodeModel, RenderParams } from '@minoru/react-dnd-treeview';
|
|
2
|
+
import { ColorsType } from '../../../theme/Colors';
|
|
3
|
+
import { Identity, MenuItemDto } from '../models';
|
|
4
4
|
export type OwnMenuItemProps = {
|
|
5
5
|
replacePath?(path: string): string;
|
|
6
6
|
ssr?: boolean;
|
|
@@ -426,7 +426,7 @@ declare const _default: [
|
|
|
426
426
|
"serviceKey": "menu_ihub_insight_web_dashboard",
|
|
427
427
|
"name": "Dashboard",
|
|
428
428
|
"path": "/ihub/dashboard",
|
|
429
|
-
"icon": "
|
|
429
|
+
"icon": "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7.07707 8.92308C7.75646 8.92308 8.30784 9.47446 8.30784 10.1538V18.7692C8.30784 19.4486 7.75646 20 7.07707 20H4.61553C3.93615 20 3.38477 19.4486 3.38477 18.7692V10.1538C3.38477 9.47446 3.93615 8.92308 4.61553 8.92308H7.07707ZM19.3848 12.6154C20.0642 12.6154 20.6155 13.1668 20.6155 13.8462V18.7692C20.6155 19.4486 20.0642 20 19.3848 20H16.9232C16.2438 20 15.6925 19.4486 15.6925 18.7692V13.8462C15.6925 13.1668 16.2438 12.6154 16.9232 12.6154H19.3848ZM13.2309 4C13.9103 4 14.4617 4.55138 14.4617 5.23077V18.7692C14.4617 19.4486 13.9103 20 13.2309 20H10.7694C10.09 20 9.53861 19.4486 9.53861 18.7692V5.23077C9.53861 4.55138 10.09 4 10.7694 4H13.2309Z\" fill=\"#85858A\"/>\n</svg>\n",
|
|
430
430
|
"order": 1,
|
|
431
431
|
"isActive": true,
|
|
432
432
|
"parentKey": 1172,
|
|
@@ -449,7 +449,7 @@ declare const _default: [
|
|
|
449
449
|
"serviceKey": "menu_ihub_insight_web_dashboard",
|
|
450
450
|
"name": "Dashboard 1",
|
|
451
451
|
"path": "/ihub/dashboard",
|
|
452
|
-
"icon": "
|
|
452
|
+
"icon": "",
|
|
453
453
|
"order": 1,
|
|
454
454
|
"isActive": true,
|
|
455
455
|
"parentKey": 1173,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),E=require("react"),p=require("../index.module-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),E=require("react"),p=require("../index.module-f5520a90.cjs"),Z=require("moment"),N=require("@mui/material");require("@r2wc/react-to-web-component");require("axios");const gt=require("react-router-dom");require("react-query");const Qr=require("react-dom");function eo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const F=eo(E),to=e=>{var r,o;const{tabs:t}=e,n=i=>{e.setCurrentTab(i.target.id)};return console.log("🚀 ~ brandColors:",e.currentTab),s.jsxs(s.Fragment,{children:[s.jsx("style",{children:`
|
|
2
2
|
.tab-title {
|
|
3
3
|
min-width: 90px;
|
|
4
4
|
padding: 5px 16px;
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
`;function uo(e){return s.jsxs("svg",{width:"34",height:"25",viewBox:"0 0 34 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[s.jsxs("g",{"clip-path":"url(#clip0_16865_28134)",children:[s.jsx("rect",{y:"0.5",width:"34",height:"24",rx:"3",fill:"#1A47B8"}),s.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.61691 0.5H0V4.5L30.3635 24.5L34 24.5V20.5L3.61691 0.5Z",fill:"white"}),s.jsx("path",{d:"M1.20635 0.5L34 22.1567V24.5H32.8219L0 2.82089V0.5H1.20635Z",fill:"#F93939"}),s.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M30.7619 0.5H34V4.5C34 4.5 12.9683 17.8249 3.2381 24.5H0V20.5L30.7619 0.5Z",fill:"white"}),s.jsx("path",{d:"M34 0.5H32.9019L0 22.1753V24.5H1.20635L34 2.83842V0.5Z",fill:"#F93939"}),s.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.3648 0.5H21.6635V7.90291H34V17.0922H21.6635V24.5H12.3648V17.0922H0V7.90291H12.3648V0.5Z",fill:"white"}),s.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.3158 0.5H19.6842V9.73077H34V15.2692H19.6842V24.5H14.3158V15.2692H0V9.73077H14.3158V0.5Z",fill:"#F93939"})]}),s.jsx("defs",{children:s.jsx("clipPath",{id:"clip0_16865_28134",children:s.jsx("rect",{y:"0.5",width:"34",height:"24",rx:"3",fill:"white"})})})]})}function fo(e){return s.jsxs("svg",{width:"34",height:"24",viewBox:"0 0 34 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[s.jsxs("g",{"clip-path":"url(#clip0_16886_62505)",children:[s.jsx("rect",{width:"34",height:"24",rx:"3",fill:"#F93939"}),s.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0 16H34V24H0V16Z",fill:"#FFDA2C"}),s.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0 0H34V8H0V0Z",fill:"#151515"})]}),s.jsx("defs",{children:s.jsx("clipPath",{id:"clip0_16886_62505",children:s.jsx("rect",{width:"34",height:"24",rx:"3",fill:"white"})})})]})}const mo=E.createContext({}),ar=!0;function ho({baseColor:e,highlightColor:t,width:n,height:r,borderRadius:o,circle:i,direction:a,duration:l,enableAnimation:u=ar}){const d={};return a==="rtl"&&(d["--animation-direction"]="reverse"),typeof l=="number"&&(d["--animation-duration"]=`${l}s`),u||(d["--pseudo-element-display"]="none"),(typeof n=="string"||typeof n=="number")&&(d.width=n),(typeof r=="string"||typeof r=="number")&&(d.height=r),(typeof o=="string"||typeof o=="number")&&(d.borderRadius=o),i&&(d.borderRadius="50%"),typeof e<"u"&&(d["--base-color"]=e),typeof t<"u"&&(d["--highlight-color"]=t),d}function po({count:e=1,wrapper:t,className:n,containerClassName:r,containerTestId:o,circle:i=!1,style:a,...l}){var u,d,m;const h=E.useContext(mo),y={...l};for(const[_,C]of Object.entries(l))typeof C>"u"&&delete y[_];const b={...h,...y,circle:i},v={...a,...ho(b)};let c="react-loading-skeleton";n&&(c+=` ${n}`);const f=(u=b.inline)!==null&&u!==void 0?u:!1,x=[],w=Math.ceil(e);for(let _=0;_<w;_++){let C=v;if(w>e&&_===w-1){const S=(d=C.width)!==null&&d!==void 0?d:"100%",j=e%1,I=typeof S=="number"?S*j:`calc(${S} * ${j})`;C={...C,width:I}}const g=E.createElement("span",{className:c,style:C,key:_},"");f?x.push(g):x.push(E.createElement(E.Fragment,{key:_},g,E.createElement("br",null)))}return E.createElement("span",{className:r,"data-testid":o,"aria-live":"polite","aria-busy":(m=b.enableAnimation)!==null&&m!==void 0?m:ar},t?x.map((_,C)=>E.createElement(t,{key:C},_)):x)}const go=`@keyframes react-loading-skeleton{to{transform:translate(100%)}}.react-loading-skeleton{--base-color: #ebebeb;--highlight-color: #f5f5f5;--animation-duration: 1.5s;--animation-direction: normal;--pseudo-element-display: block;background-color:var(--base-color);width:100%;border-radius:.25rem;display:inline-flex;line-height:1;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;overflow:hidden}.react-loading-skeleton:after{content:" ";display:var(--pseudo-element-display);position:absolute;top:0;left:0;right:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(90deg,var(--base-color),var(--highlight-color),var(--base-color));transform:translate(-100%);animation-name:react-loading-skeleton;animation-direction:var(--animation-direction);animation-duration:var(--animation-duration);animation-timing-function:ease-in-out;animation-iteration-count:infinite}@media (prefers-reduced-motion){.react-loading-skeleton{--pseudo-element-display: none}}
|
|
37
37
|
`;function yo({classNames:e="",...t}){const{logo:n,user:r,baseUrl:o,notiPath:i,style:a,customColors:l,notiprops:u,isBrand:d,logout:m}=t,h=n||"https://ukpcsaprod.blob.core.windows.net/lib/images/logo-header.png",y={...a,color:(l==null?void 0:l.headerTextColor)||"white",backgroundColor:(l==null?void 0:l.headerBgColor)||"black"},[b,v]=E.useState(!1);return s.jsxs(p.StyleWrapper,{styles:[ao,so,co,lo,go],style:{zIndex:1202},id:"topbar-wrapper",children:[s.jsx("nav",{className:`navbar ${e}`,style:l?y:a,children:s.jsxs("div",{className:"navbar-container",children:[s.jsx("div",{className:"logo-container",children:s.jsx("img",{src:h,alt:"logo-header",style:{height:"40px"}})}),s.jsxs("div",{className:"right-side-container",children:[d?s.jsx("span",{children:s.jsxs("label",{className:"topbar-search-label",htmlFor:"topbar-search",children:[s.jsx("input",{name:"topbar-search",className:"topbar-search-input",placeholder:"Search"}),s.jsx("img",{id:"icon",src:io,alt:"icon"})]})}):"",t.customElement,s.jsx("span",{children:s.jsxs(p.CustomOpenListProvider,{children:[s.jsx(Jr,{baseUrl:u.baseUrl,path:u.path,apiKey:u.apiKey,authDomain:u.authDomain,projectId:u.projectId,storageBucket:u.storageBucket,messagingSenderId:u.messagingSenderId,appId:u.appId,measurementId:u.measurementId,vapidKey:u.vapidKey}),s.jsx(oo,{iconColor:l==null?void 0:l.headerTextColor,baseUrl:o,notiPath:i,brandColors:l})]})}),s.jsx(vo,{}),s.jsxs("div",{className:"userContainer",children:[s.jsx(xo,{primaryColor:l==null?void 0:l.headerTextColor,avatarUrl:r==null?void 0:r.avatarUrl,userName:r==null?void 0:r.firstName,setShowConfirmModal:v}),s.jsx("p",{className:"userFullName",style:{color:l==null?void 0:l.headerTextColor,width:t.isFetching?"100px":"auto"},children:t.isFetching?s.jsx(po,{baseColor:"#ebebeb26",highlightColor:"#f5f5f57d",style:{lineHeight:"unset"}}):r?r.firstName+" "+r.lastName:"Unknown User"})]})]})]})}),s.jsx(p.LogoutConfirmModal,{isOpen:b,onClose:()=>v(!1),onConfirm:m})]})}function vo(){var a;const e=[{value:p.Language.en,element:s.jsx(uo,{})},{value:p.Language.de,element:s.jsx(fo,{})}],[t,n]=E.useState(!1);E.useState(new Array(e.length).fill(!1));const{language:r,setLanguage:o}=p.useCustomTranslation();E.useEffect(()=>{Zt({childrenClass:"languageDropdown",action(){n(!1)}})},[]);const i=(a=e.find(l=>l.value==r))==null?void 0:a.element;return s.jsx("div",{className:"languageDropdownContainer",style:{position:"relative"},children:s.jsx("div",{className:"languageDropdown",onClick:()=>{n(!t)},children:i})})}function xo({avatarUrl:e,userName:t}){const[n,r]=E.useState(!1),o=E.useRef(null);return E.useRef(null),E.useState(!1),E.useState(!1),E.useEffect(()=>{Zt({childrenClass:"userAvatar",action(){r(!1)}})},[]),s.jsx(s.Fragment,{children:s.jsx("div",{style:{position:"relative"},children:e?s.jsx("img",{onClick:()=>r(!n),ref:o,alt:"user avatar",className:"userAvatar",src:e}):s.jsx("div",{onClick:()=>r(!n),ref:o,className:"userAvatar",id:"userAvatarNull",children:(t==null?void 0:t.charAt(0))??""})})})}function bo(e){const{user:t,logout:n,isFetching:r}=p.useAuth();return s.jsx(yo,{...e,isFetching:r,user:t,logout:n})}const _o=e=>s.jsx(p.Q,{autoClose:3e3,hideProgressBar:!0,closeButton:!1,position:"bottom-left",newestOnTop:!0,pauseOnFocusLoss:!1,style:{fontFamily:"inherit"},...e}),wo=e=>s.jsx(p.Q,{autoClose:3e3,hideProgressBar:!0,closeButton:!1,position:"bottom-left",newestOnTop:!0,pauseOnFocusLoss:!1,style:{fontFamily:"inherit",width:"610px"},containerId:"toastifyNotification",...e}),So=({children:e})=>s.jsxs(N.Stack,{justifyContent:"center",alignItems:"center",sx:{backgroundColor:"#FAFAFA",minHeight:"450px"},children:[s.jsx(Co,{}),e]});function Co(){return s.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"150",height:"150",fill:"none",viewBox:"0 0 150 150",children:[s.jsx("path",{fill:"#F9FAFB",d:"M120.843 66.48a2.885 2.885 0 100-5.77 2.885 2.885 0 000 5.77zM75 127.04c28.319 0 51.276-9.006 51.276-20.115 0-11.11-22.957-20.115-51.276-20.115-28.32 0-51.276 9.006-51.276 20.115 0 11.109 22.957 20.115 51.276 20.115z"}),s.jsx("path",{fill:"#DDD",d:"M73.354 34.489l-2.13 13.355H57.378L73.354 34.49z"}),s.jsx("path",{fill:"#F9FAFB",d:"M71.223 48.157H57.38a.313.313 0 01-.295-.206.313.313 0 01.093-.346L73.154 34.25a.313.313 0 01.508.288l-2.13 13.357a.308.308 0 01-.308.263zm-12.983-.625h12.717l1.957-12.268L58.24 47.532zM74.63 59.596a.314.314 0 01-.252-.128l-.844-1.15a.314.314 0 01.043-.418.311.311 0 01.42.003c.005.005.012.01.018.018a.188.188 0 01.015.018l.045.06.807 1.1a.312.312 0 01-.252.497z"}),s.jsx("path",{fill:"#000",d:"M74.63 59.596a.314.314 0 01-.252-.128l-.844-1.15a.314.314 0 01.043-.418.311.311 0 01.42.003c.005.005.012.01.018.018a.188.188 0 01.015.018l.045.06.807 1.1a.312.312 0 01-.252.497z"}),s.jsx("path",{fill:"#85858A",d:"M74.454 58.965l3.503 4.775c-.209-.284-.431-.56-.667-.83-2.59-2.952-6.367-4.428-10.378-4.428-1.74 0-3.524.278-5.275.833l-3.503-4.775a17.477 17.477 0 015.275-.833c4.011 0 7.788 1.476 10.378 4.428.236.27.458.546.667.83z"}),s.jsx("path",{fill:"#F9FAFB",d:"M77.957 64.053a.314.314 0 01-.253-.128c-.203-.278-.422-.55-.65-.81-2.446-2.786-6.047-4.32-10.143-4.32-1.727 0-3.468.274-5.18.818a.316.316 0 01-.348-.113l-3.503-4.775a.312.312 0 01.158-.483 17.748 17.748 0 015.37-.847c4.278 0 8.047 1.61 10.612 4.533.24.274.47.561.685.853l3.5 4.772.003.003a.311.311 0 01-.251.497zM66.912 58.17c3.207 0 6.128.905 8.471 2.59l-1.18-1.61c-.203-.278-.423-.55-.65-.81-2.446-2.786-6.048-4.32-10.144-4.32-1.586 0-3.186.231-4.762.691l3.11 4.24a17.67 17.67 0 015.155-.782zM56.104 81.024a.312.312 0 01-.233-.105l-.049-.055a8.826 8.826 0 01-.458-.571l-3.503-4.775a.312.312 0 01.504-.37l.003.005c.132.179.274.355.422.525l.045.05.02.023 3.502 4.775a.312.312 0 01-.253.498z"}),s.jsx("path",{fill:"#000",d:"M56.104 81.024a.312.312 0 01-.233-.105l-.049-.055a8.826 8.826 0 01-.458-.571l-3.503-4.775a.312.312 0 01.504-.37l.003.005c.132.179.274.355.422.525l.045.05.02.023 3.502 4.775a.312.312 0 01-.253.498z"}),s.jsx("path",{fill:"#85858A",d:"M52.855 76.208l3.503 4.775a7.826 7.826 0 01-.743-.875l-3.503-4.775a7.8 7.8 0 00.743.875z"}),s.jsx("path",{fill:"#F9FAFB",d:"M56.358 81.296a.311.311 0 01-.223-.095 7.86 7.86 0 01-.773-.908l-3.502-4.775a.312.312 0 11.504-.37l.003.005a7.954 7.954 0 00.712.837l.03.034 3.502 4.775a.313.313 0 01-.253.497z"}),s.jsx("path",{fill:"#F9FAFB",d:"M56.358 81.296a.311.311 0 01-.223-.095 7.361 7.361 0 01-.265-.283l-.01-.011c-.036-.044-.078-.103-.117-.157l-.043-.06-3.353-4.57a.312.312 0 01.485-.394c.08.09.163.177.246.263l.03.033 3.502 4.775a.313.313 0 01-.252.499z"}),s.jsx("path",{fill:"#000",d:"M56.358 81.296a.311.311 0 01-.223-.095 7.361 7.361 0 01-.265-.283l-.01-.011c-.036-.044-.078-.103-.117-.157l-.043-.06-3.353-4.57a.312.312 0 01.485-.394c.08.09.163.177.246.263l.03.033 3.502 4.775a.313.313 0 01-.252.499z"}),s.jsx("path",{fill:"#85858A",d:"M52.855 76.208l3.503 4.775a7.826 7.826 0 01-.743-.875l-3.503-4.775a7.8 7.8 0 00.743.875z"}),s.jsx("path",{fill:"#F9FAFB",d:"M56.358 81.296a.311.311 0 01-.223-.095 7.86 7.86 0 01-.773-.908l-3.502-4.775a.312.312 0 11.504-.37l.003.005a7.954 7.954 0 00.712.837l.03.034 3.502 4.775a.313.313 0 01-.253.497z"}),s.jsx("path",{fill:"#EEE",d:"M71.03 70.342a11.476 11.476 0 01-1.11 2.438 12.543 12.543 0 01-2.703 3.136c-2.342 1.96-5.159 2.937-7.82 2.937-2.66 0-5.164-.98-6.88-2.938C49.078 72 50.09 65.651 54.775 61.738c2.343-1.96 5.16-2.938 7.82-2.938s5.165.98 6.881 2.938a8.329 8.329 0 01.754 1.008 8.034 8.034 0 011.056 2.539c.376 1.62.28 3.364-.257 5.057z"}),s.jsx("path",{fill:"#98A2B3",d:"M71.289 65.285h-9.161c-.967 0-1.632-.754-1.482-1.688.148-.933 1.052-1.687 2.02-1.687h6.956a8.024 8.024 0 011.667 3.375zM71.03 70.342a11.476 11.476 0 01-1.11 2.438c-.155.256-.32.51-.5.76h-8.705c-.918 0-1.543-.716-1.403-1.6.142-.883.997-1.6 1.913-1.6h9.805v.002z"}),s.jsx("path",{fill:"#F7F9FC",d:"M73.632 34.257h38.646l-.591 3.703-10.155 63.675H48.801l3.071-19.259c2.022 1.048 4.33 1.571 6.72 1.571 3.213 0 6.576-.946 9.602-2.839h27.097c.471 0 .909-.366.983-.82.072-.452-.25-.819-.72-.819H70.44c2.295-1.933 3.996-4.255 5.068-6.708h21.116c.47 0 .908-.367.98-.818.072-.453-.25-.82-.72-.82H76.129c.712-2.236.91-4.531.57-6.71h21.256c.47 0 .908-.366.98-.817.073-.453-.25-.821-.719-.821H76.333a12.247 12.247 0 00-2.544-4.642c-2.59-2.951-6.367-4.427-10.378-4.427-2.389 0-4.86.523-7.215 1.569l1.184-7.432h13.845l2.13-13.354.277-.232zM93.96 89.454c.47 0 .908-.366.982-.82.072-.452-.25-.819-.72-.819H61.258c-.468 0-.907.367-.979.818-.072.453.25.821.718.821h32.964zm5.325-33.386c.47 0 .908-.367.981-.818.072-.453-.25-.82-.72-.82H77.201c-.47 0-.907.366-.979.82-.072.451.247.818.718.818h22.346z"}),s.jsx("path",{fill:"#F9FAFB",d:"M101.532 101.946h-52.73a.311.311 0 01-.309-.361l3.072-19.259a.312.312 0 01.453-.228c1.942 1.006 4.215 1.537 6.576 1.537 3.255 0 6.517-.966 9.435-2.792a.317.317 0 01.165-.047h27.098c.316 0 .625-.256.672-.557a.39.39 0 00-.08-.32.423.423 0 00-.331-.137H70.44a.313.313 0 01-.201-.551c2.175-1.834 3.898-4.114 4.983-6.595a.313.313 0 01.286-.187h21.116c.316 0 .625-.254.672-.556a.392.392 0 00-.08-.32.423.423 0 00-.331-.138H76.128a.314.314 0 01-.299-.407c.696-2.182.889-4.453.56-6.566a.31.31 0 01.308-.361h21.256c.316 0 .625-.254.672-.555a.392.392 0 00-.08-.321.423.423 0 00-.331-.138h-21.88a.312.312 0 01-.3-.225 11.883 11.883 0 00-2.481-4.523c-2.446-2.786-6.047-4.32-10.143-4.32-2.367 0-4.818.532-7.09 1.542a.316.316 0 01-.317-.037.31.31 0 01-.118-.298l1.184-7.431a.313.313 0 01.309-.264h13.578l2.087-13.092a.314.314 0 01.107-.19l.278-.235a.316.316 0 01.201-.074h38.649a.312.312 0 01.308.361L101.84 101.68a.31.31 0 01-.308.267zm-52.365-.625h52.098l10.646-66.753H73.746l-.102.086-2.11 13.24a.313.313 0 01-.309.264H57.647l-1.054 6.61c2.201-.9 4.546-1.373 6.818-1.373 4.278 0 8.047 1.61 10.613 4.533a12.512 12.512 0 012.541 4.535h21.652c.32 0 .614.13.807.356.191.225.27.518.22.825-.097.607-.663 1.082-1.29 1.082H77.058c.253 1.971.078 4.059-.51 6.084h20.337c.32 0 .614.13.807.357.191.225.27.518.22.825-.097.607-.663 1.082-1.29 1.082h-20.91c-1.019 2.252-2.544 4.337-4.444 6.083h24.285c.32 0 .614.13.807.357.191.225.27.517.22.824-.097.607-.663 1.083-1.29 1.083H68.283c-2.998 1.858-6.347 2.839-9.69 2.839-2.307 0-4.536-.488-6.48-1.416l-2.946 18.477zM93.96 89.767H60.997c-.318 0-.612-.13-.805-.357a1.004 1.004 0 01-.221-.827c.097-.607.662-1.082 1.287-1.082h32.964c.32 0 .614.131.807.357.192.225.27.517.22.824-.095.608-.661 1.085-1.288 1.085zm-32.703-1.64c-.315 0-.622.255-.67.556a.395.395 0 00.079.323.42.42 0 00.329.137H93.96c.316 0 .625-.255.672-.557a.39.39 0 00-.08-.32.423.423 0 00-.331-.137H61.258v-.001zm38.028-31.746H76.94c-.32 0-.612-.13-.805-.356a1.004 1.004 0 01-.221-.824c.097-.608.662-1.083 1.287-1.083h22.346c.32 0 .614.13.807.357.192.225.271.518.221.825-.096.606-.663 1.08-1.289 1.08zm-22.085-1.64c-.315 0-.622.256-.67.558a.387.387 0 00.079.32.423.423 0 00.33.135h22.346c.317 0 .625-.254.672-.555a.392.392 0 00-.079-.321.423.423 0 00-.332-.138H77.201v.002z"}),s.jsx("path",{fill:"#DDD",d:"M55.21 61.447l-.332 2.085c-.052.039-.103.078-.153.12-1.13.942-1.372 2.473-.544 3.416.036.042.075.082.115.12l-1.44 9.019a8.348 8.348 0 01-.3-.325c-1.709-1.949-2.312-4.503-1.903-7.056.407-2.554 1.823-5.106 4.154-7.054.13-.11.267-.22.403-.325zM96.884 71.122c.471 0 .792.367.72.821-.073.451-.511.818-.98.818H75.507c.237-.54.444-1.087.618-1.639h20.758z"}),s.jsx("path",{fill:"#DDD",d:"M96.623 73.074H75.508a.31.31 0 01-.261-.142.316.316 0 01-.025-.296c.235-.536.439-1.076.607-1.607a.31.31 0 01.299-.218h20.756c.32 0 .614.13.807.357.192.225.271.518.221.825-.096.606-.662 1.08-1.289 1.08zm-20.643-.625h20.643c.317 0 .625-.254.672-.556a.392.392 0 00-.079-.32.423.423 0 00-.332-.138h-20.53a16.42 16.42 0 01-.374 1.014zM95.555 79.468c.47 0 .791.367.719.818-.072.453-.511.821-.982.821H68.193a19.625 19.625 0 002.248-1.638h25.114z"}),s.jsx("path",{fill:"#DDD",d:"M95.292 81.42H68.193a.313.313 0 01-.165-.578 19.558 19.558 0 002.148-1.56l.059-.049a.33.33 0 01.205-.076h25.114c.32 0 .614.13.807.357.192.225.27.517.221.824-.097.605-.662 1.082-1.29 1.082zm-26.063-.626h26.063c.316 0 .625-.255.672-.556a.39.39 0 00-.08-.32.423.423 0 00-.331-.137h-25c-.425.355-.868.694-1.324 1.013z"}),s.jsx("path",{fill:"#EEE",d:"M115.432 38.557l-.495 3.106-.095.598-10.06 63.074H51.517l-2.716-3.702h52.731l10.155-63.672.592-3.704 3.153 4.3z"}),s.jsx("path",{fill:"#F9FAFB",d:"M104.782 105.647H51.518a.31.31 0 01-.252-.127l-2.716-3.702a.31.31 0 01-.026-.326.31.31 0 01.279-.171h52.464l10.113-63.41.592-3.704a.311.311 0 01.56-.135l3.153 4.3c.05.067.069.152.057.234l-.591 3.704-10.061 63.075a.312.312 0 01-.308.262zm-53.107-.625h52.839l10.019-62.81.57-3.576-2.634-3.592-.473 2.966-10.156 63.672a.313.313 0 01-.308.264H49.418l2.257 3.076z"}),s.jsx("path",{fill:"#DDD",d:"M108.03 109.039l3.503 4.775H58.8l-3.503-4.775h52.733z"}),s.jsx("path",{fill:"#F9FAFB",d:"M111.533 114.126H58.8a.31.31 0 01-.252-.127l-3.503-4.775a.312.312 0 01.253-.498h52.734c.1 0 .193.048.251.128l3.503 4.775a.314.314 0 01-.253.497zm-52.575-.625h51.958l-3.044-4.15H55.913l3.045 4.15z"}),s.jsx("path",{fill:"#F7F9FC",d:"M118.776 41.663l-10.746 67.376H55.297l.59-3.704h48.895l10.154-63.672h3.84z"}),s.jsx("path",{fill:"#F9FAFB",d:"M108.03 109.351H55.297a.313.313 0 01-.308-.361l.59-3.703a.313.313 0 01.308-.263h48.628l10.112-63.41a.314.314 0 01.309-.264h3.84a.313.313 0 01.308.361l-10.745 67.376a.313.313 0 01-.309.264zm-52.366-.625h52.1l10.645-66.751h-3.207l-10.112 63.41a.314.314 0 01-.308.264H56.154l-.49 3.077z"}),s.jsx("path",{fill:"#EEE",d:"M118.776 41.663l3.503 4.775-10.746 67.376-3.503-4.775 10.746-67.376z"}),s.jsx("path",{fill:"#F9FAFB",d:"M111.533 114.126a.306.306 0 01-.251-.127l-3.503-4.775a.312.312 0 01-.057-.235l10.746-67.377a.309.309 0 01.234-.254.309.309 0 01.325.12l3.503 4.775a.31.31 0 01.057.234l-10.746 67.377a.309.309 0 01-.308.262zm-3.174-5.168l2.982 4.067 10.607-66.508-2.982-4.067-10.607 66.508z"}),s.jsx("path",{fill:"#85858A",d:"M49.987 81.18L31.79 96.393c-.043.036-.088.068-.132.101l-.061.046c-.036.025-.074.047-.11.071-.026.017-.053.035-.079.05-.02.011-.04.02-.06.032a2.11 2.11 0 01-.148.075l-.055.022a2.406 2.406 0 01-.294.107l-.076.021c-.04.01-.08.02-.121.028l-.074.014a4.26 4.26 0 01-.132.018l-.062.007c-.064.005-.13.008-.193.008-.545 0-1.056-.2-1.407-.6l-.649-.739a1.784 1.784 0 01-.09-.112l3.503 4.775c.027.039.058.076.09.112l.648.739c.352.4.863.6 1.408.6.063 0 .127-.003.193-.008.02-.002.041-.006.062-.007l.132-.018.074-.014c.04-.009.08-.017.12-.028l.077-.021.055-.015.04-.015c.067-.023.134-.049.2-.077l.04-.015c.005-.003.01-.006.015-.007.05-.024.098-.049.148-.075.019-.01.037-.017.055-.028l.005-.004c.026-.015.053-.033.08-.05.033-.021.067-.04.1-.064a.025.025 0 00.009-.007l.061-.046c.034-.025.068-.048.1-.075a.364.364 0 00.032-.026l18.197-15.213-3.504-4.775z"}),s.jsx("path",{fill:"#F9FAFB",d:"M33.694 102.081c-.658 0-1.241-.252-1.641-.707l-.65-.739a1.901 1.901 0 01-.106-.134l-3.501-4.772c0-.001-.002-.001-.002-.003a.312.312 0 01.503-.369l.001.003c.023.03.046.06.071.089l.649.739c.279.318.696.493 1.172.493.056 0 .11-.003.165-.009l.056-.007c.037-.004.075-.008.114-.015l.047-.01.018-.004.106-.023.068-.019a2.276 2.276 0 00.257-.093l.047-.019c.044-.02.087-.043.13-.067l.053-.028c.011-.006.024-.013.035-.022l.058-.037a2.329 2.329 0 00.099-.067l.04-.03c.035-.027.07-.052.104-.081l18.198-15.213a.314.314 0 01.45.055l3.504 4.775a.313.313 0 01-.052.425l-18.23 15.246c-.03.023-.059.045-.09.066l-.04.029-.05.038a1.955 1.955 0 01-.095.062l-.052.032a.92.92 0 01-.058.036c-.006.005-.011.007-.017.01a.658.658 0 01-.044.022l-.013.006c-.055.029-.11.058-.166.085l-.017.008-.044.018c-.075.032-.15.061-.225.086-.013.006-.03.011-.045.017l-.046.012-.015.004-.087.024c-.046.011-.09.022-.137.031l-.015.002-.07.014c-.05.009-.1.016-.148.021l-.018.003a1.864 1.864 0 01-.27.017zm-4.003-4.825l2.112 2.877c.022.031.047.061.072.091l.648.739c.311.355.8.531 1.338.486l.054-.007a1.482 1.482 0 00.161-.025l.017-.003a1.73 1.73 0 00.105-.024c.023-.005.045-.012.068-.018l.048-.012a.295.295 0 01.034-.014c.059-.02.118-.042.177-.068.01-.006.023-.01.036-.014l.01-.004c.045-.021.089-.045.133-.068a.296.296 0 01.035-.018l.01-.006c.002-.003.006-.004.01-.005l.034-.021.065-.041a.622.622 0 00.057-.036l.033-.025.053-.04.063-.047.027-.022 17.974-15.025-3.132-4.271L31.99 96.633c-.044.037-.089.071-.135.105l-.03.023c-.017.013-.032.025-.049.036-.033.023-.067.043-.1.064l-.048.03c-.021.015-.042.027-.063.04-.017.01-.033.018-.05.026l-.018.01c-.054.029-.11.058-.165.084-.016.007-.03.014-.047.02l-.016.007a2.6 2.6 0 01-.554.173l-.015.003c-.022.004-.046.01-.068.013-.05.008-.099.015-.149.02l-.02.003a2.429 2.429 0 01-.772-.035z"}),s.jsx("path",{fill:"#98A2B3",d:"M76.699 64.414a12.649 12.649 0 00-.367-1.639 12.218 12.218 0 00-2.544-4.642c-2.59-2.951-6.367-4.426-10.378-4.426-2.39 0-4.861.522-7.216 1.57a19.487 19.487 0 00-4.58 2.862c-6.318 5.28-8.203 13.503-4.815 19.405l-18.2 15.216c-.956.797-1.162 2.093-.462 2.894l.65.74c.35.4.863.6 1.405.6a2.51 2.51 0 001.597-.6l18.198-15.212a13.02 13.02 0 001.885 1.193c2.022 1.046 4.33 1.57 6.721 1.57 3.214 0 6.576-.944 9.6-2.838.753-.47 1.482-.999 2.249-1.639 2.293-1.935 3.996-4.255 5.068-6.71.234-.537.443-1.087.616-1.638.713-2.231.911-4.53.573-6.706zm-9.481 11.503c-2.343 1.96-5.16 2.937-7.82 2.937s-5.165-.979-6.881-2.937c-3.438-3.917-2.425-10.264 2.26-14.178 2.342-1.96 5.16-2.938 7.82-2.938s5.164.98 6.88 2.938a8.34 8.34 0 01.754 1.008 8.029 8.029 0 011.056 2.54c.375 1.62.281 3.364-.258 5.056a11.476 11.476 0 01-1.11 2.438 12.45 12.45 0 01-2.701 3.136z"}),s.jsx("path",{fill:"#F9FAFB",d:"M30.192 97.307c-.659 0-1.242-.251-1.64-.708l-.65-.74a2.048 2.048 0 01-.486-1.52c.055-.68.412-1.344.982-1.82L46.4 77.471c-1.585-2.903-1.989-6.42-1.136-9.936.882-3.635 3.066-7.057 6.151-9.636a19.8 19.8 0 014.654-2.907c2.347-1.045 4.886-1.597 7.343-1.597 4.278 0 8.048 1.61 10.613 4.533a12.492 12.492 0 012.61 4.76c.16.543.286 1.106.375 1.677.344 2.207.141 4.577-.584 6.85a16.681 16.681 0 01-.627 1.668c-1.123 2.569-2.906 4.927-5.155 6.824a20.11 20.11 0 01-2.284 1.664c-3.014 1.887-6.39 2.886-9.766 2.886-2.46 0-4.833-.556-6.864-1.606A13.36 13.36 0 0150 81.58L31.989 96.633a2.817 2.817 0 01-1.797.674zM63.41 54.019c-2.37 0-4.82.534-7.089 1.544a19.182 19.182 0 00-4.507 2.815c-6.13 5.123-8.126 13.12-4.744 19.01a.313.313 0 01-.071.395L28.799 93c-.442.37-.72.875-.76 1.389-.032.401.086.777.333 1.06l.649.738c.279.32.694.495 1.17.495.495 0 .992-.188 1.398-.528l18.198-15.211a.313.313 0 01.39-.009c.583.443 1.2.835 1.84 1.164 1.941 1.005 4.216 1.536 6.577 1.536 3.257 0 6.52-.965 9.434-2.79.751-.47 1.476-.997 2.213-1.614 2.175-1.833 3.898-4.114 4.983-6.594.234-.536.437-1.077.605-1.607.696-2.184.89-4.453.561-6.565a12.39 12.39 0 00-.357-1.598 11.865 11.865 0 00-2.48-4.525c-2.445-2.786-6.048-4.32-10.142-4.32zm-4.014 25.148c-2.868 0-5.396-1.08-7.117-3.045-1.536-1.75-2.276-4.066-2.086-6.525.234-3.015 1.83-5.968 4.38-8.098 2.323-1.942 5.172-3.011 8.023-3.011 2.868 0 5.396 1.08 7.117 3.044a8.743 8.743 0 01.783 1.046 8.385 8.385 0 011.097 2.637c.385 1.66.293 3.466-.265 5.221a11.584 11.584 0 01-1.14 2.506 12.926 12.926 0 01-2.77 3.215c-2.322 1.94-5.17 3.01-8.022 3.01zm3.2-20.054c-2.704 0-5.411 1.018-7.62 2.865-2.423 2.023-3.94 4.82-4.16 7.668-.177 2.289.51 4.442 1.934 6.064 1.6 1.826 3.961 2.832 6.646 2.832 2.704 0 5.411-1.018 7.62-2.865a12.3 12.3 0 002.637-3.059c.313-.518.582-1.057.803-1.603.101-.25.194-.508.276-.768.524-1.648.611-3.34.252-4.893a7.792 7.792 0 00-1.739-3.41c-1.603-1.826-3.964-2.831-6.649-2.831z"}),s.jsx("path",{fill:"#F7F9FC",d:"M59.778 66.756a.997.997 0 00-.11-.225.974.974 0 00-.103-.14 1.233 1.233 0 00-.94-.4 1.694 1.694 0 00-1.07.401c-.372.31-.575.734-.586 1.14-.008.292.082.574.278.797.235.267.576.402.94.402s.749-.134 1.068-.402c.152-.127.277-.272.371-.429.045-.072.08-.147.113-.225.125-.305.14-.632.039-.92z"}),s.jsx("path",{fill:"#F7F9FC",d:"M58.64 64.293a1.938 1.938 0 00-.373-.639c-.414-.472-1.018-.708-1.659-.708a2.941 2.941 0 00-1.883.707c-1.13.941-1.372 2.472-.544 3.415.037.042.075.082.115.12.405.391.958.586 1.543.586.375 0 .764-.08 1.135-.242.262-.114.515-.27.75-.464.266-.225.486-.48.651-.755.063-.105.118-.212.164-.32l.032-.078c.22-.54.246-1.115.07-1.622z"}),s.jsx("path",{fill:"#DDD",d:"M104.782 105.335H51.517l-2.716-3.702h52.731l3.25 3.702z"}),s.jsx("path",{fill:"#F9FAFB",d:"M104.782 105.647H51.518a.308.308 0 01-.252-.128l-2.716-3.701a.31.31 0 01-.026-.326.31.31 0 01.279-.171h52.73c.09 0 .175.039.235.107l3.25 3.701c.08.092.1.224.05.335a.317.317 0 01-.286.183zm-53.107-.625h52.415l-2.701-3.076H49.417l2.258 3.076z"}),s.jsx("path",{fill:"#DDD",d:"M98.215 62.775c.47 0 .792.367.72.82-.073.452-.512.819-.981.819H76.698a12.81 12.81 0 00-.365-1.639h21.882z"}),s.jsx("path",{fill:"#DDD",d:"M97.954 64.726H76.7a.312.312 0 01-.309-.265 12.214 12.214 0 00-.357-1.599.309.309 0 01.05-.275.31.31 0 01.25-.125h21.884c.319 0 .614.131.806.357.192.225.271.518.221.825-.097.607-.663 1.082-1.29 1.082zm-20.99-.625h20.99c.317 0 .625-.254.672-.555a.392.392 0 00-.079-.321.423.423 0 00-.332-.138H76.743c.088.335.161.674.22 1.014zM99.547 54.43c.471 0 .792.366.72.82-.073.451-.512.818-.981.818H76.94c-.47 0-.79-.367-.718-.818.072-.453.51-.82.98-.82h22.345z"}),s.jsx("path",{fill:"#DDD",d:"M99.286 56.38H76.94c-.32 0-.613-.129-.806-.355a1.004 1.004 0 01-.22-.824c.097-.607.662-1.083 1.287-1.083h22.346c.32 0 .614.13.807.357.191.225.271.518.221.825-.096.606-.663 1.08-1.29 1.08zM77.2 54.742c-.315 0-.622.255-.67.557a.391.391 0 00.078.32.423.423 0 00.33.136h22.347c.316 0 .625-.254.672-.555a.392.392 0 00-.08-.32.423.423 0 00-.331-.138H77.2zM94.222 87.815c.471 0 .792.367.72.818-.073.453-.511.821-.982.821H60.997c-.468 0-.79-.366-.718-.82.072-.452.511-.819.98-.819h32.963z"}),s.jsx("path",{fill:"#DDD",d:"M93.961 89.767H60.997c-.318 0-.61-.13-.804-.356a1.004 1.004 0 01-.22-.826c.096-.607.662-1.082 1.287-1.082h32.962c.32 0 .614.13.807.357.192.225.27.516.22.823-.095.607-.662 1.084-1.288 1.084zm-32.703-1.64c-.315 0-.622.255-.67.556a.395.395 0 00.079.323.419.419 0 00.329.137H93.96c.316 0 .625-.255.672-.557a.39.39 0 00-.08-.32.423.423 0 00-.331-.137H61.258v-.001z"}),s.jsx("path",{fill:"#DDD",d:"M80.201 69.189c-.025-.16-.053-.32-.083-.478l-.008-.046-.02-.089c-.026-.129-.056-.258-.086-.386-.011-.047-.022-.096-.035-.143a14.558 14.558 0 00-.133-.496c-.065-.223-.14-.444-.218-.663-.01-.028-.017-.056-.028-.084-.01-.029-.023-.057-.033-.085a11.396 11.396 0 00-.553-1.268c-.013-.023-.022-.047-.033-.07-.017-.034-.038-.067-.055-.1a16.26 16.26 0 00-.219-.4c-.032-.055-.061-.11-.094-.164a11.61 11.61 0 00-.337-.536v-.003c-.1-.147-.2-.293-.306-.438l-3.503-4.775a12.034 12.034 0 01.644.977l.095.164a16.362 16.362 0 01.308.57c.104.205.203.412.294.621l.021.053a11.536 11.536 0 01.297.761 12.302 12.302 0 01.47 1.69 11.138 11.138 0 01.111.614c.339 2.175.14 4.473-.57 6.707a16.401 16.401 0 01-.619 1.64c-.048.11-.1.22-.15.33-.04.086-.08.172-.122.258l-.104.214c-.043.086-.088.17-.132.257a11.944 11.944 0 01-.253.467l-.117.206-.151.256-.112.186c-.134.215-.271.43-.414.64l-.087.127a17.85 17.85 0 01-.902 1.204l-.11.135c-.15.18-.304.36-.463.537l-.075.082a18.882 18.882 0 01-1.029 1.053l-.27.249c-.048.044-.096.09-.146.134-.142.127-.285.25-.43.374a20.29 20.29 0 01-1.082.844l-.084.063a21.276 21.276 0 01-1.082.73c-.209.13-.418.256-.63.377-.056.032-.112.06-.167.093-.186.104-.373.205-.56.303l-.213.11a18.01 18.01 0 01-.62.298c-.038.017-.074.035-.112.051-.048.023-.098.043-.147.064-.136.06-.272.12-.41.175l-.204.082c-.12.047-.24.095-.36.14-.072.028-.145.055-.217.081-.118.043-.236.083-.355.124a9.937 9.937 0 01-.218.072c-.097.032-.195.06-.293.091a16.404 16.404 0 01-.997.275 16.845 16.845 0 01-1.56.308c-.123.019-.247.036-.37.052l-.267.035c-.13.015-.257.026-.385.037-.083.007-.168.017-.251.023-.142.01-.282.018-.422.025-.071.004-.14.008-.212.01-.21.01-.42.013-.63.013-2.39 0-4.697-.523-6.721-1.57a12.644 12.644 0 01-1.885-1.195l3.503 4.775c.593.454 1.224.851 1.885 1.194 2.022 1.048 4.33 1.571 6.72 1.571.209 0 .419-.004.63-.012.07-.003.14-.009.21-.011.141-.007.283-.014.423-.025l.25-.023c.13-.01.257-.023.386-.037.09-.01.178-.022.267-.033.124-.017.247-.032.37-.052l.277-.044.363-.064c.093-.018.187-.036.28-.056.12-.025.24-.05.358-.077a16.81 16.81 0 00.918-.235l.362-.107.18-.053.113-.037.218-.073c.118-.04.236-.08.354-.123l.218-.08c.12-.045.24-.092.36-.141l.204-.082c.137-.057.273-.115.41-.175.048-.022.098-.042.147-.064a.206.206 0 01.026-.011c.028-.013.056-.028.084-.04a18.01 18.01 0 001.393-.711c.04-.023.08-.042.12-.066.014-.008.031-.02.046-.027.211-.121.422-.246.63-.377.213-.133.423-.272.633-.415l.057-.038c.13-.09.262-.183.393-.277l.084-.063c.167-.122.334-.247.5-.378l.038-.029c.089-.07.18-.14.268-.214a19.263 19.263 0 00.703-.598l.146-.134c.09-.083.182-.165.27-.25l.014-.012c.017-.015.032-.032.048-.047.148-.142.293-.287.436-.43l.135-.14c.134-.14.266-.28.395-.423l.059-.063.015-.018c.158-.178.312-.357.462-.537l.11-.134c.132-.162.263-.326.388-.492.013-.019.03-.037.044-.056l.013-.017c.158-.211.31-.424.458-.639l.086-.125c.143-.213.282-.426.415-.642l.027-.04.086-.146c.051-.084.101-.17.151-.255l.117-.207.14-.256.111-.21a8.98 8.98 0 00.13-.258c.037-.07.072-.142.106-.214l.123-.258c.016-.038.036-.074.052-.111l.098-.22c.237-.54.444-1.087.618-1.639.72-2.237.92-4.534.58-6.712z"}),s.jsx("path",{fill:"#F9FAFB",d:"M62.094 89.035c-2.46 0-4.833-.556-6.864-1.607a13.081 13.081 0 01-1.931-1.224.303.303 0 01-.063-.064l-3.503-4.775a.313.313 0 01.442-.433c.57.438 1.189.83 1.839 1.165 1.941 1.006 4.215 1.536 6.576 1.536.196 0 .404-.004.618-.012.04-.001.08-.004.12-.007l.087-.006c.14-.007.277-.014.416-.025.054-.004.108-.01.16-.013l.085-.009c.13-.01.255-.023.378-.037.065-.007.13-.017.196-.025l.068-.009a16.852 16.852 0 00.607-.09l.028-.004c.118-.02.237-.04.355-.063l.277-.055c.116-.024.234-.05.351-.077.093-.02.185-.043.278-.065.117-.029.235-.058.351-.09l.275-.075c.118-.033.236-.07.354-.106l.04-.012c.083-.025.166-.052.248-.078l.214-.07c.116-.04.232-.08.348-.123.071-.026.143-.051.214-.08.118-.044.236-.09.354-.137l.055-.02.147-.059c.135-.055.268-.114.403-.172l.063-.028c.027-.01.055-.023.081-.035l.108-.05a18.639 18.639 0 001.371-.698l.068-.038.096-.052a16.582 16.582 0 001.242-.78c.147-.101.296-.204.443-.31l.083-.062c.18-.132.342-.254.493-.372l.038-.03c.187-.148.362-.29.532-.431.143-.121.283-.243.422-.367l.086-.079.094-.086c.077-.07.155-.14.23-.211l.062-.06c.14-.135.28-.272.43-.424l.133-.137c.132-.138.262-.276.389-.417l.073-.079c.147-.164.296-.337.456-.53l.108-.131c.138-.168.263-.326.38-.483l.058-.073c.144-.191.291-.397.45-.627l.084-.124c.145-.212.28-.425.407-.63l.096-.157.014-.024.149-.251c.034-.06.068-.12.1-.18l.015-.025.139-.251.11-.207c.042-.083.085-.168.129-.251l.102-.21.12-.253.012-.029c.046-.099.092-.197.135-.296.235-.536.44-1.076.607-1.608.696-2.184.889-4.453.56-6.565a11.271 11.271 0 00-.082-.467l-.028-.133a11.506 11.506 0 00-.083-.377l-.035-.142a12.175 12.175 0 00-.343-1.13l-.06-.164c-.08-.212-.154-.401-.23-.578l-.021-.051a11.148 11.148 0 00-.374-.772c-.07-.13-.14-.26-.214-.39l-.029-.05-.064-.109a11.675 11.675 0 00-.628-.951.312.312 0 01.503-.37l.001.002 3.502 4.773a12.91 12.91 0 01.661 1.002c.024.038.044.077.067.115l.029.051c.078.136.153.273.225.41l.02.036.035.067c.009.015.016.032.023.047l.01.025c.119.233.217.442.303.639l.023.053c.082.191.16.39.243.61l.01.029c.01.019.018.038.025.06.007.017.012.037.018.056l.01.03a11.728 11.728 0 01.359 1.185l.028.114.008.034c.032.132.061.264.088.396l.008.034.013.056.008.048c.034.181.062.34.086.49.343 2.21.143 4.577-.582 6.85a16.635 16.635 0 01-.73 1.892l-.031.068-.022.046a14.23 14.23 0 01-.23.48 11.92 11.92 0 01-.248.476l-.143.26-.021.037a9.74 9.74 0 01-.253.433l-.036.06c-.017.03-.035.058-.051.088l-.02.03c-.139.224-.28.443-.429.663l-.087.126c-.166.24-.319.453-.467.65l-.058.076c-.123.16-.255.33-.395.5l-.014.018-.097.119c-.165.198-.318.377-.47.547l-.017.02a.915.915 0 01-.037.038l-.023.025c-.132.145-.266.288-.402.43l-.137.14c-.154.158-.3.3-.443.438l-.017.017a9.64 9.64 0 00-.032.032l-.012.011c-.078.074-.157.146-.236.218l-.096.09-.093.084a19.541 19.541 0 01-.986.823l-.038.031c-.158.124-.325.25-.508.383l-.086.064a23.375 23.375 0 01-.438.309l-.02.013a18.483 18.483 0 01-1.283.806l-.05.03-.072.038a19.12 19.12 0 01-1.465.747l-.032.016c-.018.008-.036.018-.054.025l-.02.008-.098.043-.059.025c-.138.061-.277.12-.416.178l-.149.06-.058.023c-.122.049-.245.096-.367.142l-.22.082-.36.126-.221.074-.047.015-.069.022c-.036.011-.072.022-.11.032l-.073.022a18.815 18.815 0 01-.65.186c-.122.032-.243.064-.365.093-.095.024-.19.046-.286.069a17.79 17.79 0 01-.365.079 15.73 15.73 0 01-.656.122l-.032.005c-.083.014-.165.028-.249.04-.126.02-.251.037-.377.052l-.069.008c-.067.009-.136.018-.202.025-.13.016-.261.027-.392.04l-.083.008-.174.015c-.144.011-.287.018-.43.025l-.081.004a10.9 10.9 0 01-.767.024zm-8.379-3.3a12.43 12.43 0 001.804 1.137c1.942 1.006 4.216 1.536 6.577 1.536a16.05 16.05 0 00.739-.02l.086-.005c.139-.007.276-.013.415-.025l.163-.014.084-.008c.128-.01.253-.023.38-.037l.193-.024.069-.01c.12-.015.243-.032.364-.05.079-.012.16-.025.239-.039l.032-.005c.12-.02.237-.04.355-.063l.277-.055a20.067 20.067 0 00.63-.142l.352-.09c.091-.025.183-.049.273-.075.118-.033.236-.07.354-.106l.084-.025.093-.027.11-.038a17.076 17.076 0 00.561-.192c.072-.026.144-.051.215-.079.118-.044.236-.09.354-.137l.06-.024.14-.055c.135-.056.27-.114.403-.173l.064-.027.08-.035.061-.028.049-.024c.198-.091.404-.19.611-.293a21.557 21.557 0 00.761-.404l.063-.033.054-.03.046-.027a18.234 18.234 0 001.243-.78l.055-.035c.13-.09.259-.18.388-.274l.084-.062c.178-.131.34-.252.492-.373l.038-.03.264-.21a19.304 19.304 0 00.69-.587c.029-.025.057-.052.083-.077l.1-.092c.075-.069.152-.137.225-.208a.08.08 0 01.011-.01l.052-.05a17.113 17.113 0 00.562-.56c.132-.138.263-.277.389-.417l.074-.08a18.896 18.896 0 00.548-.644l.016-.018c.134-.165.263-.33.382-.483l.056-.074c.143-.189.29-.394.45-.626l.084-.123c.144-.212.28-.425.408-.63l.025-.039.046-.078.039-.065.148-.25c.032-.056.064-.111.095-.168l.02-.038c.046-.083.094-.166.138-.25a14.79 14.79 0 00.238-.458l.104-.211.12-.253.052-.11.096-.213c.236-.538.44-1.078.607-1.609.696-2.183.889-4.453.56-6.565a12.975 12.975 0 00-.082-.465l-.027-.132a16.316 16.316 0 00-.083-.377l-.008-.034-.025-.106a11.436 11.436 0 00-.343-1.13l-.017-.05-.01-.031-.012-.03-.021-.052a12.056 12.056 0 00-.23-.578l-.022-.051c-.08-.186-.175-.385-.287-.607l-.022-.046-.011-.025a13.258 13.258 0 00-.267-.486l-.03-.054a11.045 11.045 0 00-.389-.628c-.002-.001-.003-.004-.005-.007a13.32 13.32 0 00-.296-.422l-1.195-1.63a12.852 12.852 0 01.261.9l.036.146c.03.132.06.263.087.395l.03.139c.034.178.062.337.086.49.343 2.208.141 4.577-.582 6.85a16.382 16.382 0 01-.63 1.67c-.045.102-.094.205-.141.308l-.013.028-.123.262-.107.218-.133.261-.113.214c-.047.088-.096.174-.145.261l-.013.025a12.525 12.525 0 01-.26.446l-.014.024-.1.165c-.13.213-.272.432-.422.653l-.088.128c-.164.239-.316.451-.466.65l-.059.075c-.123.162-.252.326-.394.5l-.113.136c-.163.198-.318.376-.47.546l-.077.082a23.629 23.629 0 01-.54.572 18.55 18.55 0 01-.443.437l-.064.063-.238.22-.09.082c-.032.03-.062.059-.094.087a19.541 19.541 0 01-.988.823l-.037.03c-.157.123-.324.25-.509.384l-.086.064a21.1 21.1 0 01-1.1.743c-.197.124-.407.249-.64.383l-.106.059-.063.036a18.867 18.867 0 01-1.417.72l-.049.023-.064.03-.091.04-.06.026c-.139.06-.278.12-.417.178l-.155.062-.053.02c-.122.05-.243.097-.367.142l-.222.082a17.86 17.86 0 01-.58.2l-.26.08-.04.01a18.815 18.815 0 01-1.666.427 17.24 17.24 0 01-.655.122l-.028.004-.254.042c-.127.02-.252.036-.377.052l-.066.008c-.07.01-.138.018-.206.026-.129.016-.258.027-.387.04l-.087.008a7.906 7.906 0 01-.173.015c-.143.01-.286.018-.43.025l-.081.004a17.27 17.27 0 01-.775.02c-2.461 0-4.834-.556-6.864-1.608-.154-.079-.306-.162-.456-.247l2.446 3.33zM120.843 90.037a2.067 2.067 0 100-4.134 2.067 2.067 0 000 4.134zM33.935 82.412a2.067 2.067 0 100-4.133 2.067 2.067 0 000 4.133zM34.97 84.083a.728.728 0 100-1.455.728.728 0 000 1.455zM45.217 56.42a2.067 2.067 0 100-4.134 2.067 2.067 0 000 4.133zM47.632 53.008a.728.728 0 100-1.455.728.728 0 000 1.455z"}),s.jsx("path",{fill:"#EEE",d:"M126.15 45.536a3.556 3.556 0 10-.001-7.11 3.556 3.556 0 00.001 7.11z"}),s.jsx("path",{fill:"#F9FAFB",d:"M122.594 40.225a1.693 1.693 0 100-3.386 1.693 1.693 0 000 3.386z"})]})}var Eo=typeof p.commonjsGlobal=="object"&&p.commonjsGlobal&&p.commonjsGlobal.Object===Object&&p.commonjsGlobal,jo=typeof self=="object"&&self&&self.Object===Object&&self;Eo||jo||Function("return this")();function ko(e){const[t,n]=E.useState(!!e),r=E.useCallback(()=>{n(!0)},[]),o=E.useCallback(()=>{n(!1)},[]),i=E.useCallback(()=>{n(a=>!a)},[]);return{value:t,setValue:n,setTrue:r,setFalse:o,toggle:i}}function To(e){var t;return s.jsxs(N.Dialog,{...e.dialogProps,open:e.open,children:[!e.hideTitle&&s.jsxs(N.DialogTitle,{component:N.Stack,sx:{...e.titleProps,textAlign:"center"},children:[typeof e.title=="string"?s.jsx(N.Typography,{variant:"h4",children:e.title}):e.title,typeof e.subTitle=="string"?s.jsx(N.Typography,{color:"success.main",variant:"body1",...e.subTitleProps,children:e.subTitle}):e.subTitle]}),s.jsx(N.DialogContent,{sx:{...e.contentProps,overflowY:e.fixOverflow?"unset":void 0},children:e.desc}),!(e.hideClose&&e.hideConfirm)&&s.jsx(N.DialogActions,{...e.dialogActionsProps,sx:{display:"flex",justifyContent:"space-between","& button":{minWidth:e.minWidthButton||200},px:3,pb:3,...(t=e.dialogActionsProps)==null?void 0:t.sx},children:e.customActions?e.customActions:s.jsxs(s.Fragment,{children:[!e.hideClose&&s.jsx(N.Button,{color:"error",onClick:e.onClose,children:"Close"}),!e.hideConfirm&&s.jsx(N.Button,{color:"primary",onClick:e.onConfirm,children:"Submit"})]})})]})}function No(e){const t=ko(typeof e=="boolean"?e:void 0);return{setTrue:t.setTrue,open:t.value,onClose:t.setFalse,onConfirm:typeof e!="boolean"?e==null?void 0:e.onConfirm:void 0}}function Oo({rootPath:e}){return s.jsxs("div",{style:{display:"flex",flexDirection:"column",width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center"},children:[s.jsx("h1",{children:"404 - Not Found"}),s.jsx("p",{children:"Sorry, the page you are looking for does not exist."}),s.jsx(N.Box,{height:"16px"}),s.jsx(gt.Link,{to:e,children:s.jsx(N.Button,{variant:"contained",color:"primary",children:"Go to Home"})})]})}function Io(e){return s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...e,children:s.jsx("path",{fill:"currenColor",d:"M4.427 7.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 7H4.604a.25.25 0 00-.177.427z"})})}function Po(e){const{renderChildren:t,parentRef:n,onlyChild:r,dropdownLevel:o}=e,[i,a]=E.useState({top:0,left:0}),l=E.useRef(null),[u,d]=E.useState("auto");return E.useLayoutEffect(()=>{if(n.current&&l.current){const m=n.current.getBoundingClientRect(),h=l.current.getBoundingClientRect();let y,b;if(o===1)y=m.bottom,b=m.left,h.height+y>window.innerHeight?(console.log("overbottom"),d(window.innerHeight-y-50),y=m.bottom-h.height):y=m.bottom;else if(o>1){y=m.top,b=m.left+m.width;const v=h.height+(window.innerHeight-m.top)>window.innerHeight;v&&(console.log("overtop"),d(window.innerHeight-m.top-50)),m.top+h.height>window.innerHeight&&!v&&(y=m.top-h.height+m.height)}a({top:y,left:b})}},[n,l,o]),r?t({maxHeight:u}):Qr.createPortal(s.jsx("div",{ref:l,style:{position:"fixed",top:i.top,left:i.left,zIndex:1200},children:t({maxHeight:u})}),n.current)}function sr({...e}){var L,G,te,ue,fe;const t=e.item,n=e.level||0,r=!!((L=e.item.children)!=null&&L.length),{isActive:o}=e,i=`level-${n}`,a=o(t.id)?"active":"",l=(W,J=i)=>`${W} ${J} ${a}`,[u,d]=E.useState(!1),[m,h]=E.useState(t.isFavorite||!1);console.log("item is Favorite",m);const y=E.useRef(),b=E.useRef();b!=null&&b.current&&((G=b==null?void 0:b.current)==null?void 0:G.scrollWidth)>((te=b==null?void 0:b.current)==null?void 0:te.clientWidth);const v=window.location.origin,c=t.path&&t.path.includes("http")?new URL(t.path):{origin:"",pathname:""},f=window.location.pathname.split("/")[1],x=c.pathname.split("/")[1],w=e.ssr||!v.includes("local")&&v!==c.origin||x!==f,_=r||n===0?"div":w?"a":gt.Link,C=t.path||"#",g=n+1,S=r&&u&&n>0,j=()=>{d(!0)},I=()=>{d(!1)},O="/global-menu-config/api/v1/menu-items/user/set-favorite",z=t.serviceKey==="mn_poms";return s.jsxs("div",{ref:y,className:l("menu-item__wrapper tree-node"),style:{borderRadius:"8px",transition:"all 0.3s"},onMouseOver:j,onMouseOut:I,onDragStart:W=>{n>1&&W.preventDefault()},children:[s.jsx(N.Tooltip,{placement:"top",disableInteractive:!0,title:z?t.description||t.name:null,onDragStart:W=>console.log("onDragStart Tooltip",W.target),children:s.jsxs(_,{to:C,href:C,draggable:"true",className:l("menu-item__link"),style:{width:"100%",transition:"all 0.3s",color:o(t.id)?((ue=e.brandColors)==null?void 0:ue.primary400)||p.color.primary400:void 0,backgroundColor:o(t.id)&&n===1?(fe=e.brandColors)==null?void 0:fe.primary200:void 0},onDragStart:W=>{console.log("onDragStart component",W.target)},children:[s.jsx(Mo,{cls:l,item:t}),s.jsx("span",{className:l("menu-item__label"),ref:b,children:t.name}),s.jsx(Ao,{menuLevel:n,hasChildren:r,isHovered:u,isFavorite:m,onClick:W=>{const J={menuConfigId:t.id,isFavorite:W},le=e.baseUrl+O;p.axiosInstance.post(le,J).then(me=>{var ce;h(W),p.pushSuccess("Set favorite menu item successfully"),(ce=e.onSetFavoriteSuccess)==null||ce.call(e,e.item.id,W)}).catch(me=>{var ce,xe;p.pushError(((xe=(ce=me.response)==null?void 0:ce.data)==null?void 0:xe.errorMessage)||"Have error when set favorite menu item")})}}),r&&s.jsx("div",{className:l("menu-item__icon-arrow__wrapper"),children:s.jsx(Io,{className:l("menu-item__icon-arrow__icon")})})]})}),S&&s.jsx(Po,{parentRef:y,onlyChild:g<2,dropdownLevel:n,renderChildren:({maxHeight:W})=>{var J;return s.jsx(p.motion.div,{className:l("menu-item__dropdown dropdown-favorite ? 'menu-item__dropdown--open' : 'menu-item__dropdown--close'}",`level-${g}`),style:p.activeStyles({maxHeight:W,overflowY:"auto",paddingRight:3},W!=="auto"&&!!g),children:(J=t.children)==null?void 0:J.map(le=>E.createElement(sr,{...e,key:le.id,item:le,level:g}))})}})]})}function Mo({item:e,cls:t}){var a,l;const[n,r]=E.useState(!e.icon),o=()=>{r(!0)},i=(a=e.icon)==null?void 0:a.endsWith(".svg");return s.jsx("div",{className:t("menu-item__icon"),children:n?s.jsx("div",{style:{width:24,height:24,backgroundColor:"#dadada",borderRadius:"5px",display:"flex",justifyContent:"center",alignItems:"center"},children:(l=e.name.trim().at(0))==null?void 0:l.toUpperCase()}):i?s.jsx(p.ReactSVG,{src:e.icon,beforeInjection:u=>{u.setAttribute("style","margin: 0 auto;"),u.querySelectorAll("path").forEach(m=>{m.hasAttribute("fill")&&m.setAttribute("fill","currentColor"),m.hasAttribute("stroke")&&m.setAttribute("stroke","currentColor")})}}):s.jsx("img",{src:e.icon||"/",alt:" ",style:{height:24,maxHeight:24},onError:o})})}function Ao(e){const t={marginRight:e.hasChildren?10:0,fontSize:22,fill:p.color.warning,minWidth:16};if(e.menuLevel!==0)return s.jsxs(s.Fragment,{children:[e.isHovered&&!e.isFavorite&&s.jsx(N.Tooltip,{title:"Add to favorites",children:s.jsx(p.IoIosStarOutline,{style:t,onClick:n=>{var r;n.preventDefault(),n.stopPropagation(),(r=e.onClick)==null||r.call(e,!0)}})}),e.isFavorite&&s.jsx(N.Tooltip,{title:"Remove from favorites",children:s.jsx(p.IoMdStar,{style:t,onClick:n=>{var r;n.preventDefault(),n.stopPropagation(),(r=e.onClick)==null||r.call(e,!1)}})})]})}const $o=`.flex-col-center{display:flex;flex-direction:column;justify-content:center}.wrap-section{transition:all .3s;padding:0 4px}.side-bar{display:flex;height:56px;border-right:1px solid #ddd;background-color:#fafafa;transition:all .3s;width:100%}.scrollbar-hidden::-webkit-scrollbar{width:2px;background:transparent}.side-bar__wrap-btn-logout,.side-bar__btn-logout{margin:40px 0}.side-bar__logout-btn__text{margin-left:12px;font-size:.875rem;opacity:0;transition:ease-in-out .2s;transition-delay:.15s}.side-bar__wrapper-toggle-btn{display:flex;flex-direction:row;justify-content:flex-end;transition:all .3s;margin-right:-8px;margin-top:40px;justify-content:center;width:100%}.side-bar__toggle-btn{margin-top:-6px;color:#85858a}.side-bar__logout-btn{width:100%;text-align:left;display:flex;flex-direction:row;align-items:center;padding:8px 16px 8px 18.6665px;min-height:48px;border-radius:.375rem;overflow:hidden;transition:all .3s ease-in-out;background-color:initial}.side-bar__logout-btn:hover{background-color:#919eab14}.side-bar__icon-logout{flex-shrink:0}.menu-item__wrapper{display:flex;position:relative;width:100%}.menu-item__link{display:flex;flex-direction:row;border-radius:.375rem;align-items:center;padding:.5rem;position:relative;height:48px;cursor:pointer;color:#85858a}.menu-item__link:hover{background-color:#919eab14}.menu-item__link.active{background-color:#009d4f1a;color:inherit}.menu-item__link.active.level-2,.menu-item__link.active.level-3,.menu-item__link.active.level-4,.menu-item__link.active.level-5,.menu-item__link.active.level-6,.menu-item__link.active.level-7,.menu-item__link.active.level-8,.menu-item__link.active.level-9,.menu-item__link.active.level-10{background-color:inherit;color:inherit}.menu-item__link.active.level-2:hover,.menu-item__link.active.level-3:hover,.menu-item__link.active.level-4:hover,.menu-item__link.active.level-5:hover,.menu-item__link.active.level-6:hover,.menu-item__link.active.level-7:hover,.menu-item__link.active.level-8:hover,.menu-item__link.active.level-9:hover,.menu-item__link.active.level-10:hover{background-color:#919eab14}.menu-item__link.menu-item__link.level-0{padding:0;background-color:#919eab14;transition:all .15s}.menu-item__icon{width:1.5rem;height:1.5rem;flex-shrink:0;display:grid;place-items:center}.menu-item__icon.level-1>*{margin:0 auto}.menu-item__label{font-size:.875rem;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%;flex-shrink:1;margin-left:12px;padding-right:12px;color:#292929;opacity:1}.menu-item__label.level-1{text-overflow:unset}.menu-item__label.active{color:inherit}.menu-item__label{margin-left:8px;font-size:.75rem;line-height:1rem}.menu-item__label.level-0,.menu-item__label.level-1{font-size:.875rem;transition-delay:.15s}.menu-item__label.level-0{color:#85858a;margin-left:8px}.menu-item__icon-arrow__wrapper{display:grid;place-items:center;position:absolute;top:50%;transform:translateY(-50%);right:0}.menu-item__icon-arrow__wrapper.level-0{display:none}.menu-item__icon-arrow__icon{transition:all .3s!important;transform:rotate(-90deg)!important}.menu-item__icon-arrow__icon.active{color:inherit}.menu-item__icon-arrow__icon.open{transform:rotate(0)!important}.menu-item__dropdown{background-color:#fafafa;border:1px solid #ddd;box-shadow:#0000001a 0 10px 15px -3px,#0000000d 0 4px 6px -2px;border-radius:4px;width:180px;max-width:180px;padding:4px;z-index:1200}.menu-item__dropdown.dropdown-favorite{width:auto;min-width:180px;max-width:350px}.menu-item__dropdown::-webkit-scrollbar{width:4px}.menu-item__dropdown::-webkit-scrollbar-thumb{background-color:#9b9b9b99;border-radius:2px}.menu-item__dropdown,.menu-item__dropdown>*{margin-top:4px}.menu-item__dropdown:first-of-type{margin-top:0}.menu-item__dropdown>*:first-child{margin-top:0}.menu-item__dropdown .menu-item__link{height:40px}.menu-item__dropdown .menu-item__link.level-1{height:48px}.menu-item__dropdown.level-1{width:auto;max-width:unset;box-shadow:none;border:none;padding:0;background-color:unset}.icon-btn{display:inline-flex;align-items:center;justify-content:center;padding:8px;border-radius:50%;background-color:transparent;transition:background-color .3s ease;border:none}.icon-btn:hover{background-color:var(--btn-bg-hover)}.simplebar-scrollbar:before{background-color:#0000002d}.side-bar__menu .simplebar-track.simplebar-vertical{display:none}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}
|
|
38
38
|
`,Ro=`.app,.treeRoot{height:100%}.draggingSource{opacity:.3}.placeholderContainer{position:relative}.dropTarget{background-color:#8d878711}
|
|
39
|
-
`;function Do(e){const t=gt.useLocation(),[n,r]=E.useState([]),[o,i]=E.useState([]),a=n.map(f=>f.data);console.log("🚀 ~ FavoriteMenuContent ~ menuItems:",a);const[l,u]=E.useState(window.location.href);
|
|
39
|
+
`;function Do(e){const t=gt.useLocation(),[n,r]=E.useState([]),[o,i]=E.useState([]),a=n.map(f=>f.data);console.log("🚀 ~ FavoriteMenuContent ~ menuItems:",a);const[l,u]=E.useState(window.location.href);E.useEffect(()=>{u(window.location.href)},[t]);const d=Fo(a,l).filter(f=>f.parentKey!==0);console.log("matchPaths:",l,t,d);const m=f=>`${f}`,h=E.useRef(null);function y(f,x){i(w=>w.map(_=>({..._,isFavorite:_.id===f?x:_.isFavorite})))}const b=()=>{console.log("Favorite menus changed",window.favoriteMenus),i(window.favoriteMenus)};E.useEffect(()=>(b(),window.addEventListener("favoriteMenusChange",b),()=>{window.removeEventListener("favoriteMenusChange",b)}),[]),console.log("favoriteItems",o),E.useLayoutEffect(()=>{var _;const f=localStorage.getItem("scrollPos");f&&h.current&&setTimeout(()=>{const C=h.current.getScrollElement();C.scrollLeft=parseInt(f)},0);const x=()=>{if(h.current){const C=h.current.getScrollElement();localStorage.setItem("scrollPos",C.scrollLeft.toString())}},w=(_=h.current)==null?void 0:_.getScrollElement();return w==null||w.addEventListener("scroll",x),()=>{w==null||w.removeEventListener("scroll",x)}},[a]);function v(f,x){return!x||o.indexOf(x)===-1?1:v(x,o.find(_=>_.id===x.parentKey))+1}const c=(f,x,w)=>{const _=C=>w.some(g=>g.id===C);return s.jsx(sr,{isActive:_,brandColors:e.brandColors,baseUrl:e.baseUrl,item:f,level:x,onSetFavoriteSuccess:y})};return s.jsx(s.Fragment,{children:o.length?s.jsx("div",{className:m("side-bar"),children:s.jsx("div",{className:m("wrap-section side-bar__menu"),style:{flex:1,overflow:"auto",width:"100%",overflowY:"hidden",display:"flex",alignItems:"center",scrollbarWidth:"thin"},children:o.map((f,x)=>s.jsx("div",{children:c(f,v(),d)},x))})}):""})}function zo(e,t){const n=new URL(e).searchParams,r=new URL(t).searchParams;return Array.from(r).filter(([o,i])=>i===n.get(o)).length}function Fo(e,t){var u;console.log("menuItems:",e);const n=new URL(t);let r=e.filter(d=>d.path&&d.path.includes("http")).map(d=>({item:d,itemUrl:new URL(d.path),matchingParamsCount:zo(t,d.path)})).sort((d,m)=>{const h=new URL(d.itemUrl).searchParams,y=new URL(m.itemUrl).searchParams;return Array.from(h).length-Array.from(y).length}).filter(({itemUrl:d})=>n.origin===d.origin);const o=r.filter(({itemUrl:d})=>n.pathname===d.pathname),i=r.filter(({itemUrl:d})=>n.pathname.includes(d.pathname));r=o.length>0?o:i,r=r.sort((d,m)=>m.matchingParamsCount-d.matchingParamsCount);let a=r.length>0?(u=r.find(d=>d.item.parentKey))==null?void 0:u.item:null;console.log("matchingItems:",r);let l=[];for(;a;)l=[a,...l],a=e.find(d=>d.id===(a==null?void 0:a.parentKey))||null;return console.log("parents:",l),l}function Lo(e){return s.jsx(p.C.div,{children:s.jsx(p.StyleWrapper,{styles:[p.styles1,$o,Ro],children:s.jsx(Do,{...e})})})}function Vo(){const{colors:e}=p.useTheme();return s.jsx("div",{style:{display:"flex",flexDirection:"column",width:"100%",height:"calc(100vh - 144px)",alignItems:"center",justifyContent:"center",zIndex:100},children:s.jsx("h1",{style:{color:`${e==null?void 0:e.primary300}`,fontSize:"82px",fontWeight:700,textTransform:"uppercase",marginTop:0,marginBottom:0,textAlign:"center"},children:"Welcome to the Intelli-Verse"})})}const Ho=()=>{const{t:e}=p.useTranslation();return s.jsx("div",{className:"unauth__container "+p.styles["page-container"],children:s.jsxs("div",{className:"unauth__main-content "+p.styles["page-main-content"],children:[s.jsx(Bo,{}),s.jsxs("div",{className:"unauth__main-text",children:[s.jsx("h2",{className:"unauth__main-text__title "+p.styles["page-title"],children:e("components.unauthorizedPage.title")}),s.jsxs("p",{className:"unauth__main-text__desc "+p.styles["text-base"],children:[e("components.unauthorizedPage.description1")," ",s.jsx("br",{})," ",e("components.unauthorizedPage.description2")]})]})]})})},Bo=()=>s.jsxs("svg",{width:"61",height:"60",viewBox:"0 0 61 60",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsxs("g",{filter:"url(#filter0_d_10800_50471)",children:[s.jsx("rect",{x:"2.5",y:"1",width:"56",height:"56",rx:"28",fill:"white"}),s.jsx("path",{d:"M24.6667 27.833V23.1663C24.6667 21.6192 25.2812 20.1355 26.3752 19.0416C27.4692 17.9476 28.9529 17.333 30.5 17.333C32.0471 17.333 33.5308 17.9476 34.6248 19.0416C35.7188 20.1355 36.3333 21.6192 36.3333 23.1663V27.833M22.3333 27.833H38.6667C39.9553 27.833 41 28.8777 41 30.1663V38.333C41 39.6217 39.9553 40.6663 38.6667 40.6663H22.3333C21.0447 40.6663 20 39.6217 20 38.333V30.1663C20 28.8777 21.0447 27.833 22.3333 27.833Z",stroke:"#292929","stroke-width":"2.33333","stroke-linecap":"round","stroke-linejoin":"round"})]}),s.jsx("defs",{children:s.jsxs("filter",{id:"filter0_d_10800_50471",x:"0.5",y:"0",width:"60",height:"60",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[s.jsx("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),s.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),s.jsx("feOffset",{dy:"1"}),s.jsx("feGaussianBlur",{stdDeviation:"1"}),s.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.0627451 0 0 0 0 0.0941176 0 0 0 0 0.156863 0 0 0 0.05 0"}),s.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_10800_50471"}),s.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_10800_50471",result:"shape"})]})})]});function be(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function lr(e){if(!be(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=lr(e[n])}),t}function pe(e,t,n={clone:!0}){const r=n.clone?p._extends({},e):e;return be(e)&&be(t)&&Object.keys(t).forEach(o=>{o!=="__proto__"&&(be(t[o])&&o in e&&be(e[o])?r[o]=pe(e[o],t[o],n):n.clone?r[o]=be(t[o])?lr(t[o]):t[o]:r[o]=t[o])}),r}const Uo=Object.freeze(Object.defineProperty({__proto__:null,default:pe,isPlainObject:be},Symbol.toStringTag,{value:"Module"}));function We(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}const Wo=Object.freeze(Object.defineProperty({__proto__:null,default:We},Symbol.toStringTag,{value:"Module"}));var Vt={exports:{}},A={};/**
|
|
40
40
|
* @license React
|
|
41
41
|
* react-is.production.min.js
|
|
42
42
|
*
|
|
@@ -109,4 +109,4 @@ const theme2 = createTheme({ palette: {
|
|
|
109
109
|
primary: { main: green[500] },
|
|
110
110
|
} });`:We(12,f?` (${f})`:"",JSON.stringify(c.main)));return Yn(c,"light",w,r),Yn(c,"dark",_,r),c.contrastText||(c.contrastText=h(c.main)),c},b={dark:zt,light:qn};return process.env.NODE_ENV!=="production"&&(b[t]||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),pe(p._extends({common:p._extends({},Ke),mode:t,primary:y({color:i,name:"primary"}),secondary:y({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:y({color:l,name:"error"}),warning:y({color:m,name:"warning"}),info:y({color:u,name:"info"}),success:y({color:d,name:"success"}),grey:Gs,contrastThreshold:n,getContrastText:h,augmentColor:y,tonalOffset:r},b[t]),o)}const cl=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function dl(e){return Math.round(e*1e5)/1e5}const Gn={textTransform:"uppercase"},Kn='"Roboto", "Helvetica", "Arial", sans-serif';function ul(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=Kn,fontSize:o=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:l=500,fontWeightBold:u=700,htmlFontSize:d=16,allVariants:m,pxToRem:h}=n,y=p._objectWithoutPropertiesLoose(n,cl);process.env.NODE_ENV!=="production"&&(typeof o!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof d!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const b=o/14,v=h||(x=>`${x/d*b}rem`),c=(x,w,_,C,g)=>p._extends({fontFamily:r,fontWeight:x,fontSize:v(w),lineHeight:_},r===Kn?{letterSpacing:`${dl(C/w)}em`}:{},g,m),f={h1:c(i,96,1.167,-1.5),h2:c(i,60,1.2,-.5),h3:c(a,48,1.167,0),h4:c(a,34,1.235,.25),h5:c(a,24,1.334,0),h6:c(l,20,1.6,.15),subtitle1:c(a,16,1.75,.15),subtitle2:c(l,14,1.57,.1),body1:c(a,16,1.5,.15),body2:c(a,14,1.43,.15),button:c(l,14,1.75,.4,Gn),caption:c(a,12,1.66,.4),overline:c(a,12,2.66,1,Gn),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return pe(p._extends({htmlFontSize:d,pxToRem:v,fontFamily:r,fontSize:o,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:l,fontWeightBold:u},f),y,{clone:!1})}const fl=.2,ml=.14,hl=.12;function V(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${fl})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${ml})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${hl})`].join(",")}const pl=["none",V(0,2,1,-1,0,1,1,0,0,1,3,0),V(0,3,1,-2,0,2,2,0,0,1,5,0),V(0,3,3,-2,0,3,4,0,0,1,8,0),V(0,2,4,-1,0,4,5,0,0,1,10,0),V(0,3,5,-1,0,5,8,0,0,1,14,0),V(0,3,5,-1,0,6,10,0,0,1,18,0),V(0,4,5,-2,0,7,10,1,0,2,16,1),V(0,5,5,-3,0,8,10,1,0,3,14,2),V(0,5,6,-3,0,9,12,1,0,3,16,2),V(0,6,6,-3,0,10,14,1,0,4,18,3),V(0,6,7,-4,0,11,15,1,0,4,20,3),V(0,7,8,-4,0,12,17,2,0,5,22,4),V(0,7,8,-4,0,13,19,2,0,5,24,4),V(0,7,9,-4,0,14,21,2,0,5,26,4),V(0,8,9,-5,0,15,22,2,0,6,28,5),V(0,8,10,-5,0,16,24,2,0,6,30,5),V(0,8,11,-5,0,17,26,2,0,6,32,5),V(0,9,11,-5,0,18,28,2,0,7,34,6),V(0,9,12,-6,0,19,29,2,0,7,36,6),V(0,10,13,-6,0,20,31,3,0,8,38,7),V(0,10,13,-6,0,21,33,3,0,8,40,7),V(0,10,14,-6,0,22,35,3,0,8,42,7),V(0,11,14,-7,0,23,36,3,0,9,44,8),V(0,11,15,-7,0,24,38,3,0,9,46,8)],gl=pl,yl=["duration","easing","delay"],vl={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},xl={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Zn(e){return`${Math.round(e)}ms`}function bl(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function _l(e){const t=p._extends({},vl,e.easing),n=p._extends({},xl,e.duration),r=(o=["all"],i={})=>{const{duration:a=n.standard,easing:l=t.easeInOut,delay:u=0}=i,d=p._objectWithoutPropertiesLoose(i,yl);if(process.env.NODE_ENV!=="production"){const m=y=>typeof y=="string",h=y=>!isNaN(parseFloat(y));!m(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!h(a)&&!m(a)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${a}.`),m(l)||console.error('MUI: Argument "easing" must be a string.'),!h(u)&&!m(u)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof i!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
|
|
111
111
|
`)),Object.keys(d).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(d).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(m=>`${m} ${typeof a=="string"?a:Zn(a)} ${l} ${typeof u=="string"?u:Zn(u)}`).join(",")};return p._extends({getAutoHeightDuration:bl,create:r},e,{easing:t,duration:n})}const wl={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Sl=wl,Cl=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function El(e={},...t){const{mixins:n={},palette:r={},transitions:o={},typography:i={}}=e,a=p._objectWithoutPropertiesLoose(e,Cl);if(e.vars)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name.":We(18));const l=ll(r),u=tn(e);let d=pe(u,{mixins:Is(u.breakpoints,n),palette:l,shadows:gl.slice(),typography:ul(l,i),transitions:_l(o),zIndex:p._extends({},Sl)});if(d=pe(d,a),d=t.reduce((m,h)=>pe(m,h),d),process.env.NODE_ENV!=="production"){const m=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],h=(y,b)=>{let v;for(v in y){const c=y[v];if(m.indexOf(v)!==-1&&Object.keys(c).length>0){if(process.env.NODE_ENV!=="production"){const f=Xt("",v);console.error([`MUI: The \`${b}\` component increases the CSS specificity of the \`${v}\` internal state.`,"You can not override it like this: ",JSON.stringify(y,null,2),"",`Instead, you need to use the '&.${f}' syntax:`,JSON.stringify({root:{[`&.${f}`]:c}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
112
|
-
`))}y[v]={}}}};Object.keys(d.components).forEach(y=>{const b=d.components[y].styleOverrides;b&&y.indexOf("Mui")===0&&h(b,y)})}return d.unstable_sxConfig=p._extends({},Je,a==null?void 0:a.unstable_sxConfig),d.unstable_sx=function(h){return en({sx:h,theme:this})},d}const jl=El(),Wr=jl,qr="$$material";function kl({props:e,name:t}){return js({props:e,name:t,defaultTheme:Wr,themeId:qr})}var et={};const Tl=p.getAugmentedNamespace(p._extends$1),Nl=p.getAugmentedNamespace(p.objectWithoutPropertiesLoose),Ol=p.getAugmentedNamespace(_s),Il=p.getAugmentedNamespace(Uo),Pl=p.getAugmentedNamespace(Xo),Ml=p.getAugmentedNamespace(Zo),Al=p.getAugmentedNamespace(ra),$l=p.getAugmentedNamespace(Os);var Le=zr;Object.defineProperty(et,"__esModule",{value:!0});var Rl=et.default=Xl,Dl=et.shouldForwardProp=st;et.systemDefaultTheme=void 0;var oe=Le(Tl),Yt=Le(Nl),Xn=ql(Ol),zl=Il,Fl=Le(Pl),Ll=Le(Ml),Vl=Le(Al),Hl=Le($l);const Bl=["ownerState"],Ul=["variants"],Wl=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function Yr(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Yr=function(r){return r?n:t})(e)}function ql(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Yr(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}function Yl(e){return Object.keys(e).length===0}function Gl(e){return typeof e=="string"&&e.charCodeAt(0)>96}function st(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Kl=et.systemDefaultTheme=(0,Vl.default)(),Jn=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function rt({defaultTheme:e,theme:t,themeId:n}){return Yl(t)?e:t[n]||t}function Zl(e){return e?(t,n)=>n[e]:null}function lt(e,t){let{ownerState:n}=t,r=(0,Yt.default)(t,Bl);const o=typeof e=="function"?e((0,oe.default)({ownerState:n},r)):e;if(Array.isArray(o))return o.flatMap(i=>lt(i,(0,oe.default)({ownerState:n},r)));if(o&&typeof o=="object"&&Array.isArray(o.variants)){const{variants:i=[]}=o;let l=(0,Yt.default)(o,Ul);return i.forEach(u=>{let d=!0;typeof u.props=="function"?d=u.props((0,oe.default)({ownerState:n},r,n)):Object.keys(u.props).forEach(m=>{(n==null?void 0:n[m])!==u.props[m]&&r[m]!==u.props[m]&&(d=!1)}),d&&(Array.isArray(l)||(l=[l]),l.push(typeof u.style=="function"?u.style((0,oe.default)({ownerState:n},r,n)):u.style))}),l}return o}function Xl(e={}){const{themeId:t,defaultTheme:n=Kl,rootShouldForwardProp:r=st,slotShouldForwardProp:o=st}=e,i=a=>(0,Hl.default)((0,oe.default)({},a,{theme:rt((0,oe.default)({},a,{defaultTheme:n,themeId:t}))}));return i.__mui_systemSx=!0,(a,l={})=>{(0,Xn.internal_processStyles)(a,g=>g.filter(S=>!(S!=null&&S.__mui_systemSx)));const{name:u,slot:d,skipVariantsResolver:m,skipSx:h,overridesResolver:y=Zl(Jn(d))}=l,b=(0,Yt.default)(l,Wl),v=m!==void 0?m:d&&d!=="Root"&&d!=="root"||!1,c=h||!1;let f;process.env.NODE_ENV!=="production"&&u&&(f=`${u}-${Jn(d||"Root")}`);let x=st;d==="Root"||d==="root"?x=r:d?x=o:Gl(a)&&(x=void 0);const w=(0,Xn.default)(a,(0,oe.default)({shouldForwardProp:x,label:f},b)),_=g=>typeof g=="function"&&g.__emotion_real!==g||(0,zl.isPlainObject)(g)?S=>lt(g,(0,oe.default)({},S,{theme:rt({theme:S.theme,defaultTheme:n,themeId:t})})):g,C=(g,...S)=>{let j=_(g);const I=S?S.map(_):[];u&&y&&I.push(z=>{const L=rt((0,oe.default)({},z,{defaultTheme:n,themeId:t}));if(!L.components||!L.components[u]||!L.components[u].styleOverrides)return null;const G=L.components[u].styleOverrides,te={};return Object.entries(G).forEach(([ue,fe])=>{te[ue]=lt(fe,(0,oe.default)({},z,{theme:L}))}),y(z,te)}),u&&!v&&I.push(z=>{var L;const G=rt((0,oe.default)({},z,{defaultTheme:n,themeId:t})),te=G==null||(L=G.components)==null||(L=L[u])==null?void 0:L.variants;return lt({variants:te},(0,oe.default)({},z,{theme:G}))}),c||I.push(i);const O=I.length-S.length;if(Array.isArray(g)&&O>0){const z=new Array(O).fill("");j=[...g,...z],j.raw=[...g.raw,...z]}const H=w(j,...I);if(process.env.NODE_ENV!=="production"){let z;u&&(z=`${u}${(0,Fl.default)(d||"")}`),z===void 0&&(z=`Styled(${(0,Ll.default)(a)})`),H.displayName=z}return a.muiName&&(H.muiName=a.muiName),H};return w.withConfig&&(C.withConfig=w.withConfig),C}}const Jl=e=>Dl(e)&&e!=="classes",Ql=Rl({themeId:qr,defaultTheme:Wr,rootShouldForwardProp:Jl}),ec=Ql;function tc(e){return Xt("MuiSvgIcon",e)}ri("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const nc=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],rc=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${we(t)}`,`fontSize${we(n)}`]};return Jo(o,tc,r)},oc=ec("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${we(n.color)}`],t[`fontSize${we(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,o,i,a,l,u,d,m,h,y,b,v;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(o=e.transitions)==null||(o=o.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((i=e.typography)==null||(a=i.pxToRem)==null?void 0:a.call(i,20))||"1.25rem",medium:((l=e.typography)==null||(u=l.pxToRem)==null?void 0:u.call(l,24))||"1.5rem",large:((d=e.typography)==null||(m=d.pxToRem)==null?void 0:m.call(d,35))||"2.1875rem"}[t.fontSize],color:(h=(y=(e.vars||e).palette)==null||(y=y[t.color])==null?void 0:y.main)!=null?h:{action:(b=(e.vars||e).palette)==null||(b=b.action)==null?void 0:b.active,disabled:(v=(e.vars||e).palette)==null||(v=v.action)==null?void 0:v.disabled,inherit:void 0}[t.color]}}),hn=F.forwardRef(function(t,n){const r=kl({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:l="svg",fontSize:u="medium",htmlColor:d,inheritViewBox:m=!1,titleAccess:h,viewBox:y="0 0 24 24"}=r,b=p._objectWithoutPropertiesLoose(r,nc),v=F.isValidElement(o)&&o.type==="svg",c=p._extends({},r,{color:a,component:l,fontSize:u,instanceFontSize:t.fontSize,inheritViewBox:m,viewBox:y,hasSvgAsChild:v}),f={};m||(f.viewBox=y);const x=rc(c);return s.jsxs(oc,p._extends({as:l,className:p.clsx(x.root,i),focusable:"false",color:d,"aria-hidden":h?void 0:!0,role:h?"img":void 0,ref:n},f,b,v&&o.props,{ownerState:c,children:[v?o.props.children:o,h?s.jsx("title",{children:h}):null]}))});process.env.NODE_ENV!=="production"&&(hn.propTypes={children:p.PropTypes.node,classes:p.PropTypes.object,className:p.PropTypes.string,color:p.PropTypes.oneOfType([p.PropTypes.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),p.PropTypes.string]),component:p.PropTypes.elementType,fontSize:p.PropTypes.oneOfType([p.PropTypes.oneOf(["inherit","large","medium","small"]),p.PropTypes.string]),htmlColor:p.PropTypes.string,inheritViewBox:p.PropTypes.bool,shapeRendering:p.PropTypes.string,sx:p.PropTypes.oneOfType([p.PropTypes.arrayOf(p.PropTypes.oneOfType([p.PropTypes.func,p.PropTypes.object,p.PropTypes.bool])),p.PropTypes.func,p.PropTypes.object]),titleAccess:p.PropTypes.string,viewBox:p.PropTypes.string});hn.muiName="SvgIcon";const Qn=hn;function ic(e,t){function n(r,o){return s.jsx(Qn,p._extends({"data-testid":`${t}Icon`,ref:o},r,{children:e}))}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=Qn.muiName,F.memo(F.forwardRef(n))}const ac=ic(s.jsx("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown");var er=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function sc(e,t){return!!(e===t||er(e)&&er(t))}function lc(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!sc(e[n],t[n]))return!1;return!0}function Ft(e,t){t===void 0&&(t=lc);var n,r=[],o,i=!1;function a(){for(var l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];return i&&n===this&&t(l,r)||(o=e.apply(this,l),i=!0,n=this,r=l),o}return a}var cc=typeof performance=="object"&&typeof performance.now=="function",tr=cc?function(){return performance.now()}:function(){return Date.now()};function nr(e){cancelAnimationFrame(e.id)}function dc(e,t){var n=tr();function r(){tr()-n>=t?e.call(null):o.id=requestAnimationFrame(r)}var o={id:requestAnimationFrame(r)};return o}var Lt=-1;function rr(e){if(e===void 0&&(e=!1),Lt===-1||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),Lt=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Lt}var Pe=null;function or(e){if(e===void 0&&(e=!1),Pe===null||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?Pe="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?Pe="negative":Pe="positive-ascending"),document.body.removeChild(t),Pe}return Pe}process.env.NODE_ENV;var uc=150,fc=function(t,n){return t},ct=null,dt=null;process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof window.WeakSet<"u"&&(ct=new WeakSet,dt=new WeakSet);function mc(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,l=e.getStopIndexForStartIndex,u=e.initInstanceProps,d=e.shouldResetStyleCacheOnItemSizeChange,m=e.validateProps;return t=function(h){p._inheritsLoose(y,h);function y(v){var c;return c=h.call(this,v)||this,c._instanceProps=u(c.props,p._assertThisInitialized(c)),c._outerRef=void 0,c._resetIsScrollingTimeoutId=null,c.state={instance:p._assertThisInitialized(c),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof c.props.initialScrollOffset=="number"?c.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},c._callOnItemsRendered=void 0,c._callOnItemsRendered=Ft(function(f,x,w,_){return c.props.onItemsRendered({overscanStartIndex:f,overscanStopIndex:x,visibleStartIndex:w,visibleStopIndex:_})}),c._callOnScroll=void 0,c._callOnScroll=Ft(function(f,x,w){return c.props.onScroll({scrollDirection:f,scrollOffset:x,scrollUpdateWasRequested:w})}),c._getItemStyle=void 0,c._getItemStyle=function(f){var x=c.props,w=x.direction,_=x.itemSize,C=x.layout,g=c._getItemStyleCache(d&&_,d&&C,d&&w),S;if(g.hasOwnProperty(f))S=g[f];else{var j=n(c.props,f,c._instanceProps),I=o(c.props,f,c._instanceProps),O=w==="horizontal"||C==="horizontal",H=w==="rtl",z=O?j:0;g[f]=S={position:"absolute",left:H?void 0:z,right:H?z:void 0,top:O?0:j,height:O?"100%":I,width:O?I:"100%"}}return S},c._getItemStyleCache=void 0,c._getItemStyleCache=Ft(function(f,x,w){return{}}),c._onScrollHorizontal=function(f){var x=f.currentTarget,w=x.clientWidth,_=x.scrollLeft,C=x.scrollWidth;c.setState(function(g){if(g.scrollOffset===_)return null;var S=c.props.direction,j=_;if(S==="rtl")switch(or()){case"negative":j=-_;break;case"positive-descending":j=C-w-_;break}return j=Math.max(0,Math.min(j,C-w)),{isScrolling:!0,scrollDirection:g.scrollOffset<j?"forward":"backward",scrollOffset:j,scrollUpdateWasRequested:!1}},c._resetIsScrollingDebounced)},c._onScrollVertical=function(f){var x=f.currentTarget,w=x.clientHeight,_=x.scrollHeight,C=x.scrollTop;c.setState(function(g){if(g.scrollOffset===C)return null;var S=Math.max(0,Math.min(C,_-w));return{isScrolling:!0,scrollDirection:g.scrollOffset<S?"forward":"backward",scrollOffset:S,scrollUpdateWasRequested:!1}},c._resetIsScrollingDebounced)},c._outerRefSetter=function(f){var x=c.props.outerRef;c._outerRef=f,typeof x=="function"?x(f):x!=null&&typeof x=="object"&&x.hasOwnProperty("current")&&(x.current=f)},c._resetIsScrollingDebounced=function(){c._resetIsScrollingTimeoutId!==null&&nr(c._resetIsScrollingTimeoutId),c._resetIsScrollingTimeoutId=dc(c._resetIsScrolling,uc)},c._resetIsScrolling=function(){c._resetIsScrollingTimeoutId=null,c.setState({isScrolling:!1},function(){c._getItemStyleCache(-1,null)})},c}y.getDerivedStateFromProps=function(c,f){return hc(c,f),m(c),null};var b=y.prototype;return b.scrollTo=function(c){c=Math.max(0,c),this.setState(function(f){return f.scrollOffset===c?null:{scrollDirection:f.scrollOffset<c?"forward":"backward",scrollOffset:c,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},b.scrollToItem=function(c,f){f===void 0&&(f="auto");var x=this.props,w=x.itemCount,_=x.layout,C=this.state.scrollOffset;c=Math.max(0,Math.min(c,w-1));var g=0;if(this._outerRef){var S=this._outerRef;_==="vertical"?g=S.scrollWidth>S.clientWidth?rr():0:g=S.scrollHeight>S.clientHeight?rr():0}this.scrollTo(i(this.props,c,f,C,this._instanceProps,g))},b.componentDidMount=function(){var c=this.props,f=c.direction,x=c.initialScrollOffset,w=c.layout;if(typeof x=="number"&&this._outerRef!=null){var _=this._outerRef;f==="horizontal"||w==="horizontal"?_.scrollLeft=x:_.scrollTop=x}this._callPropsCallbacks()},b.componentDidUpdate=function(){var c=this.props,f=c.direction,x=c.layout,w=this.state,_=w.scrollOffset,C=w.scrollUpdateWasRequested;if(C&&this._outerRef!=null){var g=this._outerRef;if(f==="horizontal"||x==="horizontal")if(f==="rtl")switch(or()){case"negative":g.scrollLeft=-_;break;case"positive-ascending":g.scrollLeft=_;break;default:var S=g.clientWidth,j=g.scrollWidth;g.scrollLeft=j-S-_;break}else g.scrollLeft=_;else g.scrollTop=_}this._callPropsCallbacks()},b.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&nr(this._resetIsScrollingTimeoutId)},b.render=function(){var c=this.props,f=c.children,x=c.className,w=c.direction,_=c.height,C=c.innerRef,g=c.innerElementType,S=c.innerTagName,j=c.itemCount,I=c.itemData,O=c.itemKey,H=O===void 0?fc:O,z=c.layout,L=c.outerElementType,G=c.outerTagName,te=c.style,ue=c.useIsScrolling,fe=c.width,W=this.state.isScrolling,J=w==="horizontal"||z==="horizontal",le=J?this._onScrollHorizontal:this._onScrollVertical,me=this._getRangeToRender(),ce=me[0],xe=me[1],Ce=[];if(j>0)for(var ye=ce;ye<=xe;ye++)Ce.push(E.createElement(f,{data:I,key:H(ye,I),index:ye,isScrolling:ue?W:void 0,style:this._getItemStyle(ye)}));var Ee=r(this.props,this._instanceProps);return E.createElement(L||G||"div",{className:x,onScroll:le,ref:this._outerRefSetter,style:p._extends({position:"relative",height:_,width:fe,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:w},te)},E.createElement(g||S||"div",{children:Ce,ref:C,style:{height:J?"100%":Ee,pointerEvents:W?"none":void 0,width:J?Ee:"100%"}}))},b._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var c=this.props.itemCount;if(c>0){var f=this._getRangeToRender(),x=f[0],w=f[1],_=f[2],C=f[3];this._callOnItemsRendered(x,w,_,C)}}if(typeof this.props.onScroll=="function"){var g=this.state,S=g.scrollDirection,j=g.scrollOffset,I=g.scrollUpdateWasRequested;this._callOnScroll(S,j,I)}},b._getRangeToRender=function(){var c=this.props,f=c.itemCount,x=c.overscanCount,w=this.state,_=w.isScrolling,C=w.scrollDirection,g=w.scrollOffset;if(f===0)return[0,0,0,0];var S=a(this.props,g,this._instanceProps),j=l(this.props,S,g,this._instanceProps),I=!_||C==="backward"?Math.max(1,x):1,O=!_||C==="forward"?Math.max(1,x):1;return[Math.max(0,S-I),Math.max(0,Math.min(f-1,j+O)),S,j]},y}(E.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var hc=function(t,n){var r=t.children,o=t.direction,i=t.height,a=t.layout,l=t.innerTagName,u=t.outerTagName,d=t.width,m=n.instance;if(process.env.NODE_ENV!=="production"){(l!=null||u!=null)&&dt&&!dt.has(m)&&(dt.add(m),console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead."));var h=o==="horizontal"||a==="horizontal";switch(o){case"horizontal":case"vertical":ct&&!ct.has(m)&&(ct.add(m),console.warn('The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.'));break;case"ltr":case"rtl":break;default:throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". '+('"'+o+'" was specified.'))}switch(a){case"horizontal":case"vertical":break;default:throw Error('An invalid "layout" prop has been specified. Value should be either "horizontal" or "vertical". '+('"'+a+'" was specified.'))}if(r==null)throw Error('An invalid "children" prop has been specified. Value should be a React component. '+('"'+(r===null?"null":typeof r)+'" was specified.'));if(h&&typeof d!="number")throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. '+('"'+(d===null?"null":typeof d)+'" was specified.'));if(!h&&typeof i!="number")throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. '+('"'+(i===null?"null":typeof i)+'" was specified.'))}},pc=50,Me=function(t,n,r){var o=t,i=o.itemSize,a=r.itemMetadataMap,l=r.lastMeasuredIndex;if(n>l){var u=0;if(l>=0){var d=a[l];u=d.offset+d.size}for(var m=l+1;m<=n;m++){var h=i(m);a[m]={offset:u,size:h},u+=h}r.lastMeasuredIndex=n}return a[n]},gc=function(t,n,r){var o=n.itemMetadataMap,i=n.lastMeasuredIndex,a=i>0?o[i].offset:0;return a>=r?Gr(t,n,i,0,r):yc(t,n,Math.max(0,i),r)},Gr=function(t,n,r,o,i){for(;o<=r;){var a=o+Math.floor((r-o)/2),l=Me(t,a,n).offset;if(l===i)return a;l<i?o=a+1:l>i&&(r=a-1)}return o>0?o-1:0},yc=function(t,n,r,o){for(var i=t.itemCount,a=1;r<i&&Me(t,r,n).offset<o;)r+=a,a*=2;return Gr(t,n,Math.min(r,i-1),Math.floor(r/2),o)},ir=function(t,n){var r=t.itemCount,o=n.itemMetadataMap,i=n.estimatedItemSize,a=n.lastMeasuredIndex,l=0;if(a>=r&&(a=r-1),a>=0){var u=o[a];l=u.offset+u.size}var d=r-a-1,m=d*i;return l+m},vc=mc({getItemOffset:function(t,n,r){return Me(t,n,r).offset},getItemSize:function(t,n,r){return r.itemMetadataMap[n].size},getEstimatedTotalSize:ir,getOffsetForIndexAndAlignment:function(t,n,r,o,i,a){var l=t.direction,u=t.height,d=t.layout,m=t.width,h=l==="horizontal"||d==="horizontal",y=h?m:u,b=Me(t,n,i),v=ir(t,i),c=Math.max(0,Math.min(v-y,b.offset)),f=Math.max(0,b.offset-y+b.size+a);switch(r==="smart"&&(o>=f-y&&o<=c+y?r="auto":r="center"),r){case"start":return c;case"end":return f;case"center":return Math.round(f+(c-f)/2);case"auto":default:return o>=f&&o<=c?o:o<f?f:c}},getStartIndexForOffset:function(t,n,r){return gc(t,r,n)},getStopIndexForStartIndex:function(t,n,r,o){for(var i=t.direction,a=t.height,l=t.itemCount,u=t.layout,d=t.width,m=i==="horizontal"||u==="horizontal",h=m?d:a,y=Me(t,n,o),b=r+h,v=y.offset+y.size,c=n;c<l-1&&v<b;)c++,v+=Me(t,c,o).size;return c},initInstanceProps:function(t,n){var r=t,o=r.estimatedItemSize,i={itemMetadataMap:{},estimatedItemSize:o||pc,lastMeasuredIndex:-1};return n.resetAfterIndex=function(a,l){l===void 0&&(l=!0),i.lastMeasuredIndex=Math.min(i.lastMeasuredIndex,a-1),n._getItemStyleCache(-1),l&&n.forceUpdate()},i},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(t){var n=t.itemSize;if(process.env.NODE_ENV!=="production"&&typeof n!="function")throw Error('An invalid "itemSize" prop has been specified. Value should be a function. '+('"'+(n===null?"null":typeof n)+'" was specified.'))}});function Gt(e){const{colors:t}=p.useTheme();return s.jsx(N.Stack,{sx:{cursor:"pointer"},onClick:n=>{var r;n.preventDefault(),n.stopPropagation(),(r=e.onClick)==null||r.call(e,e.option)},...e.stackProps,children:s.jsx(N.Stack,{sx:{p:1,transition:"0.2s",borderRadius:"5px",cursor:"pointer",...p.activeStyles({backgroundColor:t.primary200},e.select),":hover":{backgroundColor:"#eeeeee80",borderColor:"transparent"}},children:e.renderOption(e.option)})})}const pt=37,xc=(e,t)=>{const a=document.createElement("p");a.innerText=t,a.style.width=`${e-16-16-4}px`,document.body.appendChild(a);const l=a.offsetHeight;return document.body.removeChild(a),l>21?pt+21:pt};function bc(e){const[t,n]=E.useState(!1),[r,o]=E.useState(""),[i,a]=E.useState(""),[l,u]=E.useState(!1),{isRequired:d=!1}=e,m=E.useCallback(p._.debounce(S=>{var j;(j=e.handleChangeSearch)==null||j.call(e,S)},300),[e.handleChangeSearch]),h=()=>{n(!t)},y=()=>{n(!1),a(""),m("")};E.useEffect(()=>{o(e.value?e.getOptionLabel(e.value):"")},[e.value]),E.useEffect(()=>{t||o(e.value?e.getOptionLabel(e.value):"")},[t]),E.useEffect(()=>{u(e.searchLoading)},[e.paging.rows,e.searchLoading]);const b=e.paging.rows,{hasNextPage:v}=e,c=v?b.length+1:b.length,f=()=>e.isNextPageLoading?void 0:e.loadNextPage(i),x=S=>!v||S<b.length,w=S=>{o(S.target.value),t&&(a(S.target.value),m(S.target.value),u(!0))},_=E.useRef(null),C=E.useRef(null),g=E.useRef(null);return E.useEffect(()=>{var S,j,I,O;t?((S=C.current)==null||S.classList.add("Mui-focused"),(j=g.current)==null||j.classList.add("Mui-focused")):((I=C.current)==null||I.classList.remove("Mui-focused"),(O=g.current)==null||O.classList.remove("Mui-focused"))},[t]),s.jsx(N.ClickAwayListener,{onClickAway:y,mouseEvent:"onMouseDown",touchEvent:"onTouchEnd",children:s.jsx("div",{ref:_,style:{width:e.wrapperWidth??"auto"},children:s.jsxs(N.Stack,{sx:{position:"relative"},children:[s.jsx(N.TextField,{required:d,label:e.label,value:r,disabled:e.loading||e.disabled||e.readOnly,fullWidth:!0,error:e.error,helperText:e.helperText,onFocus:S=>{e.loading||e.disabled||e.readOnly||(S.preventDefault(),S.stopPropagation(),n(!0))},autoComplete:"off",onChange:w,placeholder:e.placeholder||"All options",sx:{"& input:not(:focus)":{"&::placeholder":{color:e.placeHolderColor||"#C5C5C5",opacity:1}}},InputLabelProps:{ref:C,shrink:!0},InputProps:{readOnly:e.readOnly,ref:g,endAdornment:s.jsx(N.IconButton,{size:"small",sx:{padding:"1px"},onClick:S=>{var j;S.preventDefault(),S.stopPropagation(),h(),(j=_.current)==null||j.focus()},disabled:e.loading||e.disabled||e.readOnly,children:e.loading?s.jsx(N.CircularProgress,{size:"16px"}):s.jsx(ac,{fontSize:"small",style:{transition:"0.3s"},className:t?"rotate":""})})}}),s.jsx(N.Fade,{in:t,timeout:0,unmountOnExit:!1,children:s.jsxs(N.Paper,{sx:{position:"absolute",top:"calc(100% + 2px)",zIndex:2,left:0,right:0,p:1},children:[!e.disabledAllOption&&s.jsx(N.Stack,{sx:{...p.activeStyles({display:"none"},!!l)},children:s.jsx(N.Stack,{children:s.jsx(Gt,{option:void 0,select:!e.value,renderOption:()=>s.jsx(N.Typography,{children:e.placeholder||"All options"}),onClick:()=>{var S,j;y(),(S=e.onChange)==null||S.call(e,void 0),(j=e.handleChangeSearch)==null||j.call(e,"")}})})}),!l&&s.jsx(p.InfiniteLoader,{isItemLoaded:x,itemCount:c,loadMoreItems:f,threshold:5,children:({onItemsRendered:S,ref:j})=>s.jsx(vc,{ref:j,onItemsRendered:S,height:pt*Math.min(e.itemsNumber||6,c),itemCount:c,itemSize:I=>{var O;return xc((O=_.current)==null?void 0:O.offsetWidth,b[I]?e.getOptionLabel(b[I]):"")},width:"100%",className:"styled-scroll",children:({index:I,style:O})=>{var z;const H=b[I];return x(I)?s.jsx(Gt,{stackProps:{style:O},option:H,renderOption:L=>{var G;return s.jsxs(N.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[s.jsx(N.Typography,{children:e.getOptionLabel(L)}),(G=e.renderOptionTooltip)==null?void 0:G.call(e,L)]})},onClick:L=>{var G;y(),(G=e.onChange)==null||G.call(e,L)},select:((z=e.isEqual)==null?void 0:z.call(e,H,e.value))??p._.isEqual(H,e.value)}):s.jsx(N.Stack,{style:O,sx:{height:pt,pl:1},justifyContent:"center",children:s.jsx(N.Typography,{children:"Loading..."})})}})}),s.jsx(N.Stack,{sx:{height:30,display:"flex",justifyContent:"center",paddingLeft:"5px",...p.activeStyles({display:"none"},!l)},children:s.jsx(N.Typography,{color:"grayText",children:"Searching..."})}),s.jsx(N.Stack,{sx:{height:30,display:"flex",justifyContent:"center",paddingLeft:"5px",...p.activeStyles({display:"none"},!!(b.length||e.loading||l))},children:s.jsx(N.Typography,{color:"grayText",children:"No options"})})]})})]})})})}function _c(e){var m;const{listProps:t}=e,[n,r]=E.useState({initLoading:!e.disabled,searchLoading:!1,hasNextPage:!1,isNextPageLoading:!1,paging:{page:1,pageSize:((m=e.listProps)==null?void 0:m.pageSize)||20,rows:[],total:0,totalPages:1}}),o=async(h,y)=>{var b,v;if(e.list)r(()=>{var x;const c=((x=h==null?void 0:h.search)==null?void 0:x.content)||"";return{hasNextPage:!1,isNextPageLoading:!1,paging:{page:1,pageSize:1e5,rows:e.list.options.filter(w=>e.list.searchOption?e.list.searchOption(w,c):p.search(w,c,e.list.searchFields)),total:e.list.options.length,totalPages:1},searchLoading:!1,initLoading:!1}});else{r(c=>({...c,isNextPageLoading:!0}));try{const c={page:1,pageSize:20,filter:{...t==null?void 0:t.filter,...h==null?void 0:h.filter},...p.lodashExports.omit(t,"filter"),...p.lodashExports.omit(h,"filter"),search:{fields:((b=t==null?void 0:t.search)==null?void 0:b.fields)??[],content:((v=h==null?void 0:h.search)==null?void 0:v.content)??""}};y&&(c.filter={},c.search&&(c.search.content=""),c.page=1);const f=await e.getList(c);r(x=>({initLoading:!1,searchLoading:!1,isNextPageLoading:!1,paging:{...f,rows:(h==null?void 0:h.page)===1?f.rows:x.paging.rows.concat(f.rows)},hasNextPage:f.page<f.totalPages}))}catch{}}},i=()=>(r(h=>({...h,initLoading:!0})),o(void 0,!0)),a=h=>(r(y=>({...y,initLoading:!0})),o(h)),l=h=>{o({page:n.paging.page+1,search:{content:h}})},u=h=>{r(y=>({...y,searchLoading:!0})),o({page:1,search:{content:h}})};E.useEffect(()=>{e.disabled||(r(h=>({...h,initLoading:!0})),o({page:1}))},[...e.dependencyList||[]]);const d=()=>{r(h=>({...h,initLoading:!h.initLoading}))};return{...e,loadNextPage:l,handleChangeSearch:u,paging:n.paging,hasNextPage:n.hasNextPage,isNextPageLoading:n.isNextPageLoading,searchLoading:n.searchLoading,loading:e.loading||n.initLoading,getList:a,reset:i,toggleLoading:d}}function wc(e){return s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[s.jsx("path",{d:"M12 3.16663H3.99998C2.80336 3.16663 1.83331 4.13668 1.83331 5.33329V12C1.83331 13.1966 2.80336 14.1666 3.99998 14.1666H12C13.1966 14.1666 14.1666 13.1966 14.1666 12V5.33329C14.1666 4.13668 13.1966 3.16663 12 3.16663Z",stroke:"#85858A"}),s.jsx("path",{d:"M4.5 1.83337V4.16671",stroke:"#85858A",strokeLinecap:"round"}),s.jsx("path",{d:"M2.5 6.16663H13.5",stroke:"#85858A",strokeLinecap:"round"}),s.jsx("path",{d:"M11.8333 1.83337V4.16671",stroke:"#85858A",strokeLinecap:"round"}),s.jsx("path",{d:"M5.5 9.33337C5.77614 9.33337 6 9.10952 6 8.83337C6 8.55723 5.77614 8.33337 5.5 8.33337C5.22386 8.33337 5 8.55723 5 8.83337C5 9.10952 5.22386 9.33337 5.5 9.33337Z",fill:"#85858A"}),s.jsx("path",{d:"M8.16669 9.33337C8.44283 9.33337 8.66669 9.10952 8.66669 8.83337C8.66669 8.55723 8.44283 8.33337 8.16669 8.33337C7.89054 8.33337 7.66669 8.55723 7.66669 8.83337C7.66669 9.10952 7.89054 9.33337 8.16669 9.33337Z",fill:"#85858A"}),s.jsx("path",{d:"M10.8333 9.33337C11.1095 9.33337 11.3333 9.10952 11.3333 8.83337C11.3333 8.55723 11.1095 8.33337 10.8333 8.33337C10.5572 8.33337 10.3333 8.55723 10.3333 8.83337C10.3333 9.10952 10.5572 9.33337 10.8333 9.33337Z",fill:"#85858A"}),s.jsx("path",{d:"M5.5 12C5.77614 12 6 11.7761 6 11.5C6 11.2239 5.77614 11 5.5 11C5.22386 11 5 11.2239 5 11.5C5 11.7761 5.22386 12 5.5 12Z",fill:"#85858A"}),s.jsx("path",{d:"M8.16669 12C8.44283 12 8.66669 11.7761 8.66669 11.5C8.66669 11.2239 8.44283 11 8.16669 11C7.89054 11 7.66669 11.2239 7.66669 11.5C7.66669 11.7761 7.89054 12 8.16669 12Z",fill:"#85858A"}),s.jsx("path",{d:"M10.8333 12C11.1095 12 11.3333 11.7761 11.3333 11.5C11.3333 11.2239 11.1095 11 10.8333 11C10.5572 11 10.3333 11.2239 10.3333 11.5C10.3333 11.7761 10.5572 12 10.8333 12Z",fill:"#85858A"})]})}const Sc="Reset date";function Cc(e){var l,u;const[t,n]=E.useState(e.value),r=!(t!=null&&t.startDate)||!(t!=null&&t.endDate)?"":Z(t==null?void 0:t.startDate).format("DD/MM/YYYY")+" ~ "+Z(t==null?void 0:t.endDate).format("DD/MM/YYYY");E.useEffect(()=>{n(e.value)},[e.value]);const o=E.useRef(null),i=E.useRef(null),a=E.useRef(null);return console.log("inputRef",o),console.log("labelRef",i),s.jsx(p.DateRangePicker,{initialSettings:{autoApply:!0,ranges:{Today:[Z(),Z()],Yesterday:[Z().subtract(1,"days"),Z().subtract(1,"days")],"Last 7 days":[Z().subtract(6,"days"),Z()],"Last 30 days":[Z().subtract(29,"days"),Z()],"This month":[Z().startOf("month"),Z().endOf("month")],"Last month":[Z().subtract(1,"month").startOf("month"),Z().subtract(1,"month").endOf("month")],"Reset date":[((l=e.dateReset)==null?void 0:l.startDate)??void 0,((u=e.dateReset)==null?void 0:u.endDate)??void 0]},alwaysShowCalendars:!0,startDate:(t==null?void 0:t.startDate)??void 0,endDate:(t==null?void 0:t.endDate)??void 0,opens:"left",maxDate:Z(),...e.initialSettings},onApply:(d,m)=>{var f,x,w;const h=m.chosenLabel===Sc,{startDate:y,endDate:b}=m,v=h?((f=e.dateReset)==null?void 0:f.startDate)??void 0:y.toDate(),c=h?((x=e.dateReset)==null?void 0:x.endDate)??void 0:b.toDate();n({startDate:v,endDate:c}),(w=e.onChange)==null||w.call(e,{startDate:v,endDate:c})},children:s.jsx(N.TextField,{inputRef:o,label:e.label??"Permit date",placeholder:"Select date range",value:r,InputLabelProps:{ref:i,shrink:!0},InputProps:{readOnly:!0,ref:a,endAdornment:s.jsx(wc,{onClick:()=>{var d;return(d=o.current)==null?void 0:d.focus()},width:24,height:24,color:"gray"})},fullWidth:!0,sx:{"& *":{cursor:"pointer"},display:"flex",justifyContent:"center",minWidth:"250px"}})})}function Kr(e){return s.jsx("svg",{...e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:"M16 2.75H8C5.10051 2.75 2.75 5.10051 2.75 8V16C2.75 18.8995 5.10051 21.25 8 21.25H16C18.8995 21.25 21.25 18.8995 21.25 16V8C21.25 5.10051 18.8995 2.75 16 2.75Z",stroke:"#85858A",strokeWidth:"1.5"})})}function Zr(e){return s.jsxs("svg",{...e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("path",{d:"M16 2.75H8C5.10051 2.75 2.75 5.10051 2.75 8V16C2.75 18.8995 5.10051 21.25 8 21.25H16C18.8995 21.25 21.25 18.8995 21.25 16V8C21.25 5.10051 18.8995 2.75 16 2.75Z",stroke:"currentColor",strokeWidth:"1.5"}),s.jsx("path",{d:"M9 12L11 14L15 10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Ec(e){return s.jsx(N.Checkbox,{sx:{"& input:disabled ~ svg":{fill:"#ddd"}},color:"primary",icon:s.jsx(Kr,{fontSize:"small"}),checkedIcon:s.jsx(Zr,{fontSize:"small"}),style:{padding:0},...e})}const Xr=e=>{"serviceWorker"in navigator&&navigator.serviceWorker.register(e.path).then(function(t){console.log("Registration successful, scope is:",t.scope),console.log("initialize service worker props ",e);const n=p.getMessagingInWindow(p.initializeApp({apiKey:e.apiKey,authDomain:e.authDomain,projectId:e.projectId,storageBucket:e.storageBucket,messagingSenderId:e.messagingSenderId,appId:e.appId,measurementId:e.measurementId}));p.getToken(n,{serviceWorkerRegistration:t,vapidKey:e.vapidKey}).then(async r=>{if(r){console.log("current token for client: ",r);try{const o="/notification-management/api/v1/notifications/registrations",i=e.baseUrl+o;await p.axiosInstance.post(i,{deviceToken:r})}catch(o){console.log(o)}}else console.log("No registration token available. Request permission to generate one.")}).catch(r=>{console.log("An error occurred while retrieving token. ",r)})}).catch(function(t){console.log("Service worker registration failed, error:",t)})},jc=e=>{const t=new BroadcastChannel("my-channel");t.onmessage=n=>{console.log("Broadcast chanel message",n),n&&e(r=>({...r,unread:{...r.unread,total:r.unread.total+1}}))}},kc=e=>new Promise(t=>{const n=p.getMessagingInWindow(p.initializeApp({apiKey:e.apiKey,authDomain:e.authDomain,projectId:e.projectId,storageBucket:e.storageBucket,messagingSenderId:e.messagingSenderId,appId:e.appId,measurementId:e.measurementId}));p.onMessage(n,r=>{console.log("payload",r),t(r)})}),Tc=["granted","denied"],Nc=e=>{const[t,n]=E.useState(!1),r=()=>{Notification.requestPermission(function(i){i==="granted"&&Xr(e),Tc.includes(i)&&n(!0)})},o=()=>{n(!0)};return s.jsx(s.Fragment,{children:t?"":s.jsx("div",{className:p.styles$1["subscription-diaglog"],children:s.jsxs("div",{className:p.styles$1["subscription-container"],children:[s.jsx("h4",{className:p.styles$1["subscription-title"],children:"Notification"}),s.jsx("p",{className:p.styles$1["subscription-text"],children:"Choice to receive notifications for the most recent updates. You have the flexibility to disable them whenever you prefer."}),s.jsxs("div",{className:p.styles$1["subscription-btn__container"],children:[s.jsx("button",{className:p.styles$1["btn-cancel"],onClick:o,children:"Not now"}),s.jsx("button",{className:p.styles$1["btn-success"],onClick:r,children:"Turn on"})]})]})})})},Jr=e=>{const[t,n]=E.useState({actorName:"",message:"",context:"",contextUrl:""});console.log(t);const{setNotiData:r}=E.useContext(p.CustomOpenList);function o(){return s.jsx("a",{className:p.styles$2["notification-massage_container"],href:t==null?void 0:t.contextUrl,style:{width:"100%",display:"block"},children:s.jsxs("div",{className:p.styles$2["notification-massage_content"],children:[s.jsx("h6",{className:p.styles$2["notification-name"],children:t==null?void 0:t.actorName}),s.jsxs("div",{className:p.styles$2["notification-message_service"],children:[s.jsxs("span",{children:[`${t==null?void 0:t.message} `," "]}),s.jsx("span",{children:t==null?void 0:t.context})]})]})})}return E.useEffect(()=>{t&&Notification.permission==="granted"&&(t.actorName||t.message||t.context||t.contextUrl)&&p.notify(s.jsx(o,{}))},[t]),E.useEffect(()=>{Notification.permission==="granted"&&Xr(e)},[Notification.permission]),E.useEffect(()=>{jc(r)},[]),kc(e).then(i=>{var a,l,u,d;console.log("aaa",i),n({actorName:(a=i==null?void 0:i.data)==null?void 0:a.actorName,message:(l=i==null?void 0:i.data)==null?void 0:l.message,context:(u=i==null?void 0:i.data)==null?void 0:u.context,contextUrl:(d=i==null?void 0:i.data)==null?void 0:d.contextUrl}),r(m=>{var h;return{...m,unread:{...m.unread,total:((h=m.unread)==null?void 0:h.total)+1}}})}).catch(i=>console.log("failed: ",i)),s.jsx("div",{children:"Notification"in window&&Notification.permission==="default"?s.jsx(Nc,{...e}):""})},Oc=(e,t)=>E.cloneElement(t,{},e),Ic=({children:e,providers:t})=>s.jsx(s.Fragment,{children:t.reduceRight(Oc,e)}),Pc=({rootPath:e})=>{const{colors:t}=p.useTheme();return s.jsxs(N.Stack,{py:2,gap:2,style:{alignItems:"center"},children:[s.jsx("img",{width:120,height:120,src:"https://ukpcsaprod.blob.core.windows.net/lib/images/page-not-found.png",alt:""}),s.jsxs(N.Stack,{gap:1,children:[s.jsx(N.Typography,{variant:"h4",textAlign:"center",children:"Page Not Found"}),s.jsxs(N.Typography,{textAlign:"center",color:t.grey600,children:["We’re sorry. The page you requested could no be found. ",s.jsx("br",{}),"Please go back to the home page"]}),s.jsx(gt.Link,{to:e,style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center"},children:s.jsx(N.Button,{variant:"primary",style:{maxWidth:"200px",width:"100%"},children:"Go to homepage"})})]})]})};exports.GlobalMenu=p.GlobalMenu;exports.notify=p.notify;exports.pushError=p.pushError;exports.pushSuccess=p.pushSuccess;exports.pushWarning=p.pushWarning;exports.AutocompleteOption=Gt;exports.BaseCheckbox=Ec;exports.CheckedIcon=Zr;exports.FavoriteMenu=Lo;exports.HomePage=Vo;exports.MultiProvider=Ic;exports.NoData=So;exports.NotFoundPage=Oo;exports.NotificationBase=Jr;exports.PageNotFound=Pc;exports.PopUpBase=To;exports.StyledAutocomplete=bc;exports.StyledDateRangePicker=Cc;exports.ToastConfig=_o;exports.ToastConfigNotification=wo;exports.TopBar=bo;exports.UnauthorizedPage=Ho;exports.UncheckedIcon=Kr;exports.usePopUp=No;exports.useStyledAutocomplete=_c;
|
|
112
|
+
`))}y[v]={}}}};Object.keys(d.components).forEach(y=>{const b=d.components[y].styleOverrides;b&&y.indexOf("Mui")===0&&h(b,y)})}return d.unstable_sxConfig=p._extends({},Je,a==null?void 0:a.unstable_sxConfig),d.unstable_sx=function(h){return en({sx:h,theme:this})},d}const jl=El(),Wr=jl,qr="$$material";function kl({props:e,name:t}){return js({props:e,name:t,defaultTheme:Wr,themeId:qr})}var et={};const Tl=p.getAugmentedNamespace(p._extends$1),Nl=p.getAugmentedNamespace(p.objectWithoutPropertiesLoose),Ol=p.getAugmentedNamespace(_s),Il=p.getAugmentedNamespace(Uo),Pl=p.getAugmentedNamespace(Xo),Ml=p.getAugmentedNamespace(Zo),Al=p.getAugmentedNamespace(ra),$l=p.getAugmentedNamespace(Os);var Le=zr;Object.defineProperty(et,"__esModule",{value:!0});var Rl=et.default=Xl,Dl=et.shouldForwardProp=st;et.systemDefaultTheme=void 0;var oe=Le(Tl),Yt=Le(Nl),Xn=ql(Ol),zl=Il,Fl=Le(Pl),Ll=Le(Ml),Vl=Le(Al),Hl=Le($l);const Bl=["ownerState"],Ul=["variants"],Wl=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function Yr(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Yr=function(r){return r?n:t})(e)}function ql(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Yr(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}function Yl(e){return Object.keys(e).length===0}function Gl(e){return typeof e=="string"&&e.charCodeAt(0)>96}function st(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Kl=et.systemDefaultTheme=(0,Vl.default)(),Jn=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function rt({defaultTheme:e,theme:t,themeId:n}){return Yl(t)?e:t[n]||t}function Zl(e){return e?(t,n)=>n[e]:null}function lt(e,t){let{ownerState:n}=t,r=(0,Yt.default)(t,Bl);const o=typeof e=="function"?e((0,oe.default)({ownerState:n},r)):e;if(Array.isArray(o))return o.flatMap(i=>lt(i,(0,oe.default)({ownerState:n},r)));if(o&&typeof o=="object"&&Array.isArray(o.variants)){const{variants:i=[]}=o;let l=(0,Yt.default)(o,Ul);return i.forEach(u=>{let d=!0;typeof u.props=="function"?d=u.props((0,oe.default)({ownerState:n},r,n)):Object.keys(u.props).forEach(m=>{(n==null?void 0:n[m])!==u.props[m]&&r[m]!==u.props[m]&&(d=!1)}),d&&(Array.isArray(l)||(l=[l]),l.push(typeof u.style=="function"?u.style((0,oe.default)({ownerState:n},r,n)):u.style))}),l}return o}function Xl(e={}){const{themeId:t,defaultTheme:n=Kl,rootShouldForwardProp:r=st,slotShouldForwardProp:o=st}=e,i=a=>(0,Hl.default)((0,oe.default)({},a,{theme:rt((0,oe.default)({},a,{defaultTheme:n,themeId:t}))}));return i.__mui_systemSx=!0,(a,l={})=>{(0,Xn.internal_processStyles)(a,g=>g.filter(S=>!(S!=null&&S.__mui_systemSx)));const{name:u,slot:d,skipVariantsResolver:m,skipSx:h,overridesResolver:y=Zl(Jn(d))}=l,b=(0,Yt.default)(l,Wl),v=m!==void 0?m:d&&d!=="Root"&&d!=="root"||!1,c=h||!1;let f;process.env.NODE_ENV!=="production"&&u&&(f=`${u}-${Jn(d||"Root")}`);let x=st;d==="Root"||d==="root"?x=r:d?x=o:Gl(a)&&(x=void 0);const w=(0,Xn.default)(a,(0,oe.default)({shouldForwardProp:x,label:f},b)),_=g=>typeof g=="function"&&g.__emotion_real!==g||(0,zl.isPlainObject)(g)?S=>lt(g,(0,oe.default)({},S,{theme:rt({theme:S.theme,defaultTheme:n,themeId:t})})):g,C=(g,...S)=>{let j=_(g);const I=S?S.map(_):[];u&&y&&I.push(z=>{const L=rt((0,oe.default)({},z,{defaultTheme:n,themeId:t}));if(!L.components||!L.components[u]||!L.components[u].styleOverrides)return null;const G=L.components[u].styleOverrides,te={};return Object.entries(G).forEach(([ue,fe])=>{te[ue]=lt(fe,(0,oe.default)({},z,{theme:L}))}),y(z,te)}),u&&!v&&I.push(z=>{var L;const G=rt((0,oe.default)({},z,{defaultTheme:n,themeId:t})),te=G==null||(L=G.components)==null||(L=L[u])==null?void 0:L.variants;return lt({variants:te},(0,oe.default)({},z,{theme:G}))}),c||I.push(i);const O=I.length-S.length;if(Array.isArray(g)&&O>0){const z=new Array(O).fill("");j=[...g,...z],j.raw=[...g.raw,...z]}const H=w(j,...I);if(process.env.NODE_ENV!=="production"){let z;u&&(z=`${u}${(0,Fl.default)(d||"")}`),z===void 0&&(z=`Styled(${(0,Ll.default)(a)})`),H.displayName=z}return a.muiName&&(H.muiName=a.muiName),H};return w.withConfig&&(C.withConfig=w.withConfig),C}}const Jl=e=>Dl(e)&&e!=="classes",Ql=Rl({themeId:qr,defaultTheme:Wr,rootShouldForwardProp:Jl}),ec=Ql;function tc(e){return Xt("MuiSvgIcon",e)}ri("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const nc=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],rc=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${we(t)}`,`fontSize${we(n)}`]};return Jo(o,tc,r)},oc=ec("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${we(n.color)}`],t[`fontSize${we(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,o,i,a,l,u,d,m,h,y,b,v;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(o=e.transitions)==null||(o=o.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((i=e.typography)==null||(a=i.pxToRem)==null?void 0:a.call(i,20))||"1.25rem",medium:((l=e.typography)==null||(u=l.pxToRem)==null?void 0:u.call(l,24))||"1.5rem",large:((d=e.typography)==null||(m=d.pxToRem)==null?void 0:m.call(d,35))||"2.1875rem"}[t.fontSize],color:(h=(y=(e.vars||e).palette)==null||(y=y[t.color])==null?void 0:y.main)!=null?h:{action:(b=(e.vars||e).palette)==null||(b=b.action)==null?void 0:b.active,disabled:(v=(e.vars||e).palette)==null||(v=v.action)==null?void 0:v.disabled,inherit:void 0}[t.color]}}),hn=F.forwardRef(function(t,n){const r=kl({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:l="svg",fontSize:u="medium",htmlColor:d,inheritViewBox:m=!1,titleAccess:h,viewBox:y="0 0 24 24"}=r,b=p._objectWithoutPropertiesLoose(r,nc),v=F.isValidElement(o)&&o.type==="svg",c=p._extends({},r,{color:a,component:l,fontSize:u,instanceFontSize:t.fontSize,inheritViewBox:m,viewBox:y,hasSvgAsChild:v}),f={};m||(f.viewBox=y);const x=rc(c);return s.jsxs(oc,p._extends({as:l,className:p.clsx(x.root,i),focusable:"false",color:d,"aria-hidden":h?void 0:!0,role:h?"img":void 0,ref:n},f,b,v&&o.props,{ownerState:c,children:[v?o.props.children:o,h?s.jsx("title",{children:h}):null]}))});process.env.NODE_ENV!=="production"&&(hn.propTypes={children:p.PropTypes.node,classes:p.PropTypes.object,className:p.PropTypes.string,color:p.PropTypes.oneOfType([p.PropTypes.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),p.PropTypes.string]),component:p.PropTypes.elementType,fontSize:p.PropTypes.oneOfType([p.PropTypes.oneOf(["inherit","large","medium","small"]),p.PropTypes.string]),htmlColor:p.PropTypes.string,inheritViewBox:p.PropTypes.bool,shapeRendering:p.PropTypes.string,sx:p.PropTypes.oneOfType([p.PropTypes.arrayOf(p.PropTypes.oneOfType([p.PropTypes.func,p.PropTypes.object,p.PropTypes.bool])),p.PropTypes.func,p.PropTypes.object]),titleAccess:p.PropTypes.string,viewBox:p.PropTypes.string});hn.muiName="SvgIcon";const Qn=hn;function ic(e,t){function n(r,o){return s.jsx(Qn,p._extends({"data-testid":`${t}Icon`,ref:o},r,{children:e}))}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=Qn.muiName,F.memo(F.forwardRef(n))}const ac=ic(s.jsx("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown");var er=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function sc(e,t){return!!(e===t||er(e)&&er(t))}function lc(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!sc(e[n],t[n]))return!1;return!0}function Ft(e,t){t===void 0&&(t=lc);var n,r=[],o,i=!1;function a(){for(var l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];return i&&n===this&&t(l,r)||(o=e.apply(this,l),i=!0,n=this,r=l),o}return a}var cc=typeof performance=="object"&&typeof performance.now=="function",tr=cc?function(){return performance.now()}:function(){return Date.now()};function nr(e){cancelAnimationFrame(e.id)}function dc(e,t){var n=tr();function r(){tr()-n>=t?e.call(null):o.id=requestAnimationFrame(r)}var o={id:requestAnimationFrame(r)};return o}var Lt=-1;function rr(e){if(e===void 0&&(e=!1),Lt===-1||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),Lt=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Lt}var Pe=null;function or(e){if(e===void 0&&(e=!1),Pe===null||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?Pe="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?Pe="negative":Pe="positive-ascending"),document.body.removeChild(t),Pe}return Pe}process.env.NODE_ENV;var uc=150,fc=function(t,n){return t},ct=null,dt=null;process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof window.WeakSet<"u"&&(ct=new WeakSet,dt=new WeakSet);function mc(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,l=e.getStopIndexForStartIndex,u=e.initInstanceProps,d=e.shouldResetStyleCacheOnItemSizeChange,m=e.validateProps;return t=function(h){p._inheritsLoose(y,h);function y(v){var c;return c=h.call(this,v)||this,c._instanceProps=u(c.props,p._assertThisInitialized(c)),c._outerRef=void 0,c._resetIsScrollingTimeoutId=null,c.state={instance:p._assertThisInitialized(c),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof c.props.initialScrollOffset=="number"?c.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},c._callOnItemsRendered=void 0,c._callOnItemsRendered=Ft(function(f,x,w,_){return c.props.onItemsRendered({overscanStartIndex:f,overscanStopIndex:x,visibleStartIndex:w,visibleStopIndex:_})}),c._callOnScroll=void 0,c._callOnScroll=Ft(function(f,x,w){return c.props.onScroll({scrollDirection:f,scrollOffset:x,scrollUpdateWasRequested:w})}),c._getItemStyle=void 0,c._getItemStyle=function(f){var x=c.props,w=x.direction,_=x.itemSize,C=x.layout,g=c._getItemStyleCache(d&&_,d&&C,d&&w),S;if(g.hasOwnProperty(f))S=g[f];else{var j=n(c.props,f,c._instanceProps),I=o(c.props,f,c._instanceProps),O=w==="horizontal"||C==="horizontal",H=w==="rtl",z=O?j:0;g[f]=S={position:"absolute",left:H?void 0:z,right:H?z:void 0,top:O?0:j,height:O?"100%":I,width:O?I:"100%"}}return S},c._getItemStyleCache=void 0,c._getItemStyleCache=Ft(function(f,x,w){return{}}),c._onScrollHorizontal=function(f){var x=f.currentTarget,w=x.clientWidth,_=x.scrollLeft,C=x.scrollWidth;c.setState(function(g){if(g.scrollOffset===_)return null;var S=c.props.direction,j=_;if(S==="rtl")switch(or()){case"negative":j=-_;break;case"positive-descending":j=C-w-_;break}return j=Math.max(0,Math.min(j,C-w)),{isScrolling:!0,scrollDirection:g.scrollOffset<j?"forward":"backward",scrollOffset:j,scrollUpdateWasRequested:!1}},c._resetIsScrollingDebounced)},c._onScrollVertical=function(f){var x=f.currentTarget,w=x.clientHeight,_=x.scrollHeight,C=x.scrollTop;c.setState(function(g){if(g.scrollOffset===C)return null;var S=Math.max(0,Math.min(C,_-w));return{isScrolling:!0,scrollDirection:g.scrollOffset<S?"forward":"backward",scrollOffset:S,scrollUpdateWasRequested:!1}},c._resetIsScrollingDebounced)},c._outerRefSetter=function(f){var x=c.props.outerRef;c._outerRef=f,typeof x=="function"?x(f):x!=null&&typeof x=="object"&&x.hasOwnProperty("current")&&(x.current=f)},c._resetIsScrollingDebounced=function(){c._resetIsScrollingTimeoutId!==null&&nr(c._resetIsScrollingTimeoutId),c._resetIsScrollingTimeoutId=dc(c._resetIsScrolling,uc)},c._resetIsScrolling=function(){c._resetIsScrollingTimeoutId=null,c.setState({isScrolling:!1},function(){c._getItemStyleCache(-1,null)})},c}y.getDerivedStateFromProps=function(c,f){return hc(c,f),m(c),null};var b=y.prototype;return b.scrollTo=function(c){c=Math.max(0,c),this.setState(function(f){return f.scrollOffset===c?null:{scrollDirection:f.scrollOffset<c?"forward":"backward",scrollOffset:c,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},b.scrollToItem=function(c,f){f===void 0&&(f="auto");var x=this.props,w=x.itemCount,_=x.layout,C=this.state.scrollOffset;c=Math.max(0,Math.min(c,w-1));var g=0;if(this._outerRef){var S=this._outerRef;_==="vertical"?g=S.scrollWidth>S.clientWidth?rr():0:g=S.scrollHeight>S.clientHeight?rr():0}this.scrollTo(i(this.props,c,f,C,this._instanceProps,g))},b.componentDidMount=function(){var c=this.props,f=c.direction,x=c.initialScrollOffset,w=c.layout;if(typeof x=="number"&&this._outerRef!=null){var _=this._outerRef;f==="horizontal"||w==="horizontal"?_.scrollLeft=x:_.scrollTop=x}this._callPropsCallbacks()},b.componentDidUpdate=function(){var c=this.props,f=c.direction,x=c.layout,w=this.state,_=w.scrollOffset,C=w.scrollUpdateWasRequested;if(C&&this._outerRef!=null){var g=this._outerRef;if(f==="horizontal"||x==="horizontal")if(f==="rtl")switch(or()){case"negative":g.scrollLeft=-_;break;case"positive-ascending":g.scrollLeft=_;break;default:var S=g.clientWidth,j=g.scrollWidth;g.scrollLeft=j-S-_;break}else g.scrollLeft=_;else g.scrollTop=_}this._callPropsCallbacks()},b.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&nr(this._resetIsScrollingTimeoutId)},b.render=function(){var c=this.props,f=c.children,x=c.className,w=c.direction,_=c.height,C=c.innerRef,g=c.innerElementType,S=c.innerTagName,j=c.itemCount,I=c.itemData,O=c.itemKey,H=O===void 0?fc:O,z=c.layout,L=c.outerElementType,G=c.outerTagName,te=c.style,ue=c.useIsScrolling,fe=c.width,W=this.state.isScrolling,J=w==="horizontal"||z==="horizontal",le=J?this._onScrollHorizontal:this._onScrollVertical,me=this._getRangeToRender(),ce=me[0],xe=me[1],Ce=[];if(j>0)for(var ye=ce;ye<=xe;ye++)Ce.push(E.createElement(f,{data:I,key:H(ye,I),index:ye,isScrolling:ue?W:void 0,style:this._getItemStyle(ye)}));var Ee=r(this.props,this._instanceProps);return E.createElement(L||G||"div",{className:x,onScroll:le,ref:this._outerRefSetter,style:p._extends({position:"relative",height:_,width:fe,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:w},te)},E.createElement(g||S||"div",{children:Ce,ref:C,style:{height:J?"100%":Ee,pointerEvents:W?"none":void 0,width:J?Ee:"100%"}}))},b._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var c=this.props.itemCount;if(c>0){var f=this._getRangeToRender(),x=f[0],w=f[1],_=f[2],C=f[3];this._callOnItemsRendered(x,w,_,C)}}if(typeof this.props.onScroll=="function"){var g=this.state,S=g.scrollDirection,j=g.scrollOffset,I=g.scrollUpdateWasRequested;this._callOnScroll(S,j,I)}},b._getRangeToRender=function(){var c=this.props,f=c.itemCount,x=c.overscanCount,w=this.state,_=w.isScrolling,C=w.scrollDirection,g=w.scrollOffset;if(f===0)return[0,0,0,0];var S=a(this.props,g,this._instanceProps),j=l(this.props,S,g,this._instanceProps),I=!_||C==="backward"?Math.max(1,x):1,O=!_||C==="forward"?Math.max(1,x):1;return[Math.max(0,S-I),Math.max(0,Math.min(f-1,j+O)),S,j]},y}(E.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var hc=function(t,n){var r=t.children,o=t.direction,i=t.height,a=t.layout,l=t.innerTagName,u=t.outerTagName,d=t.width,m=n.instance;if(process.env.NODE_ENV!=="production"){(l!=null||u!=null)&&dt&&!dt.has(m)&&(dt.add(m),console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead."));var h=o==="horizontal"||a==="horizontal";switch(o){case"horizontal":case"vertical":ct&&!ct.has(m)&&(ct.add(m),console.warn('The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.'));break;case"ltr":case"rtl":break;default:throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". '+('"'+o+'" was specified.'))}switch(a){case"horizontal":case"vertical":break;default:throw Error('An invalid "layout" prop has been specified. Value should be either "horizontal" or "vertical". '+('"'+a+'" was specified.'))}if(r==null)throw Error('An invalid "children" prop has been specified. Value should be a React component. '+('"'+(r===null?"null":typeof r)+'" was specified.'));if(h&&typeof d!="number")throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. '+('"'+(d===null?"null":typeof d)+'" was specified.'));if(!h&&typeof i!="number")throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. '+('"'+(i===null?"null":typeof i)+'" was specified.'))}},pc=50,Me=function(t,n,r){var o=t,i=o.itemSize,a=r.itemMetadataMap,l=r.lastMeasuredIndex;if(n>l){var u=0;if(l>=0){var d=a[l];u=d.offset+d.size}for(var m=l+1;m<=n;m++){var h=i(m);a[m]={offset:u,size:h},u+=h}r.lastMeasuredIndex=n}return a[n]},gc=function(t,n,r){var o=n.itemMetadataMap,i=n.lastMeasuredIndex,a=i>0?o[i].offset:0;return a>=r?Gr(t,n,i,0,r):yc(t,n,Math.max(0,i),r)},Gr=function(t,n,r,o,i){for(;o<=r;){var a=o+Math.floor((r-o)/2),l=Me(t,a,n).offset;if(l===i)return a;l<i?o=a+1:l>i&&(r=a-1)}return o>0?o-1:0},yc=function(t,n,r,o){for(var i=t.itemCount,a=1;r<i&&Me(t,r,n).offset<o;)r+=a,a*=2;return Gr(t,n,Math.min(r,i-1),Math.floor(r/2),o)},ir=function(t,n){var r=t.itemCount,o=n.itemMetadataMap,i=n.estimatedItemSize,a=n.lastMeasuredIndex,l=0;if(a>=r&&(a=r-1),a>=0){var u=o[a];l=u.offset+u.size}var d=r-a-1,m=d*i;return l+m},vc=mc({getItemOffset:function(t,n,r){return Me(t,n,r).offset},getItemSize:function(t,n,r){return r.itemMetadataMap[n].size},getEstimatedTotalSize:ir,getOffsetForIndexAndAlignment:function(t,n,r,o,i,a){var l=t.direction,u=t.height,d=t.layout,m=t.width,h=l==="horizontal"||d==="horizontal",y=h?m:u,b=Me(t,n,i),v=ir(t,i),c=Math.max(0,Math.min(v-y,b.offset)),f=Math.max(0,b.offset-y+b.size+a);switch(r==="smart"&&(o>=f-y&&o<=c+y?r="auto":r="center"),r){case"start":return c;case"end":return f;case"center":return Math.round(f+(c-f)/2);case"auto":default:return o>=f&&o<=c?o:o<f?f:c}},getStartIndexForOffset:function(t,n,r){return gc(t,r,n)},getStopIndexForStartIndex:function(t,n,r,o){for(var i=t.direction,a=t.height,l=t.itemCount,u=t.layout,d=t.width,m=i==="horizontal"||u==="horizontal",h=m?d:a,y=Me(t,n,o),b=r+h,v=y.offset+y.size,c=n;c<l-1&&v<b;)c++,v+=Me(t,c,o).size;return c},initInstanceProps:function(t,n){var r=t,o=r.estimatedItemSize,i={itemMetadataMap:{},estimatedItemSize:o||pc,lastMeasuredIndex:-1};return n.resetAfterIndex=function(a,l){l===void 0&&(l=!0),i.lastMeasuredIndex=Math.min(i.lastMeasuredIndex,a-1),n._getItemStyleCache(-1),l&&n.forceUpdate()},i},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(t){var n=t.itemSize;if(process.env.NODE_ENV!=="production"&&typeof n!="function")throw Error('An invalid "itemSize" prop has been specified. Value should be a function. '+('"'+(n===null?"null":typeof n)+'" was specified.'))}});function Gt(e){const{colors:t}=p.useTheme();return s.jsx(N.Stack,{sx:{cursor:"pointer"},onClick:n=>{var r;n.preventDefault(),n.stopPropagation(),(r=e.onClick)==null||r.call(e,e.option)},...e.stackProps,children:s.jsx(N.Stack,{sx:{p:1,transition:"0.2s",borderRadius:"5px",cursor:"pointer",...p.activeStyles({backgroundColor:t.primary200},e.select),":hover":{backgroundColor:"#eeeeee80",borderColor:"transparent"}},children:e.renderOption(e.option)})})}const pt=37,xc=(e,t)=>{const a=document.createElement("p");a.innerText=t,a.style.width=`${e-16-16-4}px`,document.body.appendChild(a);const l=a.offsetHeight;return document.body.removeChild(a),l>21?pt+21:pt};function bc(e){const[t,n]=E.useState(!1),[r,o]=E.useState(""),[i,a]=E.useState(""),[l,u]=E.useState(!1),{isRequired:d=!1}=e,m=E.useCallback(p._.debounce(S=>{var j;(j=e.handleChangeSearch)==null||j.call(e,S)},300),[e.handleChangeSearch]),h=()=>{n(!t)},y=()=>{n(!1),a(""),m("")};E.useEffect(()=>{o(e.value?e.getOptionLabel(e.value):"")},[e.value]),E.useEffect(()=>{t||o(e.value?e.getOptionLabel(e.value):"")},[t]),E.useEffect(()=>{u(e.searchLoading)},[e.paging.rows,e.searchLoading]);const b=e.paging.rows,{hasNextPage:v}=e,c=v?b.length+1:b.length,f=()=>e.isNextPageLoading?void 0:e.loadNextPage(i),x=S=>!v||S<b.length,w=S=>{o(S.target.value),t&&(a(S.target.value),m(S.target.value),u(!0))},_=E.useRef(null),C=E.useRef(null),g=E.useRef(null);return E.useEffect(()=>{var S,j,I,O;t?((S=C.current)==null||S.classList.add("Mui-focused"),(j=g.current)==null||j.classList.add("Mui-focused")):((I=C.current)==null||I.classList.remove("Mui-focused"),(O=g.current)==null||O.classList.remove("Mui-focused"))},[t]),s.jsx(N.ClickAwayListener,{onClickAway:y,mouseEvent:"onMouseDown",touchEvent:"onTouchEnd",children:s.jsx("div",{ref:_,style:{width:e.wrapperWidth??"auto"},children:s.jsxs(N.Stack,{sx:{position:"relative"},children:[s.jsx(N.TextField,{required:d,label:e.label,value:r,disabled:e.loading||e.disabled||e.readOnly,fullWidth:!0,error:e.error,helperText:e.helperText,onFocus:S=>{e.loading||e.disabled||e.readOnly||(S.preventDefault(),S.stopPropagation(),n(!0))},autoComplete:"off",onChange:w,placeholder:e.placeholder||"All options",sx:{"& input:not(:focus)":{"&::placeholder":{color:e.placeHolderColor||"#C5C5C5",opacity:1}}},InputLabelProps:{ref:C,shrink:!0},InputProps:{readOnly:e.readOnly,ref:g,endAdornment:s.jsx(N.IconButton,{size:"small",sx:{padding:"1px"},onClick:S=>{var j;S.preventDefault(),S.stopPropagation(),h(),(j=_.current)==null||j.focus()},disabled:e.loading||e.disabled||e.readOnly,children:e.loading?s.jsx(N.CircularProgress,{size:"16px"}):s.jsx(ac,{fontSize:"small",style:{transition:"0.3s"},className:t?"rotate":""})})}}),s.jsx(N.Fade,{in:t,timeout:0,unmountOnExit:!1,children:s.jsxs(N.Paper,{sx:{position:"absolute",top:"calc(100% + 2px)",zIndex:2,left:0,right:0,p:1},children:[!e.disabledAllOption&&s.jsx(N.Stack,{sx:{...p.activeStyles({display:"none"},!!l)},children:s.jsx(N.Stack,{children:s.jsx(Gt,{option:void 0,select:!e.value,renderOption:()=>s.jsx(N.Typography,{children:e.placeholder||"All options"}),onClick:()=>{var S,j;y(),(S=e.onChange)==null||S.call(e,void 0),(j=e.handleChangeSearch)==null||j.call(e,"")}})})}),!l&&s.jsx(p.InfiniteLoader,{isItemLoaded:x,itemCount:c,loadMoreItems:f,threshold:5,children:({onItemsRendered:S,ref:j})=>s.jsx(vc,{ref:j,onItemsRendered:S,height:pt*Math.min(e.itemsNumber||6,c),itemCount:c,itemSize:I=>{var O;return xc((O=_.current)==null?void 0:O.offsetWidth,b[I]?e.getOptionLabel(b[I]):"")},width:"100%",className:"styled-scroll",children:({index:I,style:O})=>{var z;const H=b[I];return x(I)?s.jsx(Gt,{stackProps:{style:O},option:H,renderOption:L=>{var G;return s.jsxs(N.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[s.jsx(N.Typography,{children:e.getOptionLabel(L)}),(G=e.renderOptionTooltip)==null?void 0:G.call(e,L)]})},onClick:L=>{var G;y(),(G=e.onChange)==null||G.call(e,L)},select:((z=e.isEqual)==null?void 0:z.call(e,H,e.value))??p._.isEqual(H,e.value)}):s.jsx(N.Stack,{style:O,sx:{height:pt,pl:1},justifyContent:"center",children:s.jsx(N.Typography,{children:"Loading..."})})}})}),s.jsx(N.Stack,{sx:{height:30,display:"flex",justifyContent:"center",paddingLeft:"5px",...p.activeStyles({display:"none"},!l)},children:s.jsx(N.Typography,{color:"grayText",children:"Searching..."})}),s.jsx(N.Stack,{sx:{height:30,display:"flex",justifyContent:"center",paddingLeft:"5px",...p.activeStyles({display:"none"},!!(b.length||e.loading||l))},children:s.jsx(N.Typography,{color:"grayText",children:"No options"})})]})})]})})})}function _c(e){var m;const{listProps:t}=e,[n,r]=E.useState({initLoading:!e.disabled,searchLoading:!1,hasNextPage:!1,isNextPageLoading:!1,paging:{page:1,pageSize:((m=e.listProps)==null?void 0:m.pageSize)||20,rows:[],total:0,totalPages:1}}),o=async(h,y)=>{var b,v;if(e.list)r(()=>{var x;const c=((x=h==null?void 0:h.search)==null?void 0:x.content)||"";return{hasNextPage:!1,isNextPageLoading:!1,paging:{page:1,pageSize:1e5,rows:e.list.options.filter(w=>e.list.searchOption?e.list.searchOption(w,c):p.search(w,c,e.list.searchFields)),total:e.list.options.length,totalPages:1},searchLoading:!1,initLoading:!1}});else{r(c=>({...c,isNextPageLoading:!0}));try{const c={page:1,pageSize:20,filter:{...t==null?void 0:t.filter,...h==null?void 0:h.filter},...p.lodashExports.omit(t,"filter"),...p.lodashExports.omit(h,"filter"),search:{fields:((b=t==null?void 0:t.search)==null?void 0:b.fields)??[],content:((v=h==null?void 0:h.search)==null?void 0:v.content)??""}};y&&(c.filter={},c.search&&(c.search.content=""),c.page=1);const f=await e.getList(c);r(x=>({initLoading:!1,searchLoading:!1,isNextPageLoading:!1,paging:{...f,rows:(h==null?void 0:h.page)===1?f.rows:x.paging.rows.concat(f.rows)},hasNextPage:f.page<f.totalPages}))}catch{}}},i=()=>(r(h=>({...h,initLoading:!0})),o(void 0,!0)),a=h=>(r(y=>({...y,initLoading:!0})),o(h)),l=h=>{o({page:n.paging.page+1,search:{content:h}})},u=h=>{r(y=>({...y,searchLoading:!0})),o({page:1,search:{content:h}})};E.useEffect(()=>{e.disabled||(r(h=>({...h,initLoading:!0})),o({page:1}))},[...e.dependencyList||[]]);const d=()=>{r(h=>({...h,initLoading:!h.initLoading}))};return{...e,loadNextPage:l,handleChangeSearch:u,paging:n.paging,hasNextPage:n.hasNextPage,isNextPageLoading:n.isNextPageLoading,searchLoading:n.searchLoading,loading:e.loading||n.initLoading,getList:a,reset:i,toggleLoading:d}}function wc(e){return s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[s.jsx("path",{d:"M12 3.16663H3.99998C2.80336 3.16663 1.83331 4.13668 1.83331 5.33329V12C1.83331 13.1966 2.80336 14.1666 3.99998 14.1666H12C13.1966 14.1666 14.1666 13.1966 14.1666 12V5.33329C14.1666 4.13668 13.1966 3.16663 12 3.16663Z",stroke:"#85858A"}),s.jsx("path",{d:"M4.5 1.83337V4.16671",stroke:"#85858A",strokeLinecap:"round"}),s.jsx("path",{d:"M2.5 6.16663H13.5",stroke:"#85858A",strokeLinecap:"round"}),s.jsx("path",{d:"M11.8333 1.83337V4.16671",stroke:"#85858A",strokeLinecap:"round"}),s.jsx("path",{d:"M5.5 9.33337C5.77614 9.33337 6 9.10952 6 8.83337C6 8.55723 5.77614 8.33337 5.5 8.33337C5.22386 8.33337 5 8.55723 5 8.83337C5 9.10952 5.22386 9.33337 5.5 9.33337Z",fill:"#85858A"}),s.jsx("path",{d:"M8.16669 9.33337C8.44283 9.33337 8.66669 9.10952 8.66669 8.83337C8.66669 8.55723 8.44283 8.33337 8.16669 8.33337C7.89054 8.33337 7.66669 8.55723 7.66669 8.83337C7.66669 9.10952 7.89054 9.33337 8.16669 9.33337Z",fill:"#85858A"}),s.jsx("path",{d:"M10.8333 9.33337C11.1095 9.33337 11.3333 9.10952 11.3333 8.83337C11.3333 8.55723 11.1095 8.33337 10.8333 8.33337C10.5572 8.33337 10.3333 8.55723 10.3333 8.83337C10.3333 9.10952 10.5572 9.33337 10.8333 9.33337Z",fill:"#85858A"}),s.jsx("path",{d:"M5.5 12C5.77614 12 6 11.7761 6 11.5C6 11.2239 5.77614 11 5.5 11C5.22386 11 5 11.2239 5 11.5C5 11.7761 5.22386 12 5.5 12Z",fill:"#85858A"}),s.jsx("path",{d:"M8.16669 12C8.44283 12 8.66669 11.7761 8.66669 11.5C8.66669 11.2239 8.44283 11 8.16669 11C7.89054 11 7.66669 11.2239 7.66669 11.5C7.66669 11.7761 7.89054 12 8.16669 12Z",fill:"#85858A"}),s.jsx("path",{d:"M10.8333 12C11.1095 12 11.3333 11.7761 11.3333 11.5C11.3333 11.2239 11.1095 11 10.8333 11C10.5572 11 10.3333 11.2239 10.3333 11.5C10.3333 11.7761 10.5572 12 10.8333 12Z",fill:"#85858A"})]})}const Sc="Reset date";function Cc(e){var l,u;const[t,n]=E.useState(e.value),r=!(t!=null&&t.startDate)||!(t!=null&&t.endDate)?"":Z(t==null?void 0:t.startDate).format("DD/MM/YYYY")+" ~ "+Z(t==null?void 0:t.endDate).format("DD/MM/YYYY");E.useEffect(()=>{n(e.value)},[e.value]);const o=E.useRef(null),i=E.useRef(null),a=E.useRef(null);return console.log("inputRef",o),console.log("labelRef",i),s.jsx(p.DateRangePicker,{initialSettings:{autoApply:!0,ranges:{Today:[Z(),Z()],Yesterday:[Z().subtract(1,"days"),Z().subtract(1,"days")],"Last 7 days":[Z().subtract(6,"days"),Z()],"Last 30 days":[Z().subtract(29,"days"),Z()],"This month":[Z().startOf("month"),Z().endOf("month")],"Last month":[Z().subtract(1,"month").startOf("month"),Z().subtract(1,"month").endOf("month")],"Reset date":[((l=e.dateReset)==null?void 0:l.startDate)??void 0,((u=e.dateReset)==null?void 0:u.endDate)??void 0]},alwaysShowCalendars:!0,startDate:(t==null?void 0:t.startDate)??void 0,endDate:(t==null?void 0:t.endDate)??void 0,opens:"left",maxDate:Z(),...e.initialSettings},onApply:(d,m)=>{var f,x,w;const h=m.chosenLabel===Sc,{startDate:y,endDate:b}=m,v=h?((f=e.dateReset)==null?void 0:f.startDate)??void 0:y.toDate(),c=h?((x=e.dateReset)==null?void 0:x.endDate)??void 0:b.toDate();n({startDate:v,endDate:c}),(w=e.onChange)==null||w.call(e,{startDate:v,endDate:c})},children:s.jsx(N.TextField,{inputRef:o,label:e.label??"Permit date",placeholder:"Select date range",value:r,InputLabelProps:{ref:i,shrink:!0},InputProps:{readOnly:!0,ref:a,endAdornment:s.jsx(wc,{onClick:()=>{var d;return(d=o.current)==null?void 0:d.focus()},width:24,height:24,color:"gray"})},fullWidth:!0,sx:{"& *":{cursor:"pointer"},display:"flex",justifyContent:"center",minWidth:"250px"}})})}function Kr(e){return s.jsx("svg",{...e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:"M16 2.75H8C5.10051 2.75 2.75 5.10051 2.75 8V16C2.75 18.8995 5.10051 21.25 8 21.25H16C18.8995 21.25 21.25 18.8995 21.25 16V8C21.25 5.10051 18.8995 2.75 16 2.75Z",stroke:"#85858A",strokeWidth:"1.5"})})}function Zr(e){return s.jsxs("svg",{...e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("path",{d:"M16 2.75H8C5.10051 2.75 2.75 5.10051 2.75 8V16C2.75 18.8995 5.10051 21.25 8 21.25H16C18.8995 21.25 21.25 18.8995 21.25 16V8C21.25 5.10051 18.8995 2.75 16 2.75Z",stroke:"currentColor",strokeWidth:"1.5"}),s.jsx("path",{d:"M9 12L11 14L15 10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Ec(e){return s.jsx(N.Checkbox,{sx:{"& input:disabled ~ svg":{fill:"#ddd"}},color:"primary",icon:s.jsx(Kr,{fontSize:"small"}),checkedIcon:s.jsx(Zr,{fontSize:"small"}),style:{padding:0},...e})}const Xr=e=>{"serviceWorker"in navigator&&navigator.serviceWorker.register(e.path).then(function(t){console.log("Registration successful, scope is:",t.scope),console.log("initialize service worker props ",e);const n=p.getMessagingInWindow(p.initializeApp({apiKey:e.apiKey,authDomain:e.authDomain,projectId:e.projectId,storageBucket:e.storageBucket,messagingSenderId:e.messagingSenderId,appId:e.appId,measurementId:e.measurementId}));p.getToken(n,{serviceWorkerRegistration:t,vapidKey:e.vapidKey}).then(async r=>{if(r){console.log("current token for client: ",r);try{const o="/notification-management/api/v1/notifications/registrations",i=e.baseUrl+o;await p.axiosInstance.post(i,{deviceToken:r})}catch(o){console.log(o)}}else console.log("No registration token available. Request permission to generate one.")}).catch(r=>{console.log("An error occurred while retrieving token. ",r)})}).catch(function(t){console.log("Service worker registration failed, error:",t)})},jc=e=>{const t=new BroadcastChannel("my-channel");t.onmessage=n=>{console.log("Broadcast chanel message",n),n&&e(r=>({...r,unread:{...r.unread,total:r.unread.total+1}}))}},kc=e=>new Promise(t=>{const n=p.getMessagingInWindow(p.initializeApp({apiKey:e.apiKey,authDomain:e.authDomain,projectId:e.projectId,storageBucket:e.storageBucket,messagingSenderId:e.messagingSenderId,appId:e.appId,measurementId:e.measurementId}));p.onMessage(n,r=>{console.log("payload",r),t(r)})}),Tc=["granted","denied"],Nc=e=>{const[t,n]=E.useState(!1),r=()=>{Notification.requestPermission(function(i){i==="granted"&&Xr(e),Tc.includes(i)&&n(!0)})},o=()=>{n(!0)};return s.jsx(s.Fragment,{children:t?"":s.jsx("div",{className:p.styles$1["subscription-diaglog"],children:s.jsxs("div",{className:p.styles$1["subscription-container"],children:[s.jsx("h4",{className:p.styles$1["subscription-title"],children:"Notification"}),s.jsx("p",{className:p.styles$1["subscription-text"],children:"Choice to receive notifications for the most recent updates. You have the flexibility to disable them whenever you prefer."}),s.jsxs("div",{className:p.styles$1["subscription-btn__container"],children:[s.jsx("button",{className:p.styles$1["btn-cancel"],onClick:o,children:"Not now"}),s.jsx("button",{className:p.styles$1["btn-success"],onClick:r,children:"Turn on"})]})]})})})},Jr=e=>{const[t,n]=E.useState({actorName:"",message:"",context:"",contextUrl:""});console.log(t);const{setNotiData:r}=E.useContext(p.CustomOpenList);function o(){return s.jsx("a",{className:p.styles$2["notification-massage_container"],href:t==null?void 0:t.contextUrl,style:{width:"100%",display:"block"},children:s.jsxs("div",{className:p.styles$2["notification-massage_content"],children:[s.jsx("h6",{className:p.styles$2["notification-name"],children:t==null?void 0:t.actorName}),s.jsxs("div",{className:p.styles$2["notification-message_service"],children:[s.jsxs("span",{children:[`${t==null?void 0:t.message} `," "]}),s.jsx("span",{children:t==null?void 0:t.context})]})]})})}return E.useEffect(()=>{t&&Notification.permission==="granted"&&(t.actorName||t.message||t.context||t.contextUrl)&&p.notify(s.jsx(o,{}))},[t]),E.useEffect(()=>{Notification.permission==="granted"&&Xr(e)},[Notification.permission]),E.useEffect(()=>{jc(r)},[]),kc(e).then(i=>{var a,l,u,d;console.log("aaa",i),n({actorName:(a=i==null?void 0:i.data)==null?void 0:a.actorName,message:(l=i==null?void 0:i.data)==null?void 0:l.message,context:(u=i==null?void 0:i.data)==null?void 0:u.context,contextUrl:(d=i==null?void 0:i.data)==null?void 0:d.contextUrl}),r(m=>{var h;return{...m,unread:{...m.unread,total:((h=m.unread)==null?void 0:h.total)+1}}})}).catch(i=>console.log("failed: ",i)),s.jsx("div",{children:"Notification"in window&&Notification.permission==="default"?s.jsx(Nc,{...e}):""})},Oc=(e,t)=>E.cloneElement(t,{},e),Ic=({children:e,providers:t})=>s.jsx(s.Fragment,{children:t.reduceRight(Oc,e)}),Pc=({rootPath:e})=>{const{colors:t}=p.useTheme();return s.jsxs(N.Stack,{py:2,gap:2,style:{alignItems:"center"},children:[s.jsx("img",{width:120,height:120,src:"https://ukpcsaprod.blob.core.windows.net/lib/images/page-not-found.png",alt:""}),s.jsxs(N.Stack,{gap:1,children:[s.jsx(N.Typography,{variant:"h4",textAlign:"center",children:"Page Not Found"}),s.jsxs(N.Typography,{textAlign:"center",color:t.grey600,children:["We’re sorry. The page you requested could no be found. ",s.jsx("br",{}),"Please go back to the home page"]}),s.jsx(gt.Link,{to:e,style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center"},children:s.jsx(N.Button,{variant:"primary",style:{maxWidth:"200px",width:"100%"},children:"Go to homepage"})})]})]})};exports.GlobalMenu=p.GlobalMenu;exports.IconComponent=p.IconComponent;exports.notify=p.notify;exports.pushError=p.pushError;exports.pushSuccess=p.pushSuccess;exports.pushWarning=p.pushWarning;exports.AutocompleteOption=Gt;exports.BaseCheckbox=Ec;exports.CheckedIcon=Zr;exports.FavoriteMenu=Lo;exports.HomePage=Vo;exports.MultiProvider=Ic;exports.NoData=So;exports.NotFoundPage=Oo;exports.NotificationBase=Jr;exports.PageNotFound=Pc;exports.PopUpBase=To;exports.StyledAutocomplete=bc;exports.StyledDateRangePicker=Cc;exports.ToastConfig=_o;exports.ToastConfigNotification=wo;exports.TopBar=bo;exports.UnauthorizedPage=Ho;exports.UncheckedIcon=Kr;exports.usePopUp=No;exports.useStyledAutocomplete=_c;
|