@ukpc-lib/react 0.3.31 → 0.3.32
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/index.cjs +1 -1
- package/dist/components/index.js +2 -2
- package/dist/{index.module-28c25f6e.js → index.module-6577468c.js} +5 -5
- package/dist/{index.module-47d7f83f.cjs → index.module-a3ebf250.cjs} +1 -1
- package/dist/share/index.cjs +1 -1
- package/dist/share/index.js +1 -1
- package/package.json +1 -1
- package/web-components-bundle/global-menu/index.cjs +1 -1
- package/web-components-bundle/global-menu/index.js +1 -1
- package/web-components-bundle/global-topbar/index.cjs +1 -1
- package/web-components-bundle/global-topbar/index.js +2 -2
- package/web-components-bundle/has-permission/index.cjs +1 -1
- package/web-components-bundle/has-permission/index.js +2 -2
- package/web-components-bundle/{index-d1a554c4.cjs → index-33b516ea.cjs} +1 -1
- package/web-components-bundle/{index-dbabf9a0.cjs → index-70d1d0a6.cjs} +1 -1
- package/web-components-bundle/{index-6a1292b7.js → index-8ffb34b8.js} +1 -1
- package/web-components-bundle/{index-99df7495.js → index-9b0d9ee5.js} +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),j=require("react"),p=require("../index.module-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),j=require("react"),p=require("../index.module-a3ebf250.cjs"),K=require("moment"),Gt=require("axios"),N=require("@mui/material");require("@r2wc/react-to-web-component");const Zn=require("react-router-dom");function Xn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const L=Xn(j),Jn=e=>{var n,o;const{tabs:t}=e,r=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;
|
package/dist/components/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as T, Fragment as qe, jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import * as L from "react";
|
|
3
3
|
import Eo, { useState as G, useContext as xe, useEffect as Q, useRef as be, useCallback as bt, forwardRef as Co, createElement as er, PureComponent as Oo } from "react";
|
|
4
|
-
import { c as rt, Q as kn, C as Te, p as At, u as hr, S as To, a as No, L as $o, b as Pr, d as ko, e as mt, f as Io, s as pt, _ as z, g as _e, P as N, h as he, i as Mo, o as Ao, j as Po, k as Ro, l as Rr, m as In, n as xt, q as Dr, I as Do, r as zo, t as zr, D as Fo, v as Mn, w as An, x as Lo, y as jo, z as Oe, A as Vo, B as gt } from "../index.module-
|
|
5
|
-
import { G as Cc, E as Oc, F as Tc } from "../index.module-
|
|
4
|
+
import { c as rt, Q as kn, C as Te, p as At, u as hr, S as To, a as No, L as $o, b as Pr, d as ko, e as mt, f as Io, s as pt, _ as z, g as _e, P as N, h as he, i as Mo, o as Ao, j as Po, k as Ro, l as Rr, m as In, n as xt, q as Dr, I as Do, r as zo, t as zr, D as Fo, v as Mn, w as An, x as Lo, y as jo, z as Oe, A as Vo, B as gt } from "../index.module-6577468c.js";
|
|
5
|
+
import { G as Cc, E as Oc, F as Tc } from "../index.module-6577468c.js";
|
|
6
6
|
import Z from "moment";
|
|
7
7
|
import mr from "axios";
|
|
8
8
|
import { Stack as te, Dialog as Ho, DialogTitle as Bo, Typography as ge, DialogContent as Wo, DialogActions as Uo, Button as ir, ClickAwayListener as qo, TextField as Pn, IconButton as Yo, CircularProgress as Go, Fade as Ko, Paper as Zo, Checkbox as Xo } from "@mui/material";
|
|
@@ -20613,8 +20613,10 @@ function MD(t) {
|
|
|
20613
20613
|
const { renderChildren: e, parentRef: n, onlyChild: i } = t, [r, s] = Wr({ top: 0, left: 0 }), u = Oi(null), [g, p] = Wr("auto");
|
|
20614
20614
|
return Dc(() => {
|
|
20615
20615
|
if (n.current && u.current) {
|
|
20616
|
-
const y = n.current.getBoundingClientRect(), T = u.current.getBoundingClientRect()
|
|
20617
|
-
|
|
20616
|
+
const y = n.current.getBoundingClientRect(), T = u.current.getBoundingClientRect();
|
|
20617
|
+
let x = y.top;
|
|
20618
|
+
const O = y.left + y.width, B = T.height + (window.innerHeight - y.top) > window.innerHeight;
|
|
20619
|
+
B && (console.log("overtop"), p(window.innerHeight - y.top - 50)), y.top + T.height > window.innerHeight && !B && (x = y.top - T.height + y.height), s({
|
|
20618
20620
|
top: x,
|
|
20619
20621
|
left: O
|
|
20620
20622
|
});
|
|
@@ -20688,9 +20690,7 @@ function FD(t, e) {
|
|
|
20688
20690
|
}
|
|
20689
20691
|
function sw({ item: t, level: e = 0, ...n }) {
|
|
20690
20692
|
var ht, et, Qe;
|
|
20691
|
-
const { isActive: i, isCollapsed: r, expanded: s, toggleExpand: u } = n, g = `level-${e}`, p = r ? "collapsed" : "expanded", y = i(t.id) ? "active" : "", T = (rt, me = g) => `${rt} ${me} ${p} ${y}`, x = !!((ht = t.children) != null && ht.length), [O, B] = Wr(!1), $ = Oi(), Y = window.location.origin, z = t.path && t.path.includes("http") ? new URL(t.path) : { origin: "", pathname: "" }, L = window.location.pathname.split("/")[1], ne = z.pathname.split("/")[1], te = n.ssr || !Y.includes("local") && Y !== z.origin || ne !== L, he = x || e === 0 ? "div" : te ? "a" : LT, ie = t.path || "#", xe = e + 1, b = x && !(r && xe >= 2 && !O), Ee = r || e === 0 ? void 0 : `${e}rem
|
|
20692
|
-
console.log("hasDropdown:", b);
|
|
20693
|
-
const ve = () => {
|
|
20693
|
+
const { isActive: i, isCollapsed: r, expanded: s, toggleExpand: u } = n, g = `level-${e}`, p = r ? "collapsed" : "expanded", y = i(t.id) ? "active" : "", T = (rt, me = g) => `${rt} ${me} ${p} ${y}`, x = !!((ht = t.children) != null && ht.length), [O, B] = Wr(!1), $ = Oi(), Y = window.location.origin, z = t.path && t.path.includes("http") ? new URL(t.path) : { origin: "", pathname: "" }, L = window.location.pathname.split("/")[1], ne = z.pathname.split("/")[1], te = n.ssr || !Y.includes("local") && Y !== z.origin || ne !== L, he = x || e === 0 ? "div" : te ? "a" : LT, ie = t.path || "#", xe = e + 1, b = x && !(r && xe >= 2 && !O), Ee = r || e === 0 ? void 0 : `${e}rem`, ve = () => {
|
|
20694
20694
|
B(!0);
|
|
20695
20695
|
}, tt = () => {
|
|
20696
20696
|
B(!1);
|
|
@@ -131,7 +131,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
131
131
|
* content-type
|
|
132
132
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
133
133
|
* MIT Licensed
|
|
134
|
-
*/var ly=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,mD=/\\([\u000b\u0020-\u00ff])/g,vD=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,yD=bD;function bD(t){if(!t)throw new TypeError("argument string is required");var e=typeof t=="object"?wD(t):t;if(typeof e!="string")throw new TypeError("argument string is required to be a string");var n=e.indexOf(";"),i=n!==-1?e.slice(0,n).trim():e.trim();if(!vD.test(i))throw new TypeError("invalid media type");var r=new xD(i.toLowerCase());if(n!==-1){var s,u,g;for(ly.lastIndex=n;u=ly.exec(e);){if(u.index!==n)throw new TypeError("invalid parameter format");n+=u[0].length,s=u[1].toLowerCase(),g=u[2],g.charCodeAt(0)===34&&(g=g.slice(1,-1),g.indexOf("\\")!==-1&&(g=g.replace(mD,"$1"))),r.parameters[s]=g}if(n!==e.length)throw new TypeError("invalid parameter format")}return r}function wD(t){var e;if(typeof t.getHeader=="function"?e=t.getHeader("content-type"):typeof t.headers=="object"&&(e=t.headers&&t.headers["content-type"]),typeof e!="string")throw new TypeError("content-type header is missing from object");return e}function xD(t){this.parameters=Object.create(null),this.type=t}var vc=new Map,nw=function(e){return e.cloneNode(!0)},uy=function(){return window.location.protocol==="file:"},rw=function(e,n,i){var r=new XMLHttpRequest;r.onreadystatechange=function(){try{if(!/\.svg/i.test(e)&&r.readyState===2){var s=r.getResponseHeader("Content-Type");if(!s)throw new Error("Content type not found");var u=yD(s).type;if(!(u==="image/svg+xml"||u==="text/plain"))throw new Error("Invalid content type: ".concat(u))}if(r.readyState===4){if(r.status===404||r.responseXML===null)throw new Error(uy()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+e);if(r.status===200||uy()&&r.status===0)i(null,r);else throw new Error("There was a problem injecting the SVG: "+r.status+" "+r.statusText)}}catch(g){if(r.abort(),g instanceof Error)i(g,r);else throw g}},r.open("GET",e),r.withCredentials=n,r.overrideMimeType&&r.overrideMimeType("text/xml"),r.send()},jl={},cy=function(e,n){jl[e]=jl[e]||[],jl[e].push(n)},SD=function(e){for(var n=function(u,g){setTimeout(function(){if(Array.isArray(jl[e])){var p=vc.get(e),y=jl[e][u];p instanceof SVGSVGElement&&y(null,nw(p)),p instanceof Error&&y(p),u===jl[e].length-1&&delete jl[e]}},0)},i=0,r=jl[e].length;i<r;i++)n(i)},CD=function(e,n,i){if(vc.has(e)){var r=vc.get(e);if(r===void 0){cy(e,i);return}if(r instanceof SVGSVGElement){i(null,nw(r));return}}vc.set(e,void 0),cy(e,i),rw(e,n,function(s,u){var g;s?vc.set(e,s):((g=u.responseXML)===null||g===void 0?void 0:g.documentElement)instanceof SVGSVGElement&&vc.set(e,u.responseXML.documentElement),SD(e)})},TD=function(e,n,i){rw(e,n,function(r,s){var u;r?i(r):((u=s.responseXML)===null||u===void 0?void 0:u.documentElement)instanceof SVGSVGElement&&i(null,s.responseXML.documentElement)})},ED=0,kD=function(){return++ED},us=[],fy={},_D="http://www.w3.org/2000/svg",Eh="http://www.w3.org/1999/xlink",dy=function(e,n,i,r,s,u,g){var p=e.getAttribute("data-src")||e.getAttribute("src");if(!p){g(new Error("Invalid data-src or src attribute"));return}if(us.indexOf(e)!==-1){us.splice(us.indexOf(e),1),e=null;return}us.push(e),e.setAttribute("src","");var y=r?CD:TD;y(p,s,function(T,x){if(!x){us.splice(us.indexOf(e),1),e=null,g(T);return}var O=e.getAttribute("id");O&&x.setAttribute("id",O);var j=e.getAttribute("title");j&&x.setAttribute("title",j);var $=e.getAttribute("width");$&&x.setAttribute("width",$);var Y=e.getAttribute("height");Y&&x.setAttribute("height",Y);var z=Array.from(new Set(Th(Th(Th([],(x.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();x.setAttribute("class",z);var L=e.getAttribute("style");L&&x.setAttribute("style",L),x.setAttribute("data-src",p);var ne=[].filter.call(e.attributes,function(qe){return/^data-\w[\w-]*$/.test(qe.name)});if(Array.prototype.forEach.call(ne,function(qe){qe.name&&qe.value&&x.setAttribute(qe.name,qe.value)}),i){var te={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]},he,ie,xe,b,ke;Object.keys(te).forEach(function(qe){he=qe,xe=te[qe],ie=x.querySelectorAll(he+"[id]");for(var st=function(Ze,Qe){b=ie[Ze].id,ke=b+"-"+kD();var Je;Array.prototype.forEach.call(xe,function(Bt){Je=x.querySelectorAll("["+Bt+'*="'+b+'"]');for(var Ht=0,zn=Je.length;Ht<zn;Ht++){var hr=Je[Ht].getAttribute(Bt);hr&&!hr.match(new RegExp('url\\("?#'+b+'"?\\)'))||Je[Ht].setAttribute(Bt,"url(#"+ke+")")}});for(var Ke=x.querySelectorAll("[*|href]"),ht=[],wt=0,xt=Ke.length;wt<xt;wt++){var pt=Ke[wt].getAttributeNS(Eh,"href");pt&&pt.toString()==="#"+ie[Ze].id&&ht.push(Ke[wt])}for(var Tt=0,Xe=ht.length;Tt<Xe;Tt++)ht[Tt].setAttributeNS(Eh,"href","#"+ke);ie[Ze].id=ke},_e=0,Ae=ie.length;_e<Ae;_e++)st(_e)})}x.removeAttribute("xmlns:a");for(var ve=x.querySelectorAll("script"),nt=[],gt,tt,et=0,it=ve.length;et<it;et++)tt=ve[et].getAttribute("type"),(!tt||tt==="application/ecmascript"||tt==="application/javascript"||tt==="text/javascript")&&(gt=ve[et].innerText||ve[et].textContent,gt&&nt.push(gt),x.removeChild(ve[et]));if(nt.length>0&&(n==="always"||n==="once"&&!fy[p])){for(var me=0,Me=nt.length;me<Me;me++)new Function(nt[me])(window);fy[p]=!0}var ze=x.querySelectorAll("style");if(Array.prototype.forEach.call(ze,function(qe){qe.textContent+=""}),x.setAttribute("xmlns",_D),x.setAttribute("xmlns:xlink",Eh),u(x),!e.parentNode){us.splice(us.indexOf(e),1),e=null,g(new Error("Parent node is null"));return}e.parentNode.replaceChild(x,e),us.splice(us.indexOf(e),1),e=null,g(null,x)})},RD=function(e,n){var i=n===void 0?{}:n,r=i.afterAll,s=r===void 0?function(){}:r,u=i.afterEach,g=u===void 0?function(){}:u,p=i.beforeEach,y=p===void 0?function(){}:p,T=i.cacheRequests,x=T===void 0?!0:T,O=i.evalScripts,j=O===void 0?"never":O,$=i.httpRequestWithCredentials,Y=$===void 0?!1:$,z=i.renumerateIRIElements,L=z===void 0?!0:z;if(e&&"length"in e)for(var ne=0,te=0,he=e.length;te<he;te++)dy(e[te],j,L,x,Y,y,function(ie,xe){g(ie,xe),e&&"length"in e&&e.length===++ne&&s(ne)});else e?dy(e,j,L,x,Y,y,function(ie,xe){g(ie,xe),s(1),e=null}):s(0)},PD=function(e){var n=(e==null?void 0:e.ownerDocument)||document;return n.defaultView||window},AD=function(e,n){for(var i in e)if(!(i in n))return!0;for(var r in n)if(e[r]!==n[r])return!0;return!1},OD=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],Hf="http://www.w3.org/2000/svg",hy="http://www.w3.org/1999/xlink",Wp=function(t){tw(e,t);function e(){for(var i,r=arguments.length,s=new Array(r),u=0;u<r;u++)s[u]=arguments[u];return i=t.call.apply(t,[this].concat(s))||this,i.initialState={hasError:!1,isLoading:!0},i.state=i.initialState,i._isMounted=!1,i.reactWrapper=void 0,i.nonReactWrapper=void 0,i.refCallback=function(g){i.reactWrapper=g},i}var n=e.prototype;return n.renderSVG=function(){var r=this;if(this.reactWrapper instanceof PD(this.reactWrapper).Node){var s=this.props,u=s.desc,g=s.evalScripts,p=s.httpRequestWithCredentials,y=s.renumerateIRIElements,T=s.src,x=s.title,O=s.useRequestCache,j=this.props.onError,$=this.props.beforeInjection,Y=this.props.afterInjection,z=this.props.wrapper,L,ne;z==="svg"?(L=document.createElementNS(Hf,z),L.setAttribute("xmlns",Hf),L.setAttribute("xmlns:xlink",hy),ne=document.createElementNS(Hf,z)):(L=document.createElement(z),ne=document.createElement(z)),L.appendChild(ne),ne.dataset.src=T,this.nonReactWrapper=this.reactWrapper.appendChild(L);var te=function(b){if(r.removeSVG(),!r._isMounted){j(b);return}r.setState(function(){return{hasError:!0,isLoading:!1}},function(){j(b)})},he=function(b,ke){if(b){te(b);return}r._isMounted&&r.setState(function(){return{isLoading:!1}},function(){try{Y(ke)}catch(ve){te(ve)}})},ie=function(b){if(b.setAttribute("role","img"),u){var ke=b.querySelector(":scope > desc");ke&&b.removeChild(ke);var ve=document.createElement("desc");ve.innerHTML=u,b.prepend(ve)}if(x){var nt=b.querySelector(":scope > title");nt&&b.removeChild(nt);var gt=document.createElement("title");gt.innerHTML=x,b.prepend(gt)}try{$(b)}catch(tt){te(tt)}};RD(ne,{afterEach:he,beforeEach:ie,cacheRequests:O,evalScripts:g,httpRequestWithCredentials:p,renumerateIRIElements:y})}},n.removeSVG=function(){var r;(r=this.nonReactWrapper)!=null&&r.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},n.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},n.componentDidUpdate=function(r){var s=this;AD(kc({},r),this.props)&&this.setState(function(){return s.initialState},function(){s.removeSVG(),s.renderSVG()})},n.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},n.render=function(){var r=this.props;r.afterInjection,r.beforeInjection,r.desc,r.evalScripts;var s=r.fallback;r.httpRequestWithCredentials;var u=r.loading;r.renumerateIRIElements,r.src,r.title,r.useRequestCache;var g=r.wrapper,p=vp(r,OD),y=g;return kn.createElement(y,kc({},p,{ref:this.refCallback},g==="svg"?{xmlns:Hf,xmlnsXlink:hy}:{}),this.state.isLoading&&u&&kn.createElement(u,null),this.state.hasError&&s&&kn.createElement(s,null))},e}(kn.Component);Wp.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};Wp.propTypes={afterInjection:xr.func,beforeInjection:xr.func,desc:xr.string,evalScripts:xr.oneOf(["always","once","never"]),fallback:xr.oneOfType([xr.func,xr.object,xr.string]),httpRequestWithCredentials:xr.bool,loading:xr.oneOfType([xr.func,xr.object,xr.string]),onError:xr.func,renumerateIRIElements:xr.bool,src:xr.string.isRequired,title:xr.string,useRequestCache:xr.bool,wrapper:xr.oneOf(["div","span","svg"])};function DD(t){return ct.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...t,children:ct.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 ID(t){const{renderChildren:e,parentRef:n,onlyChild:i}=t,[r,s]=Re.useState({top:0,left:0}),u=Re.useRef(null),[g,p]=Re.useState("auto");return Re.useLayoutEffect(()=>{if(n.current&&u.current){const y=n.current.getBoundingClientRect(),T=u.current.getBoundingClientRect(),x=y.top,O=y.left+y.width;y.top+T.height>window.innerHeight&&p(window.innerHeight-y.top-50),s({top:x,left:O})}},[n,u]),i?e({maxHeight:g}):Ly.createPortal(ct.jsx("div",{ref:u,style:{position:"fixed",top:r.top,left:r.left,zIndex:1200},children:e({maxHeight:g})}),n.current)}function MD(t){const{children:e,title:n,hasTooltip:i}=t,r=Re.useRef(),[s,u]=Re.useState(!1),[g,p]=Re.useState({top:0,left:0});return ct.jsxs("div",{className:"tooltip-item__wrapper",onMouseOver:()=>{if(u(!0),r.current){const y=r.current.getBoundingClientRect();p({top:y.top-20,left:y.left})}},onMouseLeave:()=>u(!1),ref:r,children:[ct.jsx("div",{children:e}),s&&i&&ct.jsx("div",{className:"tooltip-item__content",style:{position:"fixed",background:"#85858A",borderRadius:"4px",color:"#fff",padding:"4px 8px",top:g.top,left:g.left,zIndex:1400,fontSize:"10px",transition:"all 0.2s ease-in-out",animation:"fadeIn 0.2s ease-in-out",pointerEvents:"none"},children:n})]})}function iw(t,e){return e?t:void 0}function ow({item:t,level:e=0,...n}){var gt,tt,et;const{isActive:i,isCollapsed:r,expanded:s,toggleExpand:u}=n,g=`level-${e}`,p=r?"collapsed":"expanded",y=i(t.id)?"active":"",T=(it,me=g)=>`${it} ${me} ${p} ${y}`,x=!!((gt=t.children)!=null&>.length),[O,j]=Re.useState(!1),$=Re.useRef(),Y=window.location.origin,z=t.path&&t.path.includes("http")?new URL(t.path):{origin:"",pathname:""},L=window.location.pathname.split("/")[1],ne=z.pathname.split("/")[1],te=n.ssr||!Y.includes("local")&&Y!==z.origin||ne!==L,he=x||e===0?"div":te?"a":My.Link,ie=t.path||"#",xe=e+1,b=x&&!(r&&xe>=2&&!O),ke=r||e===0?void 0:`${e}rem`;console.log("hasDropdown:",b);const ve=()=>{j(!0)},nt=()=>{j(!1)};return ct.jsxs("div",{ref:$,className:T("menu-item__wrapper"),onMouseOver:ve,onMouseOut:nt,children:[ct.jsx(MD,{hasTooltip:r&&e===1,children:ct.jsxs(he,{to:ie,href:ie,className:T("menu-item__link"),style:{paddingLeft:ke,transition:"all 0.3s",color:i(t.id)?((tt=n.brandColors)==null?void 0:tt.primary400)||vo.primary400:void 0,backgroundColor:i(t.id)&&e===1?(et=n.brandColors)==null?void 0:et.primary200:void 0},onClick:it=>{x&&(it.preventDefault(),r||u(t.id))},children:[e!==0&&ct.jsx(LD,{cls:T,item:t}),ct.jsx("span",{className:T("menu-item__label"),children:t.name}),x&&ct.jsx("div",{className:T("menu-item__icon-arrow__wrapper"),children:ct.jsx(DD,{className:T(`menu-item__icon-arrow__icon ${s(t.id)?"open":"close"}`)})})]}),title:t.name}),b&&ct.jsx(ID,{parentRef:$,onlyChild:!r||r&&xe<2,renderChildren:({maxHeight:it})=>{var me;return ct.jsx(pD.div,{className:T(`menu-item__dropdown ${s(t.id)?"menu-item__dropdown--open":"menu-item__dropdown--close"}`,`level-${xe}`),initial:{height:r||s(t.id)?"auto":0},animate:{height:r||s(t.id)?"auto":0},transition:{duration:.25},style:iw({maxHeight:it,overflowY:"auto",paddingRight:3},it!=="auto"&&!!xe),children:(me=t.children)==null?void 0:me.map(Me=>Re.createElement(ow,{...n,key:Me.id,item:Me,level:xe}))})}})]})}function LD({item:t,cls:e}){var u,g;const[n,i]=Re.useState(!t.icon),r=()=>{i(!0)},s=(u=t.icon)==null?void 0:u.endsWith(".svg");return ct.jsx("div",{className:e("menu-item__icon"),children:n?ct.jsx("div",{style:{width:24,height:24,backgroundColor:"#dadada",borderRadius:"5px",display:"flex",justifyContent:"center",alignItems:"center"},children:(g=t.name.trim().at(0))==null?void 0:g.toUpperCase()}):s?ct.jsx(Wp,{src:t.icon,beforeInjection:p=>{p.setAttribute("style","margin: 0 auto;"),p.querySelectorAll("path").forEach(T=>{T.hasAttribute("fill")&&T.setAttribute("fill","currentColor"),T.hasAttribute("stroke")&&T.setAttribute("stroke","currentColor")})}}):ct.jsx("img",{src:t.icon||"/",alt:" ",style:{height:24,maxHeight:24},onError:r})})}function FD(){return ct.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",children:ct.jsx("path",{d:"M21 18v2H3v-2h18zM6.596 3.903L8.01 5.318 4.828 8.5 8.01 11.68l-1.414 1.415L2 8.5l4.596-4.597zM21 11v2h-9v-2h9zm0-7v2h-9V4h9z"})})}function jD(){return ct.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",children:ct.jsx("path",{d:"M3 4h18v2H3V4zm0 7h18v2H3v-2zm0 7h18v2H3v-2z"})})}function BD(t){return ct.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"20",fill:"none",viewBox:"0 0 18 20",...t,children:ct.jsx("path",{fill:"#E01B00",fillRule:"evenodd",d:"M.179 2.875A2.375 2.375 0 012.554.5h3.393a1.018 1.018 0 010 2.036H2.554a.34.34 0 00-.34.339v14.25c0 .187.152.34.34.34h3.393a1.018 1.018 0 110 2.035H2.554a2.375 2.375 0 01-2.375-2.375V2.875zm14.167 6.107h-7.72a1.018 1.018 0 000 2.036h7.72l-2.673 2.673a1.018 1.018 0 101.44 1.44l4.41-4.411a1.018 1.018 0 000-1.44l-4.41-4.41a1.018 1.018 0 10-1.44 1.439l2.673 2.673z",clipRule:"evenodd"})})}const ND=`.wrap-section{padding:0 8px;transition:all .3s}.wrap-section.collapsed{padding:0 4px}.side-bar{display:flex;flex-direction:column;max-width:18rem;height:calc(100vh - 64px);border-right:1px solid #ddd;background-color:#fafafa;transition:all .3s}.side-bar.expanded{width:17rem}.side-bar.collapsed{width:64px}.side-bar__wrap-btn-logout,.side-bar__btn-logout{margin:40px 0}.side-bar__logout-btn__text{margin-left:12px;font-size:.875rem;opacity:1}.side-bar__logout-btn__text.collapsed{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}.side-bar__wrapper-toggle-btn.collapsed{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}.side-bar__logout-btn:hover{background-color:#919eab14}.side-bar__icon-logout{flex-shrink:0}.menu-item__wrapper{display:flex;flex-direction:column;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.collapsed.level-1{padding-left:calc(.5rem + 7.665px)!important}.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.level-0{height:37px}.menu-item__link.menu-item__link.collapsed.level-0{padding:0;height:0;transition:all .15s}.menu-item__icon{width:1.5rem;height:1.5rem;flex-shrink:0;display:grid;place-items:center}.menu-item__icon.collapsed.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.collapsed{text-overflow:unset}.menu-item__label.active{color:inherit}.menu-item__label.collapsed{margin-left:8px;font-size:.75rem;line-height:1rem}.menu-item__label.collapsed.level-0,.menu-item__label.collapsed.level-1{font-size:.875rem;opacity:0;transition-delay:.15s}.menu-item__label.level-0{color:#85858a;margin-left:0}.menu-item__icon-arrow__wrapper{display:grid;place-items:center;position:absolute;top:50%;transform:translateY(-50%);right:0}.menu-item__icon-arrow__wrapper.expanded{right:4px}.menu-item__icon-arrow__wrapper.level-0.collapsed{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.expanded.open{transform:rotate(0)!important}.menu-item__dropdown.collapsed{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::-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.expanded.menu-item__dropdown--close{margin-top:0;transition:margin-top .3s}.menu-item__dropdown:first-of-type{margin-top:0}.menu-item__dropdown>*:first-child{margin-top:0}.menu-item__dropdown.collapsed .menu-item__link{height:40px}.menu-item__dropdown.collapsed .menu-item__link.level-1{height:48px}.menu-item__dropdown.collapsed.level-1{width:auto;max-width:unset;box-shadow:none;border:none;padding:0;background-color:unset}.menu-item__dropdown.expanded{overflow:hidden}.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.collapsed .simplebar-track.simplebar-vertical{display:none}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}
|
|
134
|
+
*/var ly=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,mD=/\\([\u000b\u0020-\u00ff])/g,vD=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,yD=bD;function bD(t){if(!t)throw new TypeError("argument string is required");var e=typeof t=="object"?wD(t):t;if(typeof e!="string")throw new TypeError("argument string is required to be a string");var n=e.indexOf(";"),i=n!==-1?e.slice(0,n).trim():e.trim();if(!vD.test(i))throw new TypeError("invalid media type");var r=new xD(i.toLowerCase());if(n!==-1){var s,u,g;for(ly.lastIndex=n;u=ly.exec(e);){if(u.index!==n)throw new TypeError("invalid parameter format");n+=u[0].length,s=u[1].toLowerCase(),g=u[2],g.charCodeAt(0)===34&&(g=g.slice(1,-1),g.indexOf("\\")!==-1&&(g=g.replace(mD,"$1"))),r.parameters[s]=g}if(n!==e.length)throw new TypeError("invalid parameter format")}return r}function wD(t){var e;if(typeof t.getHeader=="function"?e=t.getHeader("content-type"):typeof t.headers=="object"&&(e=t.headers&&t.headers["content-type"]),typeof e!="string")throw new TypeError("content-type header is missing from object");return e}function xD(t){this.parameters=Object.create(null),this.type=t}var vc=new Map,nw=function(e){return e.cloneNode(!0)},uy=function(){return window.location.protocol==="file:"},rw=function(e,n,i){var r=new XMLHttpRequest;r.onreadystatechange=function(){try{if(!/\.svg/i.test(e)&&r.readyState===2){var s=r.getResponseHeader("Content-Type");if(!s)throw new Error("Content type not found");var u=yD(s).type;if(!(u==="image/svg+xml"||u==="text/plain"))throw new Error("Invalid content type: ".concat(u))}if(r.readyState===4){if(r.status===404||r.responseXML===null)throw new Error(uy()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+e);if(r.status===200||uy()&&r.status===0)i(null,r);else throw new Error("There was a problem injecting the SVG: "+r.status+" "+r.statusText)}}catch(g){if(r.abort(),g instanceof Error)i(g,r);else throw g}},r.open("GET",e),r.withCredentials=n,r.overrideMimeType&&r.overrideMimeType("text/xml"),r.send()},jl={},cy=function(e,n){jl[e]=jl[e]||[],jl[e].push(n)},SD=function(e){for(var n=function(u,g){setTimeout(function(){if(Array.isArray(jl[e])){var p=vc.get(e),y=jl[e][u];p instanceof SVGSVGElement&&y(null,nw(p)),p instanceof Error&&y(p),u===jl[e].length-1&&delete jl[e]}},0)},i=0,r=jl[e].length;i<r;i++)n(i)},CD=function(e,n,i){if(vc.has(e)){var r=vc.get(e);if(r===void 0){cy(e,i);return}if(r instanceof SVGSVGElement){i(null,nw(r));return}}vc.set(e,void 0),cy(e,i),rw(e,n,function(s,u){var g;s?vc.set(e,s):((g=u.responseXML)===null||g===void 0?void 0:g.documentElement)instanceof SVGSVGElement&&vc.set(e,u.responseXML.documentElement),SD(e)})},TD=function(e,n,i){rw(e,n,function(r,s){var u;r?i(r):((u=s.responseXML)===null||u===void 0?void 0:u.documentElement)instanceof SVGSVGElement&&i(null,s.responseXML.documentElement)})},ED=0,kD=function(){return++ED},us=[],fy={},_D="http://www.w3.org/2000/svg",Eh="http://www.w3.org/1999/xlink",dy=function(e,n,i,r,s,u,g){var p=e.getAttribute("data-src")||e.getAttribute("src");if(!p){g(new Error("Invalid data-src or src attribute"));return}if(us.indexOf(e)!==-1){us.splice(us.indexOf(e),1),e=null;return}us.push(e),e.setAttribute("src","");var y=r?CD:TD;y(p,s,function(T,x){if(!x){us.splice(us.indexOf(e),1),e=null,g(T);return}var O=e.getAttribute("id");O&&x.setAttribute("id",O);var j=e.getAttribute("title");j&&x.setAttribute("title",j);var $=e.getAttribute("width");$&&x.setAttribute("width",$);var Y=e.getAttribute("height");Y&&x.setAttribute("height",Y);var z=Array.from(new Set(Th(Th(Th([],(x.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();x.setAttribute("class",z);var L=e.getAttribute("style");L&&x.setAttribute("style",L),x.setAttribute("data-src",p);var ne=[].filter.call(e.attributes,function(qe){return/^data-\w[\w-]*$/.test(qe.name)});if(Array.prototype.forEach.call(ne,function(qe){qe.name&&qe.value&&x.setAttribute(qe.name,qe.value)}),i){var te={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]},he,ie,xe,b,ke;Object.keys(te).forEach(function(qe){he=qe,xe=te[qe],ie=x.querySelectorAll(he+"[id]");for(var st=function(Ze,Qe){b=ie[Ze].id,ke=b+"-"+kD();var Je;Array.prototype.forEach.call(xe,function(Bt){Je=x.querySelectorAll("["+Bt+'*="'+b+'"]');for(var Ht=0,zn=Je.length;Ht<zn;Ht++){var hr=Je[Ht].getAttribute(Bt);hr&&!hr.match(new RegExp('url\\("?#'+b+'"?\\)'))||Je[Ht].setAttribute(Bt,"url(#"+ke+")")}});for(var Ke=x.querySelectorAll("[*|href]"),ht=[],wt=0,xt=Ke.length;wt<xt;wt++){var pt=Ke[wt].getAttributeNS(Eh,"href");pt&&pt.toString()==="#"+ie[Ze].id&&ht.push(Ke[wt])}for(var Tt=0,Xe=ht.length;Tt<Xe;Tt++)ht[Tt].setAttributeNS(Eh,"href","#"+ke);ie[Ze].id=ke},_e=0,Ae=ie.length;_e<Ae;_e++)st(_e)})}x.removeAttribute("xmlns:a");for(var ve=x.querySelectorAll("script"),nt=[],gt,tt,et=0,it=ve.length;et<it;et++)tt=ve[et].getAttribute("type"),(!tt||tt==="application/ecmascript"||tt==="application/javascript"||tt==="text/javascript")&&(gt=ve[et].innerText||ve[et].textContent,gt&&nt.push(gt),x.removeChild(ve[et]));if(nt.length>0&&(n==="always"||n==="once"&&!fy[p])){for(var me=0,Me=nt.length;me<Me;me++)new Function(nt[me])(window);fy[p]=!0}var ze=x.querySelectorAll("style");if(Array.prototype.forEach.call(ze,function(qe){qe.textContent+=""}),x.setAttribute("xmlns",_D),x.setAttribute("xmlns:xlink",Eh),u(x),!e.parentNode){us.splice(us.indexOf(e),1),e=null,g(new Error("Parent node is null"));return}e.parentNode.replaceChild(x,e),us.splice(us.indexOf(e),1),e=null,g(null,x)})},RD=function(e,n){var i=n===void 0?{}:n,r=i.afterAll,s=r===void 0?function(){}:r,u=i.afterEach,g=u===void 0?function(){}:u,p=i.beforeEach,y=p===void 0?function(){}:p,T=i.cacheRequests,x=T===void 0?!0:T,O=i.evalScripts,j=O===void 0?"never":O,$=i.httpRequestWithCredentials,Y=$===void 0?!1:$,z=i.renumerateIRIElements,L=z===void 0?!0:z;if(e&&"length"in e)for(var ne=0,te=0,he=e.length;te<he;te++)dy(e[te],j,L,x,Y,y,function(ie,xe){g(ie,xe),e&&"length"in e&&e.length===++ne&&s(ne)});else e?dy(e,j,L,x,Y,y,function(ie,xe){g(ie,xe),s(1),e=null}):s(0)},PD=function(e){var n=(e==null?void 0:e.ownerDocument)||document;return n.defaultView||window},AD=function(e,n){for(var i in e)if(!(i in n))return!0;for(var r in n)if(e[r]!==n[r])return!0;return!1},OD=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],Hf="http://www.w3.org/2000/svg",hy="http://www.w3.org/1999/xlink",Wp=function(t){tw(e,t);function e(){for(var i,r=arguments.length,s=new Array(r),u=0;u<r;u++)s[u]=arguments[u];return i=t.call.apply(t,[this].concat(s))||this,i.initialState={hasError:!1,isLoading:!0},i.state=i.initialState,i._isMounted=!1,i.reactWrapper=void 0,i.nonReactWrapper=void 0,i.refCallback=function(g){i.reactWrapper=g},i}var n=e.prototype;return n.renderSVG=function(){var r=this;if(this.reactWrapper instanceof PD(this.reactWrapper).Node){var s=this.props,u=s.desc,g=s.evalScripts,p=s.httpRequestWithCredentials,y=s.renumerateIRIElements,T=s.src,x=s.title,O=s.useRequestCache,j=this.props.onError,$=this.props.beforeInjection,Y=this.props.afterInjection,z=this.props.wrapper,L,ne;z==="svg"?(L=document.createElementNS(Hf,z),L.setAttribute("xmlns",Hf),L.setAttribute("xmlns:xlink",hy),ne=document.createElementNS(Hf,z)):(L=document.createElement(z),ne=document.createElement(z)),L.appendChild(ne),ne.dataset.src=T,this.nonReactWrapper=this.reactWrapper.appendChild(L);var te=function(b){if(r.removeSVG(),!r._isMounted){j(b);return}r.setState(function(){return{hasError:!0,isLoading:!1}},function(){j(b)})},he=function(b,ke){if(b){te(b);return}r._isMounted&&r.setState(function(){return{isLoading:!1}},function(){try{Y(ke)}catch(ve){te(ve)}})},ie=function(b){if(b.setAttribute("role","img"),u){var ke=b.querySelector(":scope > desc");ke&&b.removeChild(ke);var ve=document.createElement("desc");ve.innerHTML=u,b.prepend(ve)}if(x){var nt=b.querySelector(":scope > title");nt&&b.removeChild(nt);var gt=document.createElement("title");gt.innerHTML=x,b.prepend(gt)}try{$(b)}catch(tt){te(tt)}};RD(ne,{afterEach:he,beforeEach:ie,cacheRequests:O,evalScripts:g,httpRequestWithCredentials:p,renumerateIRIElements:y})}},n.removeSVG=function(){var r;(r=this.nonReactWrapper)!=null&&r.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},n.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},n.componentDidUpdate=function(r){var s=this;AD(kc({},r),this.props)&&this.setState(function(){return s.initialState},function(){s.removeSVG(),s.renderSVG()})},n.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},n.render=function(){var r=this.props;r.afterInjection,r.beforeInjection,r.desc,r.evalScripts;var s=r.fallback;r.httpRequestWithCredentials;var u=r.loading;r.renumerateIRIElements,r.src,r.title,r.useRequestCache;var g=r.wrapper,p=vp(r,OD),y=g;return kn.createElement(y,kc({},p,{ref:this.refCallback},g==="svg"?{xmlns:Hf,xmlnsXlink:hy}:{}),this.state.isLoading&&u&&kn.createElement(u,null),this.state.hasError&&s&&kn.createElement(s,null))},e}(kn.Component);Wp.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};Wp.propTypes={afterInjection:xr.func,beforeInjection:xr.func,desc:xr.string,evalScripts:xr.oneOf(["always","once","never"]),fallback:xr.oneOfType([xr.func,xr.object,xr.string]),httpRequestWithCredentials:xr.bool,loading:xr.oneOfType([xr.func,xr.object,xr.string]),onError:xr.func,renumerateIRIElements:xr.bool,src:xr.string.isRequired,title:xr.string,useRequestCache:xr.bool,wrapper:xr.oneOf(["div","span","svg"])};function DD(t){return ct.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...t,children:ct.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 ID(t){const{renderChildren:e,parentRef:n,onlyChild:i}=t,[r,s]=Re.useState({top:0,left:0}),u=Re.useRef(null),[g,p]=Re.useState("auto");return Re.useLayoutEffect(()=>{if(n.current&&u.current){const y=n.current.getBoundingClientRect(),T=u.current.getBoundingClientRect();let x=y.top;const O=y.left+y.width,j=T.height+(window.innerHeight-y.top)>window.innerHeight;j&&(console.log("overtop"),p(window.innerHeight-y.top-50)),y.top+T.height>window.innerHeight&&!j&&(x=y.top-T.height+y.height),s({top:x,left:O})}},[n,u]),i?e({maxHeight:g}):Ly.createPortal(ct.jsx("div",{ref:u,style:{position:"fixed",top:r.top,left:r.left,zIndex:1200},children:e({maxHeight:g})}),n.current)}function MD(t){const{children:e,title:n,hasTooltip:i}=t,r=Re.useRef(),[s,u]=Re.useState(!1),[g,p]=Re.useState({top:0,left:0});return ct.jsxs("div",{className:"tooltip-item__wrapper",onMouseOver:()=>{if(u(!0),r.current){const y=r.current.getBoundingClientRect();p({top:y.top-20,left:y.left})}},onMouseLeave:()=>u(!1),ref:r,children:[ct.jsx("div",{children:e}),s&&i&&ct.jsx("div",{className:"tooltip-item__content",style:{position:"fixed",background:"#85858A",borderRadius:"4px",color:"#fff",padding:"4px 8px",top:g.top,left:g.left,zIndex:1400,fontSize:"10px",transition:"all 0.2s ease-in-out",animation:"fadeIn 0.2s ease-in-out",pointerEvents:"none"},children:n})]})}function iw(t,e){return e?t:void 0}function ow({item:t,level:e=0,...n}){var gt,tt,et;const{isActive:i,isCollapsed:r,expanded:s,toggleExpand:u}=n,g=`level-${e}`,p=r?"collapsed":"expanded",y=i(t.id)?"active":"",T=(it,me=g)=>`${it} ${me} ${p} ${y}`,x=!!((gt=t.children)!=null&>.length),[O,j]=Re.useState(!1),$=Re.useRef(),Y=window.location.origin,z=t.path&&t.path.includes("http")?new URL(t.path):{origin:"",pathname:""},L=window.location.pathname.split("/")[1],ne=z.pathname.split("/")[1],te=n.ssr||!Y.includes("local")&&Y!==z.origin||ne!==L,he=x||e===0?"div":te?"a":My.Link,ie=t.path||"#",xe=e+1,b=x&&!(r&&xe>=2&&!O),ke=r||e===0?void 0:`${e}rem`,ve=()=>{j(!0)},nt=()=>{j(!1)};return ct.jsxs("div",{ref:$,className:T("menu-item__wrapper"),onMouseOver:ve,onMouseOut:nt,children:[ct.jsx(MD,{hasTooltip:r&&e===1,children:ct.jsxs(he,{to:ie,href:ie,className:T("menu-item__link"),style:{paddingLeft:ke,transition:"all 0.3s",color:i(t.id)?((tt=n.brandColors)==null?void 0:tt.primary400)||vo.primary400:void 0,backgroundColor:i(t.id)&&e===1?(et=n.brandColors)==null?void 0:et.primary200:void 0},onClick:it=>{x&&(it.preventDefault(),r||u(t.id))},children:[e!==0&&ct.jsx(LD,{cls:T,item:t}),ct.jsx("span",{className:T("menu-item__label"),children:t.name}),x&&ct.jsx("div",{className:T("menu-item__icon-arrow__wrapper"),children:ct.jsx(DD,{className:T(`menu-item__icon-arrow__icon ${s(t.id)?"open":"close"}`)})})]}),title:t.name}),b&&ct.jsx(ID,{parentRef:$,onlyChild:!r||r&&xe<2,renderChildren:({maxHeight:it})=>{var me;return ct.jsx(pD.div,{className:T(`menu-item__dropdown ${s(t.id)?"menu-item__dropdown--open":"menu-item__dropdown--close"}`,`level-${xe}`),initial:{height:r||s(t.id)?"auto":0},animate:{height:r||s(t.id)?"auto":0},transition:{duration:.25},style:iw({maxHeight:it,overflowY:"auto",paddingRight:3},it!=="auto"&&!!xe),children:(me=t.children)==null?void 0:me.map(Me=>Re.createElement(ow,{...n,key:Me.id,item:Me,level:xe}))})}})]})}function LD({item:t,cls:e}){var u,g;const[n,i]=Re.useState(!t.icon),r=()=>{i(!0)},s=(u=t.icon)==null?void 0:u.endsWith(".svg");return ct.jsx("div",{className:e("menu-item__icon"),children:n?ct.jsx("div",{style:{width:24,height:24,backgroundColor:"#dadada",borderRadius:"5px",display:"flex",justifyContent:"center",alignItems:"center"},children:(g=t.name.trim().at(0))==null?void 0:g.toUpperCase()}):s?ct.jsx(Wp,{src:t.icon,beforeInjection:p=>{p.setAttribute("style","margin: 0 auto;"),p.querySelectorAll("path").forEach(T=>{T.hasAttribute("fill")&&T.setAttribute("fill","currentColor"),T.hasAttribute("stroke")&&T.setAttribute("stroke","currentColor")})}}):ct.jsx("img",{src:t.icon||"/",alt:" ",style:{height:24,maxHeight:24},onError:r})})}function FD(){return ct.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",children:ct.jsx("path",{d:"M21 18v2H3v-2h18zM6.596 3.903L8.01 5.318 4.828 8.5 8.01 11.68l-1.414 1.415L2 8.5l4.596-4.597zM21 11v2h-9v-2h9zm0-7v2h-9V4h9z"})})}function jD(){return ct.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",children:ct.jsx("path",{d:"M3 4h18v2H3V4zm0 7h18v2H3v-2zm0 7h18v2H3v-2z"})})}function BD(t){return ct.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"20",fill:"none",viewBox:"0 0 18 20",...t,children:ct.jsx("path",{fill:"#E01B00",fillRule:"evenodd",d:"M.179 2.875A2.375 2.375 0 012.554.5h3.393a1.018 1.018 0 010 2.036H2.554a.34.34 0 00-.34.339v14.25c0 .187.152.34.34.34h3.393a1.018 1.018 0 110 2.035H2.554a2.375 2.375 0 01-2.375-2.375V2.875zm14.167 6.107h-7.72a1.018 1.018 0 000 2.036h7.72l-2.673 2.673a1.018 1.018 0 101.44 1.44l4.41-4.411a1.018 1.018 0 000-1.44l-4.41-4.41a1.018 1.018 0 10-1.44 1.439l2.673 2.673z",clipRule:"evenodd"})})}const ND=`.wrap-section{padding:0 8px;transition:all .3s}.wrap-section.collapsed{padding:0 4px}.side-bar{display:flex;flex-direction:column;max-width:18rem;height:calc(100vh - 64px);border-right:1px solid #ddd;background-color:#fafafa;transition:all .3s}.side-bar.expanded{width:17rem}.side-bar.collapsed{width:64px}.side-bar__wrap-btn-logout,.side-bar__btn-logout{margin:40px 0}.side-bar__logout-btn__text{margin-left:12px;font-size:.875rem;opacity:1}.side-bar__logout-btn__text.collapsed{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}.side-bar__wrapper-toggle-btn.collapsed{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}.side-bar__logout-btn:hover{background-color:#919eab14}.side-bar__icon-logout{flex-shrink:0}.menu-item__wrapper{display:flex;flex-direction:column;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.collapsed.level-1{padding-left:calc(.5rem + 7.665px)!important}.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.level-0{height:37px}.menu-item__link.menu-item__link.collapsed.level-0{padding:0;height:0;transition:all .15s}.menu-item__icon{width:1.5rem;height:1.5rem;flex-shrink:0;display:grid;place-items:center}.menu-item__icon.collapsed.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.collapsed{text-overflow:unset}.menu-item__label.active{color:inherit}.menu-item__label.collapsed{margin-left:8px;font-size:.75rem;line-height:1rem}.menu-item__label.collapsed.level-0,.menu-item__label.collapsed.level-1{font-size:.875rem;opacity:0;transition-delay:.15s}.menu-item__label.level-0{color:#85858a;margin-left:0}.menu-item__icon-arrow__wrapper{display:grid;place-items:center;position:absolute;top:50%;transform:translateY(-50%);right:0}.menu-item__icon-arrow__wrapper.expanded{right:4px}.menu-item__icon-arrow__wrapper.level-0.collapsed{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.expanded.open{transform:rotate(0)!important}.menu-item__dropdown.collapsed{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::-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.expanded.menu-item__dropdown--close{margin-top:0;transition:margin-top .3s}.menu-item__dropdown:first-of-type{margin-top:0}.menu-item__dropdown>*:first-child{margin-top:0}.menu-item__dropdown.collapsed .menu-item__link{height:40px}.menu-item__dropdown.collapsed .menu-item__link.level-1{height:48px}.menu-item__dropdown.collapsed.level-1{width:auto;max-width:unset;box-shadow:none;border:none;padding:0;background-color:unset}.menu-item__dropdown.expanded{overflow:hidden}.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.collapsed .simplebar-track.simplebar-vertical{display:none}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}
|
|
135
135
|
`,py=localStorage.getItem("isCollapsed");function HD(t){const{baseUrl:e,menuPath:n}=t,i=My.useLocation(),[r,s]=Re.useState([]),[u,g]=Re.useState(py===null?!0:py==="true"),[p,y]=Re.useState({}),T=Up(r),[x,O]=Re.useState(window.location.href);Re.useEffect(()=>{O(window.location.href)},[i]);const j=aw(T,x).filter(ie=>ie.parentKey!==0);console.log("matchPaths:",x,i,j);const $=ie=>{y({...p,[ie]:!p[ie]})},Y=()=>{g(!u),localStorage.setItem("isCollapsed",JSON.stringify(!u))};Re.useLayoutEffect(()=>{(async()=>{var xe,b;try{const ve=e+(n||"/global-menu-config/api/v1/menu-items/user"),{data:nt}=await Iy.get(ve,{withCredentials:!0});let gt=nt.map(et=>({...et,parentKey:0}));gt=lw(gt),t.replacePath&&(gt=sw(gt,t.replacePath));const tt=UD(gt);y(tt),s(gt)}catch(ke){console.log(ke),gp(((b=(xe=ke.response)==null?void 0:xe.data)==null?void 0:b.errorMessage)||"Have error when get menu items")}})()},[e,n,t.replacePath]);const[z,L]=Re.useState(!1),ne=u?"collapsed":"expanded",te=ie=>`${ie} ${ne}`,he=Re.useRef(null);return ct.jsxs("div",{className:te("side-bar"),children:[ct.jsx("div",{className:te("wrap-section side-bar__wrapper-toggle-btn"),children:ct.jsx("button",{className:"icon-btn side-bar__toggle-btn",onClick:Y,children:u?ct.jsx(jD,{}):ct.jsx(FD,{})})}),ct.jsx(Ib,{ref:he,className:te("wrap-section side-bar__menu"),style:{marginTop:24,flex:1,overflow:"auto",height:"100%",overflowX:"hidden"},children:r.map(ie=>{const xe=b=>j.some(ke=>ke.id===b);return ct.jsx(ow,{item:ie,isActive:xe,isCollapsed:u,expanded:b=>p[b],toggleExpand:$,replacePath:t.replacePath,ssr:t.ssr,brandColors:t.brandColors},ie.id)})}),ct.jsxs("div",{className:te("wrap-section side-bar__wrap-btn-logout"),children:[ct.jsxs("button",{className:te("side-bar__logout-btn"),onClick:()=>L(!0),children:[ct.jsx(BD,{className:te("side-bar__icon-logout")}),ct.jsx("span",{className:te("side-bar__logout-btn__text"),children:"Logout"})]}),ct.jsx(Fy,{isOpen:z,onClose:()=>L(!1),onConfirm:()=>t.logout?t.logout():XT(t.baseUrl)})]})]})}function Up(t){let e=[];for(const n of t)e.push(n),n.children&&(e=e.concat(Up(n.children)));return e}function WD(t,e){const n=new URL(t).searchParams,i=new URL(e).searchParams;return Array.from(i).filter(([r,s])=>s===n.get(r)).length}function aw(t,e){const n=new URL(e),i=t.filter(u=>u.path&&u.path.includes("http")).map(u=>({item:u,itemUrl:new URL(u.path),matchingParamsCount:WD(e,u.path)})).sort((u,g)=>{const p=new URL(u.itemUrl).searchParams,y=new URL(g.itemUrl).searchParams;return Array.from(p).length-Array.from(y).length}).filter(({itemUrl:u})=>n.origin===u.origin).filter(({itemUrl:u})=>n.pathname===u.pathname).sort((u,g)=>g.matchingParamsCount-u.matchingParamsCount);let r=i.length>0?i[0].item:null;console.log("matchingItems:",i);let s=[];for(;r;)s=[r,...s],r=t.find(u=>u.id===(r==null?void 0:r.parentKey))||null;return s}function sw(t,e){return t.map(n=>(n.path&&(n.path=e(n.path)),n.children&&n.children.length>0&&(n.children=sw(n.children,e)),n))}function lw(t){return t.map(n=>n.path&&!n.path.includes("http")&&n.path.includes("/")?{...n,path:window.location.origin+n.path}:(n.children&&(n.children=lw(n.children)),n))}function UD(t){const e=Up(t),n=aw(e,window.location.href),i={};return n.forEach(r=>i[r.id]=!0),e.forEach(r=>{r.parentKey||(i[r.id]=!0)}),i}function VD(t){return ct.jsx(Cb,{styles:[rR,ND],style:{position:"sticky",zIndex:20},children:ct.jsx(HD,{...t})})}const zD={"page-container":"_page-container_1pwo1_1","page-main-content":"_page-main-content_1pwo1_8","page-title":"_page-title_1pwo1_19","text-base":"_text-base_1pwo1_26","mt-4":"_mt-4_1pwo1_33"};var ud={exports:{}};/**
|
|
136
136
|
* @license
|
|
137
137
|
* Lodash <https://lodash.com/>
|
package/dist/share/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../index.module-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../index.module-a3ebf250.cjs"),c=require("axios"),u=require("react"),i=require("react/jsx-runtime");require("@r2wc/react-to-web-component");require("moment");require("@mui/material");const l=require("react-router-dom"),m=r=>{const[t,n]=u.useState([]);return u.useEffect(()=>{c.get(`${r}/user-management/api/v1/users/my-account/permissions`,{withCredentials:!0}).then(e=>n(e.data)).catch(e=>{console.error("Getting user permission error:",e)})},[r]),t},a=r=>(t,n)=>{const e=m(r);return n?t.every(o=>e==null?void 0:e.includes(o)):t.some(o=>e==null?void 0:e.includes(o))},P=({baseUrl:r,accessWith:t,requireAll:n,children:e})=>a(r)(t,n)?i.jsx(i.Fragment,{children:e}):null,h=({accessWith:r,requireAll:t,baseUrl:n,unAuthorizedPath:e,children:o})=>a(n)(r,t)?i.jsx(i.Fragment,{children:o}):i.jsx(l.Navigate,{to:e,replace:!0});exports.AuthProvider=s.AuthProvider;exports.SaasThemeProvider=s.SaasThemeProvider;exports.TranslationProvider=s.TranslationProvider;exports.color=s.color;exports.createCustomTheme=s.createCustomTheme;exports.getAxiosInstance=s.getAxiosInstance;exports.search=s.search;exports.translate=s.translate;exports.translationConfig=s.translationConfig;exports.useAuth=s.useAuth;exports.useCustomTranslation=s.useCustomTranslation;exports.useTheme=s.useTheme;exports.useTranslation=s.useTranslation$1;exports.HasPermission=P;exports.PermissionRoute=h;exports.getUseHasPermission=a;exports.useGetPermission=m;
|
package/dist/share/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as G, U as N, T as R, c as S, R as j, K as w, r as E, N as F, M as I, J, d as K, m as M, O } from "../index.module-
|
|
1
|
+
import { H as G, U as N, T as R, c as S, R as j, K as w, r as E, N as F, M as I, J, d as K, m as M, O } from "../index.module-6577468c.js";
|
|
2
2
|
import m from "axios";
|
|
3
3
|
import { useState as u, useEffect as c } from "react";
|
|
4
4
|
import { jsx as n, Fragment as a } from "react/jsx-runtime";
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../react-to-web-component-3847ebf5.cjs");const e=require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../react-to-web-component-3847ebf5.cjs");const e=require("../index-70d1d0a6.cjs");exports.GlobalMenu=e.GlobalMenu;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../react-to-web-component-3847ebf5.cjs");require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../react-to-web-component-3847ebf5.cjs");require("../index-70d1d0a6.cjs");const e=require("../index-33b516ea.cjs");require("../index-4327002b.cjs");exports.TopBar=e.TopBar;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../react-to-web-component-469d91d4.js";
|
|
2
|
-
import "../index-
|
|
3
|
-
import { T as i } from "../index-
|
|
2
|
+
import "../index-9b0d9ee5.js";
|
|
3
|
+
import { T as i } from "../index-8ffb34b8.js";
|
|
4
4
|
import "../index-b3659f2e.js";
|
|
5
5
|
export {
|
|
6
6
|
i as TopBar
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../react-to-web-component-3847ebf5.cjs");const e=require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../react-to-web-component-3847ebf5.cjs");const e=require("../index-33b516ea.cjs");require("../index-70d1d0a6.cjs");require("../index-4327002b.cjs");exports.HasPermission=e.HasPermission;exports.getUseHasPermission=e.getUseHasPermission;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../react-to-web-component-469d91d4.js";
|
|
2
|
-
import { H as e, g as t } from "../index-
|
|
3
|
-
import "../index-
|
|
2
|
+
import { H as e, g as t } from "../index-8ffb34b8.js";
|
|
3
|
+
import "../index-9b0d9ee5.js";
|
|
4
4
|
import "../index-b3659f2e.js";
|
|
5
5
|
export {
|
|
6
6
|
e as HasPermission,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const D=require("./react-to-web-component-3847ebf5.cjs"),se=require("./index-
|
|
1
|
+
"use strict";const D=require("./react-to-web-component-3847ebf5.cjs"),se=require("./index-70d1d0a6.cjs"),ps=require("./index-4327002b.cjs");function Vg(e){var t,r,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Vg(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}function Zn(){for(var e,t,r=0,s="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Vg(e))&&(s&&(s+=" "),s+=t);return s}const kw=e=>{var s,o;const{tabs:t}=e,r=c=>{e.setCurrentTab(c.target.id)};return console.log("🚀 ~ brandColors:",e.currentTab),D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx("style",{children:`
|
|
2
2
|
.tab-title {
|
|
3
3
|
min-width: 90px;
|
|
4
4
|
padding: 5px 16px;
|
|
@@ -63,5 +63,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
63
63
|
* content-type
|
|
64
64
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
65
65
|
* MIT Licensed
|
|
66
|
-
*/var wl=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,Rb=/\\([\u000b\u0020-\u00ff])/g,Ab=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,Ob=_b;function _b(e){if(!e)throw new TypeError("argument string is required");var t=typeof e=="object"?Mb(e):e;if(typeof t!="string")throw new TypeError("argument string is required to be a string");var n=t.indexOf(";"),r=n!==-1?t.slice(0,n).trim():t.trim();if(!Ab.test(r))throw new TypeError("invalid media type");var i=new jb(r.toLowerCase());if(n!==-1){var o,s,a;for(wl.lastIndex=n;s=wl.exec(t);){if(s.index!==n)throw new TypeError("invalid parameter format");n+=s[0].length,o=s[1].toLowerCase(),a=s[2],a.charCodeAt(0)===34&&(a=a.slice(1,-1),a.indexOf("\\")!==-1&&(a=a.replace(Rb,"$1"))),i.parameters[o]=a}if(n!==t.length)throw new TypeError("invalid parameter format")}return i}function Mb(e){var t;if(typeof e.getHeader=="function"?t=e.getHeader("content-type"):typeof e.headers=="object"&&(t=e.headers&&e.headers["content-type"]),typeof t!="string")throw new TypeError("content-type header is missing from object");return t}function jb(e){this.parameters=Object.create(null),this.type=e}var Rt=new Map,Gf=function(t){return t.cloneNode(!0)},Sl=function(){return window.location.protocol==="file:"},Xf=function(t,n,r){var i=new XMLHttpRequest;i.onreadystatechange=function(){try{if(!/\.svg/i.test(t)&&i.readyState===2){var o=i.getResponseHeader("Content-Type");if(!o)throw new Error("Content type not found");var s=Ob(o).type;if(!(s==="image/svg+xml"||s==="text/plain"))throw new Error("Invalid content type: ".concat(s))}if(i.readyState===4){if(i.status===404||i.responseXML===null)throw new Error(Sl()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+t);if(i.status===200||Sl()&&i.status===0)r(null,i);else throw new Error("There was a problem injecting the SVG: "+i.status+" "+i.statusText)}}catch(a){if(i.abort(),a instanceof Error)r(a,i);else throw a}},i.open("GET",t),i.withCredentials=n,i.overrideMimeType&&i.overrideMimeType("text/xml"),i.send()},Qe={},El=function(t,n){Qe[t]=Qe[t]||[],Qe[t].push(n)},Vb=function(t){for(var n=function(s,a){setTimeout(function(){if(Array.isArray(Qe[t])){var l=Rt.get(t),u=Qe[t][s];l instanceof SVGSVGElement&&u(null,Gf(l)),l instanceof Error&&u(l),s===Qe[t].length-1&&delete Qe[t]}},0)},r=0,i=Qe[t].length;r<i;r++)n(r)},Lb=function(t,n,r){if(Rt.has(t)){var i=Rt.get(t);if(i===void 0){El(t,r);return}if(i instanceof SVGSVGElement){r(null,Gf(i));return}}Rt.set(t,void 0),El(t,r),Xf(t,n,function(o,s){var a;o?Rt.set(t,o):((a=s.responseXML)===null||a===void 0?void 0:a.documentElement)instanceof SVGSVGElement&&Rt.set(t,s.responseXML.documentElement),Vb(t)})},Fb=function(t,n,r){Xf(t,n,function(i,o){var s;i?r(i):((s=o.responseXML)===null||s===void 0?void 0:s.documentElement)instanceof SVGSVGElement&&r(null,o.responseXML.documentElement)})},Db=0,Ib=function(){return++Db},Pe=[],Cl={},Nb="http://www.w3.org/2000/svg",wi="http://www.w3.org/1999/xlink",kl=function(t,n,r,i,o,s,a){var l=t.getAttribute("data-src")||t.getAttribute("src");if(!l){a(new Error("Invalid data-src or src attribute"));return}if(Pe.indexOf(t)!==-1){Pe.splice(Pe.indexOf(t),1),t=null;return}Pe.push(t),t.setAttribute("src","");var u=i?Lb:Fb;u(l,o,function(f,c){if(!c){Pe.splice(Pe.indexOf(t),1),t=null,a(f);return}var d=t.getAttribute("id");d&&c.setAttribute("id",d);var h=t.getAttribute("title");h&&c.setAttribute("title",h);var p=t.getAttribute("width");p&&c.setAttribute("width",p);var g=t.getAttribute("height");g&&c.setAttribute("height",g);var y=Array.from(new Set(bi(bi(bi([],(c.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(t.getAttribute("class")||"").split(" "),!0))).join(" ").trim();c.setAttribute("class",y);var v=t.getAttribute("style");v&&c.setAttribute("style",v),c.setAttribute("data-src",l);var b=[].filter.call(t.attributes,function(Z){return/^data-\w[\w-]*$/.test(Z.name)});if(Array.prototype.forEach.call(b,function(Z){Z.name&&Z.value&&c.setAttribute(Z.name,Z.value)}),r){var x={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]},S,E,C,T,P;Object.keys(x).forEach(function(Z){S=Z,C=x[Z],E=c.querySelectorAll(S+"[id]");for(var We=function(Et,Ur){T=E[Et].id,P=T+"-"+Ib();var at;Array.prototype.forEach.call(C,function(Wr){at=c.querySelectorAll("["+Wr+'*="'+T+'"]');for(var En=0,ed=at.length;En<ed;En++){var Qo=at[En].getAttribute(Wr);Qo&&!Qo.match(new RegExp('url\\("?#'+T+'"?\\)'))||at[En].setAttribute(Wr,"url(#"+P+")")}});for(var Le=c.querySelectorAll("[*|href]"),Ct=[],kt=0,Ut=Le.length;kt<Ut;kt++){var lt=Le[kt].getAttributeNS(wi,"href");lt&<.toString()==="#"+E[Et].id&&Ct.push(Le[kt])}for(var Ee=0,Zo=Ct.length;Ee<Zo;Ee++)Ct[Ee].setAttributeNS(wi,"href","#"+P);E[Et].id=P},wt=0,D=E.length;wt<D;wt++)We(wt)})}c.removeAttribute("xmlns:a");for(var _=c.querySelectorAll("script"),G=[],U,$,X=0,z=_.length;X<z;X++)$=_[X].getAttribute("type"),(!$||$==="application/ecmascript"||$==="application/javascript"||$==="text/javascript")&&(U=_[X].innerText||_[X].textContent,U&&G.push(U),c.removeChild(_[X]));if(G.length>0&&(n==="always"||n==="once"&&!Cl[l])){for(var re=0,H=G.length;re<H;re++)new Function(G[re])(window);Cl[l]=!0}var Te=c.querySelectorAll("style");if(Array.prototype.forEach.call(Te,function(Z){Z.textContent+=""}),c.setAttribute("xmlns",Nb),c.setAttribute("xmlns:xlink",wi),s(c),!t.parentNode){Pe.splice(Pe.indexOf(t),1),t=null,a(new Error("Parent node is null"));return}t.parentNode.replaceChild(c,t),Pe.splice(Pe.indexOf(t),1),t=null,a(null,c)})},Bb=function(t,n){var r=n===void 0?{}:n,i=r.afterAll,o=i===void 0?function(){}:i,s=r.afterEach,a=s===void 0?function(){}:s,l=r.beforeEach,u=l===void 0?function(){}:l,f=r.cacheRequests,c=f===void 0?!0:f,d=r.evalScripts,h=d===void 0?"never":d,p=r.httpRequestWithCredentials,g=p===void 0?!1:p,y=r.renumerateIRIElements,v=y===void 0?!0:y;if(t&&"length"in t)for(var b=0,x=0,S=t.length;x<S;x++)kl(t[x],h,v,c,g,u,function(E,C){a(E,C),t&&"length"in t&&t.length===++b&&o(b)});else t?kl(t,h,v,c,g,u,function(E,C){a(E,C),o(1),t=null}):o(0)},$b=function(t){var n=(t==null?void 0:t.ownerDocument)||document;return n.defaultView||window},zb=function(t,n){for(var r in t)if(!(r in n))return!0;for(var i in n)if(t[i]!==n[i])return!0;return!1},Ub=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],Vn="http://www.w3.org/2000/svg",Tl="http://www.w3.org/1999/xlink",Yo=function(e){qf(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o))||this,r.initialState={hasError:!1,isLoading:!0},r.state=r.initialState,r._isMounted=!1,r.reactWrapper=void 0,r.nonReactWrapper=void 0,r.refCallback=function(a){r.reactWrapper=a},r}var n=t.prototype;return n.renderSVG=function(){var i=this;if(this.reactWrapper instanceof $b(this.reactWrapper).Node){var o=this.props,s=o.desc,a=o.evalScripts,l=o.httpRequestWithCredentials,u=o.renumerateIRIElements,f=o.src,c=o.title,d=o.useRequestCache,h=this.props.onError,p=this.props.beforeInjection,g=this.props.afterInjection,y=this.props.wrapper,v,b;y==="svg"?(v=document.createElementNS(Vn,y),v.setAttribute("xmlns",Vn),v.setAttribute("xmlns:xlink",Tl),b=document.createElementNS(Vn,y)):(v=document.createElement(y),b=document.createElement(y)),v.appendChild(b),b.dataset.src=f,this.nonReactWrapper=this.reactWrapper.appendChild(v);var x=function(T){if(i.removeSVG(),!i._isMounted){h(T);return}i.setState(function(){return{hasError:!0,isLoading:!1}},function(){h(T)})},S=function(T,P){if(T){x(T);return}i._isMounted&&i.setState(function(){return{isLoading:!1}},function(){try{g(P)}catch(_){x(_)}})},E=function(T){if(T.setAttribute("role","img"),s){var P=T.querySelector(":scope > desc");P&&T.removeChild(P);var _=document.createElement("desc");_.innerHTML=s,T.prepend(_)}if(c){var G=T.querySelector(":scope > title");G&&T.removeChild(G);var U=document.createElement("title");U.innerHTML=c,T.prepend(U)}try{p(T)}catch($){x($)}};Bb(b,{afterEach:S,beforeEach:E,cacheRequests:d,evalScripts:a,httpRequestWithCredentials:l,renumerateIRIElements:u})}},n.removeSVG=function(){var i;(i=this.nonReactWrapper)!=null&&i.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},n.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},n.componentDidUpdate=function(i){var o=this;zb(It({},i),this.props)&&this.setState(function(){return o.initialState},function(){o.removeSVG(),o.renderSVG()})},n.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},n.render=function(){var i=this.props;i.afterInjection,i.beforeInjection,i.desc,i.evalScripts;var o=i.fallback;i.httpRequestWithCredentials;var s=i.loading;i.renumerateIRIElements,i.src,i.title,i.useRequestCache;var a=i.wrapper,l=Ko(i,Ub),u=a;return m.reactExports.createElement(u,It({},l,{ref:this.refCallback},a==="svg"?{xmlns:Vn,xmlnsXlink:Tl}:{}),this.state.isLoading&&s&&m.reactExports.createElement(s,null),this.state.hasError&&o&&m.reactExports.createElement(o,null))},t}(m.reactExports.Component);Yo.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};Yo.propTypes={afterInjection:K.func,beforeInjection:K.func,desc:K.string,evalScripts:K.oneOf(["always","once","never"]),fallback:K.oneOfType([K.func,K.object,K.string]),httpRequestWithCredentials:K.bool,loading:K.oneOfType([K.func,K.object,K.string]),onError:K.func,renumerateIRIElements:K.bool,src:K.string.isRequired,title:K.string,useRequestCache:K.bool,wrapper:K.oneOf(["div","span","svg"])};function Wb(e){return m.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...e,children:m.jsxRuntimeExports.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 Hb(e){const{renderChildren:t,parentRef:n,onlyChild:r}=e,[i,o]=m.reactExports.useState({top:0,left:0}),s=m.reactExports.useRef(null),[a,l]=m.reactExports.useState("auto");return m.reactExports.useLayoutEffect(()=>{if(n.current&&s.current){const u=n.current.getBoundingClientRect(),f=s.current.getBoundingClientRect(),c=u.top,d=u.left+u.width;u.top+f.height>window.innerHeight&&l(window.innerHeight-u.top-50),o({top:c,left:d})}},[n,s]),r?t({maxHeight:a}):m.reactDomExports.createPortal(m.jsxRuntimeExports.jsx("div",{ref:s,style:{position:"fixed",top:i.top,left:i.left,zIndex:1200},children:t({maxHeight:a})}),n.current)}function qb(e){const{children:t,title:n,hasTooltip:r}=e,i=m.reactExports.useRef(),[o,s]=m.reactExports.useState(!1),[a,l]=m.reactExports.useState({top:0,left:0});return m.jsxRuntimeExports.jsxs("div",{className:"tooltip-item__wrapper",onMouseOver:()=>{if(s(!0),i.current){const u=i.current.getBoundingClientRect();l({top:u.top-20,left:u.left})}},onMouseLeave:()=>s(!1),ref:i,children:[m.jsxRuntimeExports.jsx("div",{children:t}),o&&r&&m.jsxRuntimeExports.jsx("div",{className:"tooltip-item__content",style:{position:"fixed",background:"#85858A",borderRadius:"4px",color:"#fff",padding:"4px 8px",top:a.top,left:a.left,zIndex:1400,fontSize:"10px",transition:"all 0.2s ease-in-out",animation:"fadeIn 0.2s ease-in-out",pointerEvents:"none"},children:n})]})}function Gb(e,t){return t?e:void 0}function Kf({item:e,level:t=0,...n}){var U,$,X;const{isActive:r,isCollapsed:i,expanded:o,toggleExpand:s}=n,a=`level-${t}`,l=i?"collapsed":"expanded",u=r(e.id)?"active":"",f=(z,re=a)=>`${z} ${re} ${l} ${u}`,c=!!((U=e.children)!=null&&U.length),[d,h]=m.reactExports.useState(!1),p=m.reactExports.useRef(),g=window.location.origin,y=e.path&&e.path.includes("http")?new URL(e.path):{origin:"",pathname:""},v=window.location.pathname.split("/")[1],b=y.pathname.split("/")[1],x=n.ssr||!g.includes("local")&&g!==y.origin||b!==v,S=c||t===0?"div":x?"a":Cb,E=e.path||"#",C=t+1,T=c&&!(i&&C>=2&&!d),P=i||t===0?void 0:`${t}rem`;console.log("hasDropdown:",T);const _=()=>{h(!0)},G=()=>{h(!1)};return m.jsxRuntimeExports.jsxs("div",{ref:p,className:f("menu-item__wrapper"),onMouseOver:_,onMouseOut:G,children:[m.jsxRuntimeExports.jsx(qb,{hasTooltip:i&&t===1,children:m.jsxRuntimeExports.jsxs(S,{to:E,href:E,className:f("menu-item__link"),style:{paddingLeft:P,transition:"all 0.3s",color:r(e.id)?(($=n.brandColors)==null?void 0:$.primary400)||Vt.primary400:void 0,backgroundColor:r(e.id)&&t===1?(X=n.brandColors)==null?void 0:X.primary200:void 0},onClick:z=>{c&&(z.preventDefault(),i||s(e.id))},children:[t!==0&&m.jsxRuntimeExports.jsx(Xb,{cls:f,item:e}),m.jsxRuntimeExports.jsx("span",{className:f("menu-item__label"),children:e.name}),c&&m.jsxRuntimeExports.jsx("div",{className:f("menu-item__icon-arrow__wrapper"),children:m.jsxRuntimeExports.jsx(Wb,{className:f(`menu-item__icon-arrow__icon ${o(e.id)?"open":"close"}`)})})]}),title:e.name}),T&&m.jsxRuntimeExports.jsx(Hb,{parentRef:p,onlyChild:!i||i&&C<2,renderChildren:({maxHeight:z})=>{var re;return m.jsxRuntimeExports.jsx(Jx.div,{className:f(`menu-item__dropdown ${o(e.id)?"menu-item__dropdown--open":"menu-item__dropdown--close"}`,`level-${C}`),initial:{height:i||o(e.id)?"auto":0},animate:{height:i||o(e.id)?"auto":0},transition:{duration:.25},style:Gb({maxHeight:z,overflowY:"auto",paddingRight:3},z!=="auto"&&!!C),children:(re=e.children)==null?void 0:re.map(H=>m.reactExports.createElement(Kf,{...n,key:H.id,item:H,level:C}))})}})]})}function Xb({item:e,cls:t}){var s,a;const[n,r]=m.reactExports.useState(!e.icon),i=()=>{r(!0)},o=(s=e.icon)==null?void 0:s.endsWith(".svg");return m.jsxRuntimeExports.jsx("div",{className:t("menu-item__icon"),children:n?m.jsxRuntimeExports.jsx("div",{style:{width:24,height:24,backgroundColor:"#dadada",borderRadius:"5px",display:"flex",justifyContent:"center",alignItems:"center"},children:(a=e.name.trim().at(0))==null?void 0:a.toUpperCase()}):o?m.jsxRuntimeExports.jsx(Yo,{src:e.icon,beforeInjection:l=>{l.setAttribute("style","margin: 0 auto;"),l.querySelectorAll("path").forEach(f=>{f.hasAttribute("fill")&&f.setAttribute("fill","currentColor"),f.hasAttribute("stroke")&&f.setAttribute("stroke","currentColor")})}}):m.jsxRuntimeExports.jsx("img",{src:e.icon||"/",alt:" ",style:{height:24,maxHeight:24},onError:i})})}function Kb(){return m.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",children:m.jsxRuntimeExports.jsx("path",{d:"M21 18v2H3v-2h18zM6.596 3.903L8.01 5.318 4.828 8.5 8.01 11.68l-1.414 1.415L2 8.5l4.596-4.597zM21 11v2h-9v-2h9zm0-7v2h-9V4h9z"})})}function Yb(){return m.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",children:m.jsxRuntimeExports.jsx("path",{d:"M3 4h18v2H3V4zm0 7h18v2H3v-2zm0 7h18v2H3v-2z"})})}function Jb(e){return m.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"20",fill:"none",viewBox:"0 0 18 20",...e,children:m.jsxRuntimeExports.jsx("path",{fill:"#E01B00",fillRule:"evenodd",d:"M.179 2.875A2.375 2.375 0 012.554.5h3.393a1.018 1.018 0 010 2.036H2.554a.34.34 0 00-.34.339v14.25c0 .187.152.34.34.34h3.393a1.018 1.018 0 110 2.035H2.554a2.375 2.375 0 01-2.375-2.375V2.875zm14.167 6.107h-7.72a1.018 1.018 0 000 2.036h7.72l-2.673 2.673a1.018 1.018 0 101.44 1.44l4.41-4.411a1.018 1.018 0 000-1.44l-4.41-4.41a1.018 1.018 0 10-1.44 1.439l2.673 2.673z",clipRule:"evenodd"})})}const Zb=`.wrap-section{padding:0 8px;transition:all .3s}.wrap-section.collapsed{padding:0 4px}.side-bar{display:flex;flex-direction:column;max-width:18rem;height:calc(100vh - 64px);border-right:1px solid #ddd;background-color:#fafafa;transition:all .3s}.side-bar.expanded{width:17rem}.side-bar.collapsed{width:64px}.side-bar__wrap-btn-logout,.side-bar__btn-logout{margin:40px 0}.side-bar__logout-btn__text{margin-left:12px;font-size:.875rem;opacity:1}.side-bar__logout-btn__text.collapsed{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}.side-bar__wrapper-toggle-btn.collapsed{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}.side-bar__logout-btn:hover{background-color:#919eab14}.side-bar__icon-logout{flex-shrink:0}.menu-item__wrapper{display:flex;flex-direction:column;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.collapsed.level-1{padding-left:calc(.5rem + 7.665px)!important}.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.level-0{height:37px}.menu-item__link.menu-item__link.collapsed.level-0{padding:0;height:0;transition:all .15s}.menu-item__icon{width:1.5rem;height:1.5rem;flex-shrink:0;display:grid;place-items:center}.menu-item__icon.collapsed.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.collapsed{text-overflow:unset}.menu-item__label.active{color:inherit}.menu-item__label.collapsed{margin-left:8px;font-size:.75rem;line-height:1rem}.menu-item__label.collapsed.level-0,.menu-item__label.collapsed.level-1{font-size:.875rem;opacity:0;transition-delay:.15s}.menu-item__label.level-0{color:#85858a;margin-left:0}.menu-item__icon-arrow__wrapper{display:grid;place-items:center;position:absolute;top:50%;transform:translateY(-50%);right:0}.menu-item__icon-arrow__wrapper.expanded{right:4px}.menu-item__icon-arrow__wrapper.level-0.collapsed{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.expanded.open{transform:rotate(0)!important}.menu-item__dropdown.collapsed{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::-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.expanded.menu-item__dropdown--close{margin-top:0;transition:margin-top .3s}.menu-item__dropdown:first-of-type{margin-top:0}.menu-item__dropdown>*:first-child{margin-top:0}.menu-item__dropdown.collapsed .menu-item__link{height:40px}.menu-item__dropdown.collapsed .menu-item__link.level-1{height:48px}.menu-item__dropdown.collapsed.level-1{width:auto;max-width:unset;box-shadow:none;border:none;padding:0;background-color:unset}.menu-item__dropdown.expanded{overflow:hidden}.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.collapsed .simplebar-track.simplebar-vertical{display:none}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}
|
|
66
|
+
*/var wl=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,Rb=/\\([\u000b\u0020-\u00ff])/g,Ab=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,Ob=_b;function _b(e){if(!e)throw new TypeError("argument string is required");var t=typeof e=="object"?Mb(e):e;if(typeof t!="string")throw new TypeError("argument string is required to be a string");var n=t.indexOf(";"),r=n!==-1?t.slice(0,n).trim():t.trim();if(!Ab.test(r))throw new TypeError("invalid media type");var i=new jb(r.toLowerCase());if(n!==-1){var o,s,a;for(wl.lastIndex=n;s=wl.exec(t);){if(s.index!==n)throw new TypeError("invalid parameter format");n+=s[0].length,o=s[1].toLowerCase(),a=s[2],a.charCodeAt(0)===34&&(a=a.slice(1,-1),a.indexOf("\\")!==-1&&(a=a.replace(Rb,"$1"))),i.parameters[o]=a}if(n!==t.length)throw new TypeError("invalid parameter format")}return i}function Mb(e){var t;if(typeof e.getHeader=="function"?t=e.getHeader("content-type"):typeof e.headers=="object"&&(t=e.headers&&e.headers["content-type"]),typeof t!="string")throw new TypeError("content-type header is missing from object");return t}function jb(e){this.parameters=Object.create(null),this.type=e}var Rt=new Map,Gf=function(t){return t.cloneNode(!0)},Sl=function(){return window.location.protocol==="file:"},Xf=function(t,n,r){var i=new XMLHttpRequest;i.onreadystatechange=function(){try{if(!/\.svg/i.test(t)&&i.readyState===2){var o=i.getResponseHeader("Content-Type");if(!o)throw new Error("Content type not found");var s=Ob(o).type;if(!(s==="image/svg+xml"||s==="text/plain"))throw new Error("Invalid content type: ".concat(s))}if(i.readyState===4){if(i.status===404||i.responseXML===null)throw new Error(Sl()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+t);if(i.status===200||Sl()&&i.status===0)r(null,i);else throw new Error("There was a problem injecting the SVG: "+i.status+" "+i.statusText)}}catch(a){if(i.abort(),a instanceof Error)r(a,i);else throw a}},i.open("GET",t),i.withCredentials=n,i.overrideMimeType&&i.overrideMimeType("text/xml"),i.send()},Qe={},El=function(t,n){Qe[t]=Qe[t]||[],Qe[t].push(n)},Vb=function(t){for(var n=function(s,a){setTimeout(function(){if(Array.isArray(Qe[t])){var l=Rt.get(t),u=Qe[t][s];l instanceof SVGSVGElement&&u(null,Gf(l)),l instanceof Error&&u(l),s===Qe[t].length-1&&delete Qe[t]}},0)},r=0,i=Qe[t].length;r<i;r++)n(r)},Lb=function(t,n,r){if(Rt.has(t)){var i=Rt.get(t);if(i===void 0){El(t,r);return}if(i instanceof SVGSVGElement){r(null,Gf(i));return}}Rt.set(t,void 0),El(t,r),Xf(t,n,function(o,s){var a;o?Rt.set(t,o):((a=s.responseXML)===null||a===void 0?void 0:a.documentElement)instanceof SVGSVGElement&&Rt.set(t,s.responseXML.documentElement),Vb(t)})},Fb=function(t,n,r){Xf(t,n,function(i,o){var s;i?r(i):((s=o.responseXML)===null||s===void 0?void 0:s.documentElement)instanceof SVGSVGElement&&r(null,o.responseXML.documentElement)})},Db=0,Ib=function(){return++Db},Pe=[],Cl={},Nb="http://www.w3.org/2000/svg",wi="http://www.w3.org/1999/xlink",kl=function(t,n,r,i,o,s,a){var l=t.getAttribute("data-src")||t.getAttribute("src");if(!l){a(new Error("Invalid data-src or src attribute"));return}if(Pe.indexOf(t)!==-1){Pe.splice(Pe.indexOf(t),1),t=null;return}Pe.push(t),t.setAttribute("src","");var u=i?Lb:Fb;u(l,o,function(f,c){if(!c){Pe.splice(Pe.indexOf(t),1),t=null,a(f);return}var d=t.getAttribute("id");d&&c.setAttribute("id",d);var h=t.getAttribute("title");h&&c.setAttribute("title",h);var p=t.getAttribute("width");p&&c.setAttribute("width",p);var g=t.getAttribute("height");g&&c.setAttribute("height",g);var y=Array.from(new Set(bi(bi(bi([],(c.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(t.getAttribute("class")||"").split(" "),!0))).join(" ").trim();c.setAttribute("class",y);var v=t.getAttribute("style");v&&c.setAttribute("style",v),c.setAttribute("data-src",l);var b=[].filter.call(t.attributes,function(Z){return/^data-\w[\w-]*$/.test(Z.name)});if(Array.prototype.forEach.call(b,function(Z){Z.name&&Z.value&&c.setAttribute(Z.name,Z.value)}),r){var x={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]},S,E,C,T,P;Object.keys(x).forEach(function(Z){S=Z,C=x[Z],E=c.querySelectorAll(S+"[id]");for(var We=function(Et,Ur){T=E[Et].id,P=T+"-"+Ib();var at;Array.prototype.forEach.call(C,function(Wr){at=c.querySelectorAll("["+Wr+'*="'+T+'"]');for(var En=0,ed=at.length;En<ed;En++){var Qo=at[En].getAttribute(Wr);Qo&&!Qo.match(new RegExp('url\\("?#'+T+'"?\\)'))||at[En].setAttribute(Wr,"url(#"+P+")")}});for(var Le=c.querySelectorAll("[*|href]"),Ct=[],kt=0,Ut=Le.length;kt<Ut;kt++){var lt=Le[kt].getAttributeNS(wi,"href");lt&<.toString()==="#"+E[Et].id&&Ct.push(Le[kt])}for(var Ee=0,Zo=Ct.length;Ee<Zo;Ee++)Ct[Ee].setAttributeNS(wi,"href","#"+P);E[Et].id=P},wt=0,D=E.length;wt<D;wt++)We(wt)})}c.removeAttribute("xmlns:a");for(var _=c.querySelectorAll("script"),G=[],U,$,X=0,z=_.length;X<z;X++)$=_[X].getAttribute("type"),(!$||$==="application/ecmascript"||$==="application/javascript"||$==="text/javascript")&&(U=_[X].innerText||_[X].textContent,U&&G.push(U),c.removeChild(_[X]));if(G.length>0&&(n==="always"||n==="once"&&!Cl[l])){for(var re=0,H=G.length;re<H;re++)new Function(G[re])(window);Cl[l]=!0}var Te=c.querySelectorAll("style");if(Array.prototype.forEach.call(Te,function(Z){Z.textContent+=""}),c.setAttribute("xmlns",Nb),c.setAttribute("xmlns:xlink",wi),s(c),!t.parentNode){Pe.splice(Pe.indexOf(t),1),t=null,a(new Error("Parent node is null"));return}t.parentNode.replaceChild(c,t),Pe.splice(Pe.indexOf(t),1),t=null,a(null,c)})},Bb=function(t,n){var r=n===void 0?{}:n,i=r.afterAll,o=i===void 0?function(){}:i,s=r.afterEach,a=s===void 0?function(){}:s,l=r.beforeEach,u=l===void 0?function(){}:l,f=r.cacheRequests,c=f===void 0?!0:f,d=r.evalScripts,h=d===void 0?"never":d,p=r.httpRequestWithCredentials,g=p===void 0?!1:p,y=r.renumerateIRIElements,v=y===void 0?!0:y;if(t&&"length"in t)for(var b=0,x=0,S=t.length;x<S;x++)kl(t[x],h,v,c,g,u,function(E,C){a(E,C),t&&"length"in t&&t.length===++b&&o(b)});else t?kl(t,h,v,c,g,u,function(E,C){a(E,C),o(1),t=null}):o(0)},$b=function(t){var n=(t==null?void 0:t.ownerDocument)||document;return n.defaultView||window},zb=function(t,n){for(var r in t)if(!(r in n))return!0;for(var i in n)if(t[i]!==n[i])return!0;return!1},Ub=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],Vn="http://www.w3.org/2000/svg",Tl="http://www.w3.org/1999/xlink",Yo=function(e){qf(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o))||this,r.initialState={hasError:!1,isLoading:!0},r.state=r.initialState,r._isMounted=!1,r.reactWrapper=void 0,r.nonReactWrapper=void 0,r.refCallback=function(a){r.reactWrapper=a},r}var n=t.prototype;return n.renderSVG=function(){var i=this;if(this.reactWrapper instanceof $b(this.reactWrapper).Node){var o=this.props,s=o.desc,a=o.evalScripts,l=o.httpRequestWithCredentials,u=o.renumerateIRIElements,f=o.src,c=o.title,d=o.useRequestCache,h=this.props.onError,p=this.props.beforeInjection,g=this.props.afterInjection,y=this.props.wrapper,v,b;y==="svg"?(v=document.createElementNS(Vn,y),v.setAttribute("xmlns",Vn),v.setAttribute("xmlns:xlink",Tl),b=document.createElementNS(Vn,y)):(v=document.createElement(y),b=document.createElement(y)),v.appendChild(b),b.dataset.src=f,this.nonReactWrapper=this.reactWrapper.appendChild(v);var x=function(T){if(i.removeSVG(),!i._isMounted){h(T);return}i.setState(function(){return{hasError:!0,isLoading:!1}},function(){h(T)})},S=function(T,P){if(T){x(T);return}i._isMounted&&i.setState(function(){return{isLoading:!1}},function(){try{g(P)}catch(_){x(_)}})},E=function(T){if(T.setAttribute("role","img"),s){var P=T.querySelector(":scope > desc");P&&T.removeChild(P);var _=document.createElement("desc");_.innerHTML=s,T.prepend(_)}if(c){var G=T.querySelector(":scope > title");G&&T.removeChild(G);var U=document.createElement("title");U.innerHTML=c,T.prepend(U)}try{p(T)}catch($){x($)}};Bb(b,{afterEach:S,beforeEach:E,cacheRequests:d,evalScripts:a,httpRequestWithCredentials:l,renumerateIRIElements:u})}},n.removeSVG=function(){var i;(i=this.nonReactWrapper)!=null&&i.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},n.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},n.componentDidUpdate=function(i){var o=this;zb(It({},i),this.props)&&this.setState(function(){return o.initialState},function(){o.removeSVG(),o.renderSVG()})},n.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},n.render=function(){var i=this.props;i.afterInjection,i.beforeInjection,i.desc,i.evalScripts;var o=i.fallback;i.httpRequestWithCredentials;var s=i.loading;i.renumerateIRIElements,i.src,i.title,i.useRequestCache;var a=i.wrapper,l=Ko(i,Ub),u=a;return m.reactExports.createElement(u,It({},l,{ref:this.refCallback},a==="svg"?{xmlns:Vn,xmlnsXlink:Tl}:{}),this.state.isLoading&&s&&m.reactExports.createElement(s,null),this.state.hasError&&o&&m.reactExports.createElement(o,null))},t}(m.reactExports.Component);Yo.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};Yo.propTypes={afterInjection:K.func,beforeInjection:K.func,desc:K.string,evalScripts:K.oneOf(["always","once","never"]),fallback:K.oneOfType([K.func,K.object,K.string]),httpRequestWithCredentials:K.bool,loading:K.oneOfType([K.func,K.object,K.string]),onError:K.func,renumerateIRIElements:K.bool,src:K.string.isRequired,title:K.string,useRequestCache:K.bool,wrapper:K.oneOf(["div","span","svg"])};function Wb(e){return m.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...e,children:m.jsxRuntimeExports.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 Hb(e){const{renderChildren:t,parentRef:n,onlyChild:r}=e,[i,o]=m.reactExports.useState({top:0,left:0}),s=m.reactExports.useRef(null),[a,l]=m.reactExports.useState("auto");return m.reactExports.useLayoutEffect(()=>{if(n.current&&s.current){const u=n.current.getBoundingClientRect(),f=s.current.getBoundingClientRect();let c=u.top;const d=u.left+u.width,h=f.height+(window.innerHeight-u.top)>window.innerHeight;h&&(console.log("overtop"),l(window.innerHeight-u.top-50)),u.top+f.height>window.innerHeight&&!h&&(c=u.top-f.height+u.height),o({top:c,left:d})}},[n,s]),r?t({maxHeight:a}):m.reactDomExports.createPortal(m.jsxRuntimeExports.jsx("div",{ref:s,style:{position:"fixed",top:i.top,left:i.left,zIndex:1200},children:t({maxHeight:a})}),n.current)}function qb(e){const{children:t,title:n,hasTooltip:r}=e,i=m.reactExports.useRef(),[o,s]=m.reactExports.useState(!1),[a,l]=m.reactExports.useState({top:0,left:0});return m.jsxRuntimeExports.jsxs("div",{className:"tooltip-item__wrapper",onMouseOver:()=>{if(s(!0),i.current){const u=i.current.getBoundingClientRect();l({top:u.top-20,left:u.left})}},onMouseLeave:()=>s(!1),ref:i,children:[m.jsxRuntimeExports.jsx("div",{children:t}),o&&r&&m.jsxRuntimeExports.jsx("div",{className:"tooltip-item__content",style:{position:"fixed",background:"#85858A",borderRadius:"4px",color:"#fff",padding:"4px 8px",top:a.top,left:a.left,zIndex:1400,fontSize:"10px",transition:"all 0.2s ease-in-out",animation:"fadeIn 0.2s ease-in-out",pointerEvents:"none"},children:n})]})}function Gb(e,t){return t?e:void 0}function Kf({item:e,level:t=0,...n}){var U,$,X;const{isActive:r,isCollapsed:i,expanded:o,toggleExpand:s}=n,a=`level-${t}`,l=i?"collapsed":"expanded",u=r(e.id)?"active":"",f=(z,re=a)=>`${z} ${re} ${l} ${u}`,c=!!((U=e.children)!=null&&U.length),[d,h]=m.reactExports.useState(!1),p=m.reactExports.useRef(),g=window.location.origin,y=e.path&&e.path.includes("http")?new URL(e.path):{origin:"",pathname:""},v=window.location.pathname.split("/")[1],b=y.pathname.split("/")[1],x=n.ssr||!g.includes("local")&&g!==y.origin||b!==v,S=c||t===0?"div":x?"a":Cb,E=e.path||"#",C=t+1,T=c&&!(i&&C>=2&&!d),P=i||t===0?void 0:`${t}rem`,_=()=>{h(!0)},G=()=>{h(!1)};return m.jsxRuntimeExports.jsxs("div",{ref:p,className:f("menu-item__wrapper"),onMouseOver:_,onMouseOut:G,children:[m.jsxRuntimeExports.jsx(qb,{hasTooltip:i&&t===1,children:m.jsxRuntimeExports.jsxs(S,{to:E,href:E,className:f("menu-item__link"),style:{paddingLeft:P,transition:"all 0.3s",color:r(e.id)?(($=n.brandColors)==null?void 0:$.primary400)||Vt.primary400:void 0,backgroundColor:r(e.id)&&t===1?(X=n.brandColors)==null?void 0:X.primary200:void 0},onClick:z=>{c&&(z.preventDefault(),i||s(e.id))},children:[t!==0&&m.jsxRuntimeExports.jsx(Xb,{cls:f,item:e}),m.jsxRuntimeExports.jsx("span",{className:f("menu-item__label"),children:e.name}),c&&m.jsxRuntimeExports.jsx("div",{className:f("menu-item__icon-arrow__wrapper"),children:m.jsxRuntimeExports.jsx(Wb,{className:f(`menu-item__icon-arrow__icon ${o(e.id)?"open":"close"}`)})})]}),title:e.name}),T&&m.jsxRuntimeExports.jsx(Hb,{parentRef:p,onlyChild:!i||i&&C<2,renderChildren:({maxHeight:z})=>{var re;return m.jsxRuntimeExports.jsx(Jx.div,{className:f(`menu-item__dropdown ${o(e.id)?"menu-item__dropdown--open":"menu-item__dropdown--close"}`,`level-${C}`),initial:{height:i||o(e.id)?"auto":0},animate:{height:i||o(e.id)?"auto":0},transition:{duration:.25},style:Gb({maxHeight:z,overflowY:"auto",paddingRight:3},z!=="auto"&&!!C),children:(re=e.children)==null?void 0:re.map(H=>m.reactExports.createElement(Kf,{...n,key:H.id,item:H,level:C}))})}})]})}function Xb({item:e,cls:t}){var s,a;const[n,r]=m.reactExports.useState(!e.icon),i=()=>{r(!0)},o=(s=e.icon)==null?void 0:s.endsWith(".svg");return m.jsxRuntimeExports.jsx("div",{className:t("menu-item__icon"),children:n?m.jsxRuntimeExports.jsx("div",{style:{width:24,height:24,backgroundColor:"#dadada",borderRadius:"5px",display:"flex",justifyContent:"center",alignItems:"center"},children:(a=e.name.trim().at(0))==null?void 0:a.toUpperCase()}):o?m.jsxRuntimeExports.jsx(Yo,{src:e.icon,beforeInjection:l=>{l.setAttribute("style","margin: 0 auto;"),l.querySelectorAll("path").forEach(f=>{f.hasAttribute("fill")&&f.setAttribute("fill","currentColor"),f.hasAttribute("stroke")&&f.setAttribute("stroke","currentColor")})}}):m.jsxRuntimeExports.jsx("img",{src:e.icon||"/",alt:" ",style:{height:24,maxHeight:24},onError:i})})}function Kb(){return m.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",children:m.jsxRuntimeExports.jsx("path",{d:"M21 18v2H3v-2h18zM6.596 3.903L8.01 5.318 4.828 8.5 8.01 11.68l-1.414 1.415L2 8.5l4.596-4.597zM21 11v2h-9v-2h9zm0-7v2h-9V4h9z"})})}function Yb(){return m.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",children:m.jsxRuntimeExports.jsx("path",{d:"M3 4h18v2H3V4zm0 7h18v2H3v-2zm0 7h18v2H3v-2z"})})}function Jb(e){return m.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"20",fill:"none",viewBox:"0 0 18 20",...e,children:m.jsxRuntimeExports.jsx("path",{fill:"#E01B00",fillRule:"evenodd",d:"M.179 2.875A2.375 2.375 0 012.554.5h3.393a1.018 1.018 0 010 2.036H2.554a.34.34 0 00-.34.339v14.25c0 .187.152.34.34.34h3.393a1.018 1.018 0 110 2.035H2.554a2.375 2.375 0 01-2.375-2.375V2.875zm14.167 6.107h-7.72a1.018 1.018 0 000 2.036h7.72l-2.673 2.673a1.018 1.018 0 101.44 1.44l4.41-4.411a1.018 1.018 0 000-1.44l-4.41-4.41a1.018 1.018 0 10-1.44 1.439l2.673 2.673z",clipRule:"evenodd"})})}const Zb=`.wrap-section{padding:0 8px;transition:all .3s}.wrap-section.collapsed{padding:0 4px}.side-bar{display:flex;flex-direction:column;max-width:18rem;height:calc(100vh - 64px);border-right:1px solid #ddd;background-color:#fafafa;transition:all .3s}.side-bar.expanded{width:17rem}.side-bar.collapsed{width:64px}.side-bar__wrap-btn-logout,.side-bar__btn-logout{margin:40px 0}.side-bar__logout-btn__text{margin-left:12px;font-size:.875rem;opacity:1}.side-bar__logout-btn__text.collapsed{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}.side-bar__wrapper-toggle-btn.collapsed{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}.side-bar__logout-btn:hover{background-color:#919eab14}.side-bar__icon-logout{flex-shrink:0}.menu-item__wrapper{display:flex;flex-direction:column;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.collapsed.level-1{padding-left:calc(.5rem + 7.665px)!important}.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.level-0{height:37px}.menu-item__link.menu-item__link.collapsed.level-0{padding:0;height:0;transition:all .15s}.menu-item__icon{width:1.5rem;height:1.5rem;flex-shrink:0;display:grid;place-items:center}.menu-item__icon.collapsed.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.collapsed{text-overflow:unset}.menu-item__label.active{color:inherit}.menu-item__label.collapsed{margin-left:8px;font-size:.75rem;line-height:1rem}.menu-item__label.collapsed.level-0,.menu-item__label.collapsed.level-1{font-size:.875rem;opacity:0;transition-delay:.15s}.menu-item__label.level-0{color:#85858a;margin-left:0}.menu-item__icon-arrow__wrapper{display:grid;place-items:center;position:absolute;top:50%;transform:translateY(-50%);right:0}.menu-item__icon-arrow__wrapper.expanded{right:4px}.menu-item__icon-arrow__wrapper.level-0.collapsed{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.expanded.open{transform:rotate(0)!important}.menu-item__dropdown.collapsed{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::-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.expanded.menu-item__dropdown--close{margin-top:0;transition:margin-top .3s}.menu-item__dropdown:first-of-type{margin-top:0}.menu-item__dropdown>*:first-child{margin-top:0}.menu-item__dropdown.collapsed .menu-item__link{height:40px}.menu-item__dropdown.collapsed .menu-item__link.level-1{height:48px}.menu-item__dropdown.collapsed.level-1{width:auto;max-width:unset;box-shadow:none;border:none;padding:0;background-color:unset}.menu-item__dropdown.expanded{overflow:hidden}.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.collapsed .simplebar-track.simplebar-vertical{display:none}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}
|
|
67
67
|
`,Pl=localStorage.getItem("isCollapsed");function Qb(e){const{baseUrl:t,menuPath:n}=e,r=zr(),[i,o]=m.reactExports.useState([]),[s,a]=m.reactExports.useState(Pl===null?!0:Pl==="true"),[l,u]=m.reactExports.useState({}),f=Jo(i),[c,d]=m.reactExports.useState(window.location.href);m.reactExports.useEffect(()=>{d(window.location.href)},[r]);const h=Yf(f,c).filter(E=>E.parentKey!==0);console.log("matchPaths:",c,r,h);const p=E=>{u({...l,[E]:!l[E]})},g=()=>{a(!s),localStorage.setItem("isCollapsed",JSON.stringify(!s))};m.reactExports.useLayoutEffect(()=>{(async()=>{var C,T;try{const _=t+(n||"/global-menu-config/api/v1/menu-items/user"),{data:G}=await Kl.get(_,{withCredentials:!0});let U=G.map(X=>({...X,parentKey:0}));U=Zf(U),e.replacePath&&(U=Jf(U,e.replacePath));const $=tw(U);u($),o(U)}catch(P){console.log(P),hc(((T=(C=P.response)==null?void 0:C.data)==null?void 0:T.errorMessage)||"Have error when get menu items")}})()},[t,n,e.replacePath]);const[y,v]=m.reactExports.useState(!1),b=s?"collapsed":"expanded",x=E=>`${E} ${b}`,S=m.reactExports.useRef(null);return m.jsxRuntimeExports.jsxs("div",{className:x("side-bar"),children:[m.jsxRuntimeExports.jsx("div",{className:x("wrap-section side-bar__wrapper-toggle-btn"),children:m.jsxRuntimeExports.jsx("button",{className:"icon-btn side-bar__toggle-btn",onClick:g,children:s?m.jsxRuntimeExports.jsx(Yb,{}):m.jsxRuntimeExports.jsx(Kb,{})})}),m.jsxRuntimeExports.jsx(ou,{ref:S,className:x("wrap-section side-bar__menu"),style:{marginTop:24,flex:1,overflow:"auto",height:"100%",overflowX:"hidden"},children:i.map(E=>{const C=T=>h.some(P=>P.id===T);return m.jsxRuntimeExports.jsx(Kf,{item:E,isActive:C,isCollapsed:s,expanded:T=>l[T],toggleExpand:p,replacePath:e.replacePath,ssr:e.ssr,brandColors:e.brandColors},E.id)})}),m.jsxRuntimeExports.jsxs("div",{className:x("wrap-section side-bar__wrap-btn-logout"),children:[m.jsxRuntimeExports.jsxs("button",{className:x("side-bar__logout-btn"),onClick:()=>v(!0),children:[m.jsxRuntimeExports.jsx(Jb,{className:x("side-bar__icon-logout")}),m.jsxRuntimeExports.jsx("span",{className:x("side-bar__logout-btn__text"),children:"Logout"})]}),m.jsxRuntimeExports.jsx(su,{isOpen:y,onClose:()=>v(!1),onConfirm:()=>e.logout?e.logout():rp(e.baseUrl)})]})]})}function Jo(e){let t=[];for(const n of e)t.push(n),n.children&&(t=t.concat(Jo(n.children)));return t}function ew(e,t){const n=new URL(e).searchParams,r=new URL(t).searchParams;return Array.from(r).filter(([i,o])=>o===n.get(i)).length}function Yf(e,t){const n=new URL(t),r=e.filter(s=>s.path&&s.path.includes("http")).map(s=>({item:s,itemUrl:new URL(s.path),matchingParamsCount:ew(t,s.path)})).sort((s,a)=>{const l=new URL(s.itemUrl).searchParams,u=new URL(a.itemUrl).searchParams;return Array.from(l).length-Array.from(u).length}).filter(({itemUrl:s})=>n.origin===s.origin).filter(({itemUrl:s})=>n.pathname===s.pathname).sort((s,a)=>a.matchingParamsCount-s.matchingParamsCount);let i=r.length>0?r[0].item:null;console.log("matchingItems:",r);let o=[];for(;i;)o=[i,...o],i=e.find(s=>s.id===(i==null?void 0:i.parentKey))||null;return o}function Jf(e,t){return e.map(n=>(n.path&&(n.path=t(n.path)),n.children&&n.children.length>0&&(n.children=Jf(n.children,t)),n))}function Zf(e){return e.map(n=>n.path&&!n.path.includes("http")&&n.path.includes("/")?{...n,path:window.location.origin+n.path}:(n.children&&(n.children=Zf(n.children)),n))}function tw(e){const t=Jo(e),n=Yf(t,window.location.href),r={};return n.forEach(i=>r[i.id]=!0),t.forEach(i=>{i.parentKey||(r[i.id]=!0)}),r}function Qf(e){return m.jsxRuntimeExports.jsx(uc,{styles:[ep,Zb],style:{position:"sticky",zIndex:20},children:m.jsxRuntimeExports.jsx(Qb,{...e})})}function nw(e){return m.jsxRuntimeExports.jsx(wb,{children:m.jsxRuntimeExports.jsx(Qf,{...e,ssr:!0})})}{const e=m.s(nw,{props:{baseUrl:"string",menuPath:"string",logout:"function",replacePath:"function",ssr:"boolean",brandColors:"json"}});customElements.define("global-menu",e)}exports.ERROR_MESSAGE=tp;exports.GlobalMenu=Qf;exports.LogoutConfirmModal=su;exports.ShadowDomWrapper=uc;exports._extends=It;exports._extends$1=Pb;exports._inheritsLoose=qf;exports._objectWithoutPropertiesLoose=Ko;exports.axios=Kl;exports.color=Vt;exports.login=np;exports.notify=Ng;exports.objectWithoutPropertiesLoose=Tb;exports.pushError=hc;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as z, r as Q, R as eg, g as _r, a as Js, c as ha, b as Ix, d as Rx, s as rm } from "./react-to-web-component-469d91d4.js";
|
|
2
|
-
import { c as ns, _ as Le, a as nr, b as Px, o as Nx, d as Lx, e as ho, p as po, n as $x, l as tg, E as Fx, S as Yx, L as Bx } from "./index-
|
|
2
|
+
import { c as ns, _ as Le, a as nr, b as Px, o as Nx, d as Lx, e as ho, p as po, n as $x, l as tg, E as Fx, S as Yx, L as Bx } from "./index-9b0d9ee5.js";
|
|
3
3
|
import { _ as Wx, t as jx, I as Hx, i as Ux, L as $f } from "./index-b3659f2e.js";
|
|
4
4
|
function im(e) {
|
|
5
5
|
var t, r, a = "";
|
|
@@ -10327,8 +10327,10 @@ function qb(e) {
|
|
|
10327
10327
|
const { renderChildren: t, parentRef: n, onlyChild: r } = e, [i, o] = x.useState({ top: 0, left: 0 }), s = x.useRef(null), [a, l] = x.useState("auto");
|
|
10328
10328
|
return x.useLayoutEffect(() => {
|
|
10329
10329
|
if (n.current && s.current) {
|
|
10330
|
-
const u = n.current.getBoundingClientRect(), f = s.current.getBoundingClientRect()
|
|
10331
|
-
|
|
10330
|
+
const u = n.current.getBoundingClientRect(), f = s.current.getBoundingClientRect();
|
|
10331
|
+
let c = u.top;
|
|
10332
|
+
const d = u.left + u.width, h = f.height + (window.innerHeight - u.top) > window.innerHeight;
|
|
10333
|
+
h && (console.log("overtop"), l(window.innerHeight - u.top - 50)), u.top + f.height > window.innerHeight && !h && (c = u.top - f.height + u.height), o({
|
|
10332
10334
|
top: c,
|
|
10333
10335
|
left: d
|
|
10334
10336
|
});
|
|
@@ -10402,9 +10404,7 @@ function Xb(e, t) {
|
|
|
10402
10404
|
}
|
|
10403
10405
|
function Xf({ item: e, level: t = 0, ...n }) {
|
|
10404
10406
|
var W, z, K;
|
|
10405
|
-
const { isActive: r, isCollapsed: i, expanded: o, toggleExpand: s } = n, a = `level-${t}`, l = i ? "collapsed" : "expanded", u = r(e.id) ? "active" : "", f = (U, ie = a) => `${U} ${ie} ${l} ${u}`, c = !!((W = e.children) != null && W.length), [d, h] = x.useState(!1), p = x.useRef(), m = window.location.origin, g = e.path && e.path.includes("http") ? new URL(e.path) : { origin: "", pathname: "" }, y = window.location.pathname.split("/")[1], b = g.pathname.split("/")[1], v = n.ssr || !m.includes("local") && m !== g.origin || b !== y, S = c || t === 0 ? "div" : v ? "a" : Tb, E = e.path || "#", C = t + 1, T = c && !(i && C >= 2 && !d), P = i || t === 0 ? void 0 : `${t}rem
|
|
10406
|
-
console.log("hasDropdown:", T);
|
|
10407
|
-
const M = () => {
|
|
10407
|
+
const { isActive: r, isCollapsed: i, expanded: o, toggleExpand: s } = n, a = `level-${t}`, l = i ? "collapsed" : "expanded", u = r(e.id) ? "active" : "", f = (U, ie = a) => `${U} ${ie} ${l} ${u}`, c = !!((W = e.children) != null && W.length), [d, h] = x.useState(!1), p = x.useRef(), m = window.location.origin, g = e.path && e.path.includes("http") ? new URL(e.path) : { origin: "", pathname: "" }, y = window.location.pathname.split("/")[1], b = g.pathname.split("/")[1], v = n.ssr || !m.includes("local") && m !== g.origin || b !== y, S = c || t === 0 ? "div" : v ? "a" : Tb, E = e.path || "#", C = t + 1, T = c && !(i && C >= 2 && !d), P = i || t === 0 ? void 0 : `${t}rem`, M = () => {
|
|
10408
10408
|
h(!0);
|
|
10409
10409
|
}, X = () => {
|
|
10410
10410
|
h(!1);
|