@ukpc-lib/react 0.16.14-sandbox.saas-11181.patch-2 → 0.16.15-sandbox.atechops-2707.patch-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.js +2 -2
- package/dist/{index.esm2017-JagIQVVx.js → index.esm2017-LkE38fXY.js} +1510 -1510
- package/dist/{index.esm2017-jgcjblYP.cjs → index.esm2017-cRBu24nr.cjs} +1 -1
- package/dist/share/index.cjs +1 -1
- package/dist/share/index.js +2 -2
- package/package.json +1 -1
- package/web-components-bundle/{SaasThemeProvider-A_eMJWqw.js → SaasThemeProvider-DUpoV8xb.js} +1 -1
- package/web-components-bundle/access-denied/index.js +2 -2
- package/web-components-bundle/base-breadcrumbs/index.js +3 -3
- package/web-components-bundle/favorite-menu/index.js +7 -7
- package/web-components-bundle/global-menu/index.js +6 -6
- package/web-components-bundle/global-topbar/index.js +7 -7
- package/web-components-bundle/has-permission/index.js +2 -2
- package/web-components-bundle/{index-760z9lEs.js → index-BBl8HzU3.js} +565 -565
- package/web-components-bundle/{index-C6qk-7Ck.js → index-CX8kHN1R.js} +1673 -1673
- package/web-components-bundle/{index-CiYHK3Rq.js → index-Ch-015PG.js} +1 -1
- package/web-components-bundle/{index-BwEhsh9S.js → index-N6zjI_u_.js} +2 -2
- package/web-components-bundle/page-not-found/index.js +3 -3
- package/web-components-bundle/{react-to-web-component-BOygDorD.js → react-to-web-component-w5r1Fs9q.js} +1527 -1535
- package/web-components-bundle/{react-toastify.esm-DnABvuky.js → react-toastify.esm-H_Xdunfj.js} +1 -1
- package/web-components-bundle/toast-config/index.js +2 -2
- package/web-components-bundle/toast-config-notification/index.js +2 -2
|
@@ -133,7 +133,7 @@ Previous: %s
|
|
|
133
133
|
Incoming: %s`,Zi,"["+v.join(", ")+"]","["+l.join(", ")+"]");for(var d=0;d<l.length&&d<v.length;d++)if(!qt(v[d],l[d]))return!1;return!0}function Vu(){if(To>0)throw new Error("Rendered more hooks than during the previous render");return{memoizedState:null,queue:null,next:null}}function Si(){return Zt===null?zs===null?(gs=!1,zs=Zt=Vu()):(gs=!0,Zt=zs):Zt.next===null?(gs=!1,Zt=Zt.next=Vu()):(gs=!0,Zt=Zt.next),Zt}function Uu(v,l){wi=l,Ta=v,Ur=!1,ri=0}function Gs(v,l,d,m){for(;nl;)nl=!1,ri=0,To+=1,Zt=null,d=v(l,m);return Hu(),d}function Hr(){var v=ri!==0;return v}function Hu(){Ur=!1,wi=null,Ta=null,nl=!1,zs=null,To=0,xi=null,Zt=null}function Wu(v){return Ur&&i("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),Sa(v)}function zu(v){return Zi="useContext",Ys(),Sa(v)}function qs(v,l){return typeof l=="function"?l(v):l}function ms(v){return Zi="useState",Yu(qs,v)}function Yu(v,l,d){if(v!==qs&&(Zi="useReducer"),wi=Ys(),Zt=Si(),gs){var m=Zt.queue,S=m.dispatch;if(xi!==null){var _=xi.get(m);if(_!==void 0){xi.delete(m);var B=Zt.memoizedState,Y=_;do{var re=Y.action;Ur=!0,B=v(B,re),Ur=!1,Y=Y.next}while(Y!==null);return Zt.memoizedState=B,[B,S]}}return[Zt.memoizedState,S]}else{Ur=!0;var Se;v===qs?Se=typeof l=="function"?l():l:Se=d!==void 0?d(l):l,Ur=!1,Zt.memoizedState=Se;var $e=Zt.queue={last:null,dispatch:null},Xe=$e.dispatch=Uc.bind(null,wi,$e);return[Zt.memoizedState,Xe]}}function Vc(v,l){wi=Ys(),Zt=Si();var d=l===void 0?null:l;if(Zt!==null){var m=Zt.memoizedState;if(m!==null&&d!==null){var S=m[1];if($c(d,S))return m[0]}}Ur=!0;var _=v();return Ur=!1,Zt.memoizedState=[_,d],_}function Vl(v){wi=Ys(),Zt=Si();var l=Zt.memoizedState;if(l===null){var d={current:v};return Object.seal(d),Zt.memoizedState=d,d}else return l}function Kf(v,l){Zi="useLayoutEffect",i("useLayoutEffect does nothing on the server, because its effect cannot be encoded into the server renderer's output format. This will lead to a mismatch between the initial, non-hydrated UI and the intended UI. To avoid this, useLayoutEffect should only be used in components that render exclusively on the client. See https://reactjs.org/link/uselayouteffect-ssr for common fixes.")}function Uc(v,l,d){if(To>=$u)throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(v===wi){nl=!0;var m={action:d,next:null};xi===null&&(xi=new Map);var S=xi.get(l);if(S===void 0)xi.set(l,m);else{for(var _=S;_.next!==null;)_=_.next;_.next=m}}}function hr(v,l){return Vc(function(){return v},l)}function Gu(v,l,d){return Ys(),l(v._source)}function Hc(v,l,d){if(d===void 0)throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");return d()}function Ti(v){return Ys(),v}function Ul(){throw new Error("startTransition cannot be called during server rendering.")}function Ca(){return Ys(),[!1,Ul]}function vs(){var v=Ta,l=Ho(v.treeContext),d=Xs;if(d===null)throw new Error("Invalid hook call. Hooks can only be called inside of the body of a function component.");var m=ri++;return jn(d,l,m)}function rl(){}var ir={readContext:Wu,useContext:zu,useMemo:Vc,useReducer:Yu,useRef:Vl,useState:ms,useInsertionEffect:rl,useLayoutEffect:Kf,useCallback:hr,useImperativeHandle:rl,useEffect:rl,useDebugValue:rl,useDeferredValue:Ti,useTransition:Ca,useId:vs,useMutableSource:Gu,useSyncExternalStore:Hc},Xs=null;function Hl(v){Xs=v}function Ea(v){try{var l="",d=v;do{switch(d.tag){case 0:l+=Ki(d.type,null,null);break;case 1:l+=va(d.type,null,null);break;case 2:l+=Mc(d.type,null,null);break}d=d.parent}while(d);return l}catch(m){return`
|
|
134
134
|
Error generating stack: `+m.message+`
|
|
135
135
|
`+m.stack}}var Wl=n.ReactCurrentDispatcher,ka=n.ReactDebugCurrentFrame,zl=0,Co=1,Yl=2,Ks=3,Wc=4,il=0,Da=1,Pa=2,qu=12800;function zc(v){return console.error(v),null}function Zs(){}function Gl(v,l,d,m,S,_,B,Y,re){var Se=[],$e=new Set,Xe={destination:null,responseState:l,progressiveChunkSize:m===void 0?qu:m,status:il,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:$e,pingedTasks:Se,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:S===void 0?zc:S,onAllReady:_===void 0?Zs:_,onShellReady:B===void 0?Zs:B,onShellError:Y===void 0?Zs:Y,onFatalError:re===void 0?Zs:re},rt=ol(Xe,0,null,d,!1,!1);rt.parentFlushed=!0;var xt=zo(Xe,v,null,rt,$e,qn,Fl,Yf);return Se.push(xt),Xe}function Wo(v,l){var d=v.pingedTasks;d.push(l),d.length===1&&a(function(){return tc(v)})}function ql(v,l){return{id:Ri,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:l,errorDigest:null}}function zo(v,l,d,m,S,_,B,Y){v.allPendingTasks++,d===null?v.pendingRootTasks++:d.pendingTasks++;var re={node:l,ping:function(){return Wo(v,re)},blockedBoundary:d,blockedSegment:m,abortSet:S,legacyContext:_,context:B,treeContext:Y};return re.componentStack=null,S.add(re),re}function ol(v,l,d,m,S,_){return{status:zl,id:-1,index:l,parentFlushed:!1,chunks:[],children:[],formatContext:m,boundary:d,lastPushedText:S,textEmbedded:_}}var Ji=null;function Qi(){return Ji===null||Ji.componentStack===null?"":Ea(Ji.componentStack)}function Eo(v,l){v.componentStack={tag:0,parent:v.componentStack,type:l}}function sl(v,l){v.componentStack={tag:1,parent:v.componentStack,type:l}}function ys(v,l){v.componentStack={tag:2,parent:v.componentStack,type:l}}function eo(v){v.componentStack===null?i("Unexpectedly popped too many stack frames. This is a bug in React."):v.componentStack=v.componentStack.parent}var Oa=null;function Xl(v,l){{var d;typeof l=="string"?d=l:l&&typeof l.message=="string"?d=l.message:d=String(l);var m=Oa||Qi();Oa=null,v.errorMessage=d,v.errorComponentStack=m}}function al(v,l){var d=v.onError(l);if(d!=null&&typeof d!="string")throw new Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof d+'" instead');return d}function _a(v,l){var d=v.onShellError;d(l);var m=v.onFatalError;m(l),v.destination!==null?(v.status=Pa,H(v.destination,l)):(v.status=Da,v.fatalError=l)}function Yc(v,l,d){Eo(l,"Suspense");var m=l.blockedBoundary,S=l.blockedSegment,_=d.fallback,B=d.children,Y=new Set,re=ql(v,Y),Se=S.chunks.length,$e=ol(v,Se,re,S.formatContext,!1,!1);S.children.push($e),S.lastPushedText=!1;var Xe=ol(v,0,null,S.formatContext,!1,!1);Xe.parentFlushed=!0,l.blockedBoundary=re,l.blockedSegment=Xe;try{if(Ci(v,l,B),_n(Xe.chunks,v.responseState,Xe.lastPushedText,Xe.textEmbedded),Xe.status=Co,xs(re,Xe),re.pendingTasks===0){eo(l);return}}catch(xt){Xe.status=Wc,re.forceClientRender=!0,re.errorDigest=al(v,xt),Xl(re,xt)}finally{l.blockedBoundary=m,l.blockedSegment=S}var rt=zo(v,_,m,$e,Y,l.legacyContext,l.context,l.treeContext);rt.componentStack=l.componentStack,v.pingedTasks.push(rt),eo(l)}function Xu(v,l,d,m){Eo(l,d);var S=l.blockedSegment,_=fo(S.chunks,d,m,v.responseState,S.formatContext);S.lastPushedText=!1;var B=S.formatContext;S.formatContext=gi(B,d,m),Ci(v,l,_),S.formatContext=B,Lo(S.chunks,d),S.lastPushedText=!1,eo(l)}function Ku(v){return v.prototype&&v.prototype.isReactComponent}function Js(v,l,d,m,S){var _={};Uu(l,_);var B=d(m,S);return Gs(d,m,B,S)}function Zu(v,l,d,m,S){var _=d.render();d.props!==S&&(Zl||i("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",pn(m)||"a component"),Zl=!0);{var B=m.childContextTypes;if(B!=null){var Y=l.legacyContext,re=Mu(d,m,Y,B);l.legacyContext=re,pr(v,l,_),l.legacyContext=Y;return}}pr(v,l,_)}function Kl(v,l,d,m){ys(l,d);var S=cs(d,l.legacyContext),_=So(d,m,S);tl(_,d,m,S),Zu(v,l,_,d,m),eo(l)}var Bt={},ll={},Ju={},Qs={},Zl=!1,Gc={},qc=!1,ii=!1,Xc=!1;function Jl(v,l,d,m){var S;if(S=cs(d,l.legacyContext),sl(l,d),d.prototype&&typeof d.prototype.render=="function"){var _=pn(d)||"Unknown";Bt[_]||(i("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",_,_),Bt[_]=!0)}var B=Js(v,l,d,m,S),Y=Hr();if(typeof B=="object"&&B!==null&&typeof B.render=="function"&&B.$$typeof===void 0){var re=pn(d)||"Unknown";ll[re]||(i("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",re,re,re),ll[re]=!0)}if(typeof B=="object"&&B!==null&&typeof B.render=="function"&&B.$$typeof===void 0){{var Se=pn(d)||"Unknown";ll[Se]||(i("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",Se,Se,Se),ll[Se]=!0)}tl(B,d,m,S),Zu(v,l,B,d,m)}else if(Qu(d),Y){var $e=l.treeContext,Xe=1,rt=0;l.treeContext=ju($e,Xe,rt);try{pr(v,l,B)}finally{l.treeContext=$e}}else pr(v,l,B);eo(l)}function Qu(v){{if(v&&v.childContextTypes&&i("%s(...): childContextTypes cannot be defined on a function component.",v.displayName||v.name||"Component"),v.defaultProps!==void 0){var l=pn(v)||"Unknown";Gc[l]||(i("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",l),Gc[l]=!0)}if(typeof v.getDerivedStateFromProps=="function"){var d=pn(v)||"Unknown";Qs[d]||(i("%s: Function components do not support getDerivedStateFromProps.",d),Qs[d]=!0)}if(typeof v.contextType=="object"&&v.contextType!==null){var m=pn(v)||"Unknown";Ju[m]||(i("%s: Function components do not support contextType.",m),Ju[m]=!0)}}}function ec(v,l){if(v&&v.defaultProps){var d=J({},l),m=v.defaultProps;for(var S in m)d[S]===void 0&&(d[S]=m[S]);return d}return l}function Kc(v,l,d,m,S){sl(l,d.render);var _=Js(v,l,d.render,m,S),B=Hr();if(B){var Y=l.treeContext,re=1,Se=0;l.treeContext=ju(Y,re,Se);try{pr(v,l,_)}finally{l.treeContext=Y}}else pr(v,l,_);eo(l)}function Wr(v,l,d,m,S){var _=d.type,B=ec(_,m);ea(v,l,_,B,S)}function bs(v,l,d,m){d._context===void 0?d!==d.Consumer&&(Xc||(Xc=!0,i("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"))):d=d._context;var S=m.children;typeof S!="function"&&i("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it.");var _=Sa(d),B=S(_);pr(v,l,B)}function zr(v,l,d,m){var S=d._context,_=m.value,B=m.children,Y;Y=l.context,l.context=Lu(S,_),pr(v,l,B),l.context=Uf(S),Y!==l.context&&i("Popping the context provider did not return back to the original snapshot. This is a bug in React.")}function Zc(v,l,d,m,S){Eo(l,"Lazy");var _=d._payload,B=d._init,Y=B(_),re=ec(Y,m);ea(v,l,Y,re,S),eo(l)}function ea(v,l,d,m,S){if(typeof d=="function")if(Ku(d)){Kl(v,l,d,m);return}else{Jl(v,l,d,m);return}if(typeof d=="string"){Xu(v,l,d,m);return}switch(d){case Gn:case Vt:case Z:case ce:case Pe:{pr(v,l,m.children);return}case lt:{Eo(l,"SuspenseList"),pr(v,l,m.children),eo(l);return}case wt:throw new Error("ReactDOMServer does not yet support scope components.");case st:{Yc(v,l,m);return}}if(typeof d=="object"&&d!==null)switch(d.$$typeof){case Be:{Kc(v,l,d,m,S);return}case it:{Wr(v,l,d,m,S);return}case ue:{zr(v,l,d,m);return}case Ae:{bs(v,l,d,m);return}case At:{Zc(v,l,d,m);return}}var _="";throw(d===void 0||typeof d=="object"&&d!==null&&Object.keys(d).length===0)&&(_+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),new Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) "+("but got: "+(d==null?d:typeof d)+"."+_))}function Jc(v,l){typeof Symbol=="function"&&v[Symbol.toStringTag]==="Generator"&&(qc||i("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."),qc=!0),v.entries===l&&(ii||i("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),ii=!0)}function pr(v,l,d){try{return Qc(v,l,d)}catch(m){throw typeof m=="object"&&m!==null&&typeof m.then=="function"||(Oa=Oa!==null?Oa:Qi()),m}}function Qc(v,l,d){if(l.node=d,typeof d=="object"&&d!==null){switch(d.$$typeof){case de:{var m=d,S=m.type,_=m.props,B=m.ref;ea(v,l,S,_,B);return}case ke:throw new Error("Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.");case At:{var Y=d,re=Y._payload,Se=Y._init,$e;try{$e=Se(re)}catch(to){throw typeof to=="object"&&to!==null&&typeof to.then=="function"&&Eo(l,"Lazy"),to}pr(v,l,$e);return}}if(tr(d)){Ql(v,l,d);return}var Xe=$r(d);if(Xe){Jc(d,Xe);var rt=Xe.call(d);if(rt){var xt=rt.next();if(!xt.done){var en=[];do en.push(xt.value),xt=rt.next();while(!xt.done);Ql(v,l,en);return}return}}var or=Object.prototype.toString.call(d);throw new Error("Objects are not valid as a React child (found: "+(or==="[object Object]"?"object with keys {"+Object.keys(d).join(", ")+"}":or)+"). If you meant to render a collection of children, use an array instead.")}if(typeof d=="string"){var ko=l.blockedSegment;ko.lastPushedText=On(l.blockedSegment.chunks,d,v.responseState,ko.lastPushedText);return}if(typeof d=="number"){var Ss=l.blockedSegment;Ss.lastPushedText=On(l.blockedSegment.chunks,""+d,v.responseState,Ss.lastPushedText);return}typeof d=="function"&&i("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.")}function Ql(v,l,d){for(var m=d.length,S=0;S<m;S++){var _=l.treeContext;l.treeContext=ju(_,m,S);try{Ci(v,l,d[S])}finally{l.treeContext=_}}}function eu(v,l,d){var m=l.blockedSegment,S=m.chunks.length,_=ol(v,S,null,m.formatContext,m.lastPushedText,!0);m.children.push(_),m.lastPushedText=!1;var B=zo(v,l.node,l.blockedBoundary,_,l.abortSet,l.legacyContext,l.context,l.treeContext);l.componentStack!==null&&(B.componentStack=l.componentStack.parent);var Y=B.ping;d.then(Y,Y)}function Ci(v,l,d){var m=l.blockedSegment.formatContext,S=l.legacyContext,_=l.context,B=null;B=l.componentStack;try{return pr(v,l,d)}catch(Y){if(Hu(),typeof Y=="object"&&Y!==null&&typeof Y.then=="function"){eu(v,l,Y),l.blockedSegment.formatContext=m,l.legacyContext=S,l.context=_,hs(_),l.componentStack=B;return}else throw l.blockedSegment.formatContext=m,l.legacyContext=S,l.context=_,hs(_),l.componentStack=B,Y}}function ef(v,l,d,m){var S=al(v,m);if(l===null?_a(v,m):(l.pendingTasks--,l.forceClientRender||(l.forceClientRender=!0,l.errorDigest=S,Xl(l,m),l.parentFlushed&&v.clientRenderedBoundaries.push(l))),v.allPendingTasks--,v.allPendingTasks===0){var _=v.onAllReady;_()}}function ws(v){var l=this,d=v.blockedBoundary,m=v.blockedSegment;m.status=Ks,ta(l,d,m)}function tu(v,l,d){var m=v.blockedBoundary,S=v.blockedSegment;if(S.status=Ks,m===null)l.allPendingTasks--,l.status!==Pa&&(l.status=Pa,l.destination!==null&&A(l.destination));else{if(m.pendingTasks--,!m.forceClientRender){m.forceClientRender=!0;var _=d===void 0?new Error("The render was aborted by the server without a reason."):d;m.errorDigest=l.onError(_);{var B="The server did not finish this Suspense boundary: ";_&&typeof _.message=="string"?_=B+_.message:_=B+String(_);var Y=Ji;Ji=v;try{Xl(m,_)}finally{Ji=Y}}m.parentFlushed&&l.clientRenderedBoundaries.push(m)}if(m.fallbackAbortableTasks.forEach(function(Se){return tu(Se,l,d)}),m.fallbackAbortableTasks.clear(),l.allPendingTasks--,l.allPendingTasks===0){var re=l.onAllReady;re()}}}function xs(v,l){if(l.chunks.length===0&&l.children.length===1&&l.children[0].boundary===null){var d=l.children[0];d.id=l.id,d.parentFlushed=!0,d.status===Co&&xs(v,d)}else{var m=v.completedSegments;m.push(l)}}function ta(v,l,d){if(l===null){if(d.parentFlushed){if(v.completedRootSegment!==null)throw new Error("There can only be one root segment. This is a bug in React.");v.completedRootSegment=d}if(v.pendingRootTasks--,v.pendingRootTasks===0){v.onShellError=Zs;var m=v.onShellReady;m()}}else if(l.pendingTasks--,!l.forceClientRender){if(l.pendingTasks===0)d.parentFlushed&&d.status===Co&&xs(l,d),l.parentFlushed&&v.completedBoundaries.push(l),l.fallbackAbortableTasks.forEach(ws,v),l.fallbackAbortableTasks.clear();else if(d.parentFlushed&&d.status===Co){xs(l,d);var S=l.completedSegments;S.length===1&&l.parentFlushed&&v.partialBoundaries.push(l)}}if(v.allPendingTasks--,v.allPendingTasks===0){var _=v.onAllReady;_()}}function Zf(v,l){var d=l.blockedSegment;if(d.status===zl){hs(l.context);var m=null;m=Ji,Ji=l;try{pr(v,l,l.node),_n(d.chunks,v.responseState,d.lastPushedText,d.textEmbedded),l.abortSet.delete(l),d.status=Co,ta(v,l.blockedBoundary,d)}catch(_){if(Hu(),typeof _=="object"&&_!==null&&typeof _.then=="function"){var S=l.ping;_.then(S,S)}else l.abortSet.delete(l),d.status=Wc,ef(v,l.blockedBoundary,d,_)}finally{Ji=m}}}function tc(v){if(v.status!==Pa){var l=Fc(),d=Wl.current;Wl.current=ir;var m;m=ka.getCurrentStack,ka.getCurrentStack=Qi;var S=Xs;Hl(v.responseState);try{var _=v.pingedTasks,B;for(B=0;B<_.length;B++){var Y=_[B];Zf(v,Y)}_.splice(0,B),v.destination!==null&&Mi(v,v.destination)}catch(re){al(v,re),_a(v,re)}finally{Hl(S),Wl.current=d,ka.getCurrentStack=m,d===ir&&hs(l)}}}function ul(v,l,d){switch(d.parentFlushed=!0,d.status){case zl:{var m=d.id=v.nextSegmentId++;return d.lastPushedText=!1,d.textEmbedded=!1,dr(l,v.responseState,m)}case Co:{d.status=Yl;for(var S=!0,_=d.chunks,B=0,Y=d.children,re=0;re<Y.length;re++){for(var Se=Y[re];B<Se.index;B++)g(l,_[B]);S=cl(v,l,Se)}for(;B<_.length-1;B++)g(l,_[B]);return B<_.length&&(S=T(l,_[B])),S}default:throw new Error("Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React.")}}function cl(v,l,d){var m=d.boundary;if(m===null)return ul(v,l,d);if(m.parentFlushed=!0,m.forceClientRender)return Ue(l,v.responseState,m.errorDigest,m.errorMessage,m.errorComponentStack),ul(v,l,d),Et(l,v.responseState);if(m.pendingTasks>0){m.rootSegmentID=v.nextSegmentId++,m.completedSegments.length>0&&v.partialBoundaries.push(m);var S=m.id=nn(v.responseState);return Ee(l,v.responseState,S),ul(v,l,d),Tt(l,v.responseState)}else{if(m.byteSize>v.progressiveChunkSize)return m.rootSegmentID=v.nextSegmentId++,v.completedBoundaries.push(m),Ee(l,v.responseState,m.id),ul(v,l,d),Tt(l,v.responseState);Ie(l,v.responseState);var _=m.completedSegments;if(_.length!==1)throw new Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React.");var B=_[0];return cl(v,l,B),ot(l,v.responseState)}}function nc(v,l,d){return Il(l,v.responseState,d.id,d.errorDigest,d.errorMessage,d.errorComponentStack)}function nu(v,l,d){return St(l,v.responseState,d.formatContext,d.id),cl(v,l,d),vt(l,d.formatContext)}function rc(v,l,d){for(var m=d.completedSegments,S=0;S<m.length;S++){var _=m[S];Yr(v,l,d,_)}return m.length=0,vo(l,v.responseState,d.id,d.rootSegmentID)}function tf(v,l,d){for(var m=d.completedSegments,S=0;S<m.length;S++){var _=m[S];if(!Yr(v,l,d,_))return S++,m.splice(0,S),!1}return m.splice(0,S),!0}function Yr(v,l,d,m){if(m.status===Yl)return!0;var S=m.id;if(S===-1){var _=m.id=d.rootSegmentID;if(_===-1)throw new Error("A root segment ID must have been assigned by now. This is a bug in React.");return nu(v,l,m)}else return nu(v,l,m),Ya(l,v.responseState,S)}function Mi(v,l){y();try{var d=v.completedRootSegment;d!==null&&v.pendingRootTasks===0&&(cl(v,l,d),v.completedRootSegment=null,bi(l,v.responseState));var m=v.clientRenderedBoundaries,S;for(S=0;S<m.length;S++){var _=m[S];nc(v,l,_)}m.splice(0,S);var B=v.completedBoundaries;for(S=0;S<B.length;S++){var Y=B[S];rc(v,l,Y)}B.splice(0,S),E(l),y(l);var re=v.partialBoundaries;for(S=0;S<re.length;S++){var Se=re[S];if(!tf(v,l,Se)){v.destination=null,S++,re.splice(0,S);return}}re.splice(0,S);var $e=v.completedBoundaries;for(S=0;S<$e.length;S++){var Xe=$e[S];rc(v,l,Xe)}$e.splice(0,S)}finally{E(l),v.allPendingTasks===0&&v.pingedTasks.length===0&&v.clientRenderedBoundaries.length===0&&v.completedBoundaries.length===0&&(v.abortableTasks.size!==0&&i("There was still abortable task at the root when we closed. This is a bug in React."),A(l))}}function nf(v){a(function(){return tc(v)})}function Jf(v,l){if(v.status===Da){v.status=Pa,H(l,v.fatalError);return}if(v.status!==Pa&&v.destination===null){v.destination=l;try{Mi(v,l)}catch(d){al(v,d),_a(v,d)}}}function fl(v,l){try{var d=v.abortableTasks;d.forEach(function(m){return tu(m,v,l)}),d.clear(),v.destination!==null&&Mi(v,v.destination)}catch(m){al(v,m),_a(v,m)}}function Ra(v,l){return new Promise(function(d,m){var S,_,B=new Promise(function(rt,xt){_=rt,S=xt});function Y(){var rt=new ReadableStream({type:"bytes",pull:function(xt){Jf(Se,xt)},cancel:function(xt){fl(Se)}},{highWaterMark:0});rt.allReady=B,d(rt)}function re(rt){B.catch(function(){}),m(rt)}var Se=Gl(v,_i(l?l.identifierPrefix:void 0,l?l.nonce:void 0,l?l.bootstrapScriptContent:void 0,l?l.bootstrapScripts:void 0,l?l.bootstrapModules:void 0),pi(l?l.namespaceURI:void 0),l?l.progressiveChunkSize:void 0,l?l.onError:void 0,_,Y,re,S);if(l&&l.signal){var $e=l.signal,Xe=function(){fl(Se,$e.reason),$e.removeEventListener("abort",Xe)};$e.addEventListener("abort",Xe)}nf(Se)})}jh.renderToReadableStream=Ra,jh.version=e}()),jh}var Dc,Av;process.env.NODE_ENV==="production"?(Dc=t6(),Av=n6()):(Dc=r6(),Av=i6());Dc.version;var o6=Dc.renderToString;Dc.renderToStaticMarkup;Dc.renderToNodeStream;Dc.renderToStaticNodeStream;Av.renderToReadableStream;var s6=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function JD(t,e){return t(e={exports:{}},e.exports),e.exports}var a6=JD(function(t){(function(e){var n=function(F,R,H){if(!f(R)||y(R)||g(R)||T(R)||c(R))return R;var U,ne=0,q=0;if(p(R))for(U=[],q=R.length;ne<q;ne++)U.push(n(F,R[ne],H));else for(var ie in U={},R)Object.prototype.hasOwnProperty.call(R,ie)&&(U[F(ie,H)]=n(F,R[ie],H));return U},r=function(F){return E(F)?F:(F=F.replace(/[\-_\s]+(.)?/g,function(R,H){return H?H.toUpperCase():""})).substr(0,1).toLowerCase()+F.substr(1)},i=function(F){var R=r(F);return R.substr(0,1).toUpperCase()+R.substr(1)},o=function(F,R){return function(H,U){var ne=(U=U||{}).separator||"_",q=U.split||/(?=[A-Z])/;return H.split(q).join(ne)}(F,R).toLowerCase()},a=Object.prototype.toString,c=function(F){return typeof F=="function"},f=function(F){return F===Object(F)},p=function(F){return a.call(F)=="[object Array]"},y=function(F){return a.call(F)=="[object Date]"},g=function(F){return a.call(F)=="[object RegExp]"},T=function(F){return a.call(F)=="[object Boolean]"},E=function(F){return(F-=0)==F},A=function(F,R){var H=R&&"process"in R?R.process:R;return typeof H!="function"?F:function(U,ne){return H(U,F,ne)}},I={camelize:r,decamelize:o,pascalize:i,depascalize:o,camelizeKeys:function(F,R){return n(A(r,R),F)},decamelizeKeys:function(F,R){return n(A(o,R),F,R)},pascalizeKeys:function(F,R){return n(A(i,R),F)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};t.exports?t.exports=I:e.humps=I})(s6)}).decamelize,l6=function(t){if(Array.isArray(t))return t},u6=function(t,e){if(typeof Symbol<"u"&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(f){i=!0,o=f}finally{try{r||c.return==null||c.return()}finally{if(i)throw o}}return n}},A1=function(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},c6=function(t,e){if(t){if(typeof t=="string")return A1(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A1(t,e):void 0}},f6=function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
136
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)},d6=function(t,e){return l6(t)||u6(t,e)||c6(t,e)||f6()},QD=JD(function(t){function e(){return t.exports=e=Object.assign||function(n){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])}return n},e.apply(this,arguments)}t.exports=e}),h6=function(t,e){if(t==null)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i},eP=function(t,e){if(t==null)return{};var n,r,i=h6(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i},p6=X.createContext(null);function tP(t){var e=t.children,n=e===void 0?"":e,r=eP(t,["children"]);return typeof n!="string"&&(n=o6(n)),X.createElement("template",QD({},r,{dangerouslySetInnerHTML:{__html:n}}))}function nP(t){var e=t.root,n=t.children;return zv.createPortal(n===void 0?null:n,e)}function g6(t){var e=X.forwardRef(function(n,r){var i,o,a=n.mode,c=a===void 0?"open":a,f=n.delegatesFocus,p=f!==void 0&&f,y=n.styleSheets,g=y===void 0?[]:y,T=n.ssr,E=T!==void 0&&T,A=n.children,I=eP(n,["mode","delegatesFocus","styleSheets","ssr","children"]),F=(o=X.useRef((i=r)&&i.current),X.useEffect(function(){i&&(i.current=o.current)},[i]),o),R=X.useState(null),H=d6(R,2),U=H[0],ne=H[1],q="node_".concat(c).concat(p);return X.useLayoutEffect(function(){if(F.current)try{if(typeof r=="function"&&r(F.current),E){var ie=F.current.shadowRoot;return void ne(ie)}var x=F.current.attachShadow({mode:c,delegatesFocus:p});g.length>0&&(x.adoptedStyleSheets=g),ne(x)}catch(le){(function(ae){var ze=ae.error,tt=ae.styleSheets,Qe=ae.root;switch(ze.name){case"NotSupportedError":tt.length>0&&(Qe.adoptedStyleSheets=tt);break;default:throw ze}})({error:le,styleSheets:g,root:U})}},[r,F,g]),X.createElement(X.Fragment,null,X.createElement(t.tag,QD({key:q,ref:F},I),(U||E)&&X.createElement(p6.Provider,{value:U},E?X.createElement(tP,{shadowroot:c,shadowrootmode:c},t.render({root:U,ssr:E,children:A})):X.createElement(nP,{root:U},t.render({root:U,ssr:E,children:A})))))});return e.propTypes={mode:Is.oneOf(["open","closed"]),delegatesFocus:Is.bool,styleSheets:Is.arrayOf(Is.instanceOf(globalThis.CSSStyleSheet)),ssr:Is.bool,children:Is.node},e}tP.propTypes={children:Is.oneOfType([Is.string,Is.node])},nP.propTypes={root:Is.object.isRequired,children:Is.node};var Sm=new Map;function m6(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"core",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(r){return r.children};return new Proxy(t,{get:function(r,i){var o=a6(i,{separator:"-"}),a="".concat(e,"-").concat(o);return Sm.has(a)||Sm.set(a,g6({tag:o,render:n})),Sm.get(a)}})}var v6=m6();const y6=".app,.treeRoot{height:100%}.draggingSource{opacity:.3}.placeholderContainer{position:relative}.dropTarget{background-color:#8d878711}",b6=".favorite-bar{position:sticky;top:64px;z-index:var(--menu-z-index);border-bottom:1px solid #ddd}.favorite-bar--hidden{transform:translateY(-100%);opacity:0;height:0;z-index:-1}.favorite-bar--visible{transform:translateY(0);opacity:1}";var M1;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(M1||(M1={}));const w6=Object.freeze({x:0,y:0});var kf;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(kf||(kf={}));var L1;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(L1||(L1={}));var As;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(As||(As={}));As.Space,As.Enter,As.Esc,As.Space,As.Enter,As.Tab;var F1;(function(t){t[t.RightClick=2]="RightClick"})(F1||(F1={}));var N1;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(N1||(N1={}));var j1;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(j1||(j1={}));kf.Backward+"",kf.Forward+"",kf.Backward+"",kf.Forward+"";var Mv;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(Mv||(Mv={}));var Lv;(function(t){t.Optimized="optimized"})(Lv||(Lv={}));Mv.WhileDragging,Lv.Optimized;({...w6});var B1;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(B1||(B1={}));function x6(t,e,n){const r=t.slice();return r.splice(n<0?r.length+n:n,0,r.splice(e,1)[0]),r}As.Down,As.Right,As.Up,As.Left;function S6(t){const e=new CustomEvent("updateFavoriteMenu",{detail:{menuItem:t}});window.dispatchEvent(e)}const Tm="MENU_ITEM";function T6(t){const e=Rd.useLocation(),[n,r]=X.useState([]),[i,o]=X.useState([]),[a,c]=X.useState(!1);console.log("isSubmit",a);const f=X.useRef(null),[p,y]=X.useState(window.location.href);X.useEffect(()=>{y(window.location.href)},[e]);const g=q=>`${q}`;function T(q,ie){for(const x of q){if(x.id===ie)return x;if(x.children){const le=T(x.children,ie);if(le)return le}}return null}function E(q,ie){const x=T(n,q);x?(x.isFavorite=ie,S6(x),ub(q,ie)):console.error(`Item with id ${q} not found`)}const A=q=>{console.log("Favorite menus changed",q);const ie=q.detail.favoriteMenus||[];r(ie)},[I,F]=X.useState(!1);X.useEffect(()=>{const q=ie=>{F(ie.detail.isLoading)};return window.addEventListener("favoriteLoadingChange",q),()=>{window.removeEventListener("favoriteLoadingChange",q)}},[]),X.useEffect(()=>(window.addEventListener("favoriteMenusChange",A),()=>{window.removeEventListener("favoriteMenusChange",A)}),[]);const R=(q,ie)=>{n[q];const x=x6(n,q,ie);r(x),c(!0);const le={menuItemIds:x.map(ae=>ae.id)};es.post("global-menu-config/api/v1/menu-items/user/order-favorites",le,{baseURL:t.baseUrl}).then(()=>{window.dispatchEvent(new CustomEvent("favoriteOrderUpdated",{detail:{favoriteMenuId:x.map(ae=>ae.id)}}))}).catch(ae=>{console.error(ae),r(n)}).finally(()=>{c(!1)})};console.log("favoriteItems",n);const H=Object.entries(t.brandColors||{}).reduce((q,[ie,x])=>(x&&(q[`--${ie}`]=x),q),{}),U=({item:q,index:ie})=>{const x=X.useRef(null),[{isDragging:le},ae]=lk({type:Tm,item:()=>({id:q.id,index:ie}),collect:Ye=>({isDragging:Ye.isDragging()})}),[{isOver:ze,isOverCurrent:tt},Qe]=gp(()=>({accept:Tm,collect:Ye=>({isOver:Ye.isOver(),isOverCurrent:Ye.isOver({shallow:!0})}),drop:Ye=>{Ye.index!==ie&&(Ye.index<ie?(R(Ye.index,ie-1),Ye.index=ie-1):(R(Ye.index,ie),Ye.index=ie))}}),[]);let et="hover-off";return(tt||ze)&&(et="hover-on"),ae(Qe(x)),ye.jsx("div",{ref:x,style:{opacity:le?.7:1,boxShadow:le?"0 4px 8px rgba(0, 0, 0, 0.2)":"none",cursor:"move",display:"inline-block",marginRight:"8px",position:"relative",transition:"transform 0.3s ease-in-out",...H},className:`item ${et}`,children:ye.jsx(ZD,{replacePath:t.replacePath,ssr:t.ssr,brandColors:t.brandColors,baseUrl:t.baseUrl,item:q,level:1,onSetFavoriteSuccess:E,isDrop:a,onClickItem:Ye=>{var pe;(pe=t.onClickItem)==null||pe.call(t,Ye),window.dispatchEvent(new CustomEvent("favoriteMenuPathChange",{detail:{path:Ye.path,menuItemId:Ye.id}}))}})})},ne=()=>{const q=X.useRef(null),[{isOver:ie,canDrop:x},le]=gp(()=>({accept:Tm,drop:ae=>{R(ae.index,n.length-1),ae.index=n.length-1},collect:ae=>({isOver:ae.isOver(),canDrop:ae.canDrop()})}),[n]);return le(q),ye.jsx("div",{ref:q,style:{height:48,width:150,display:"flex",alignItems:"center",justifyContent:"center",borderLeft:ie&&x?"2px solid var(--primary300)":"transparent",...H}})};return console.log("isLoading fav",I),ye.jsx(ye.Fragment,{children:ye.jsx("div",{className:g(`favorite-menu${n.length===0?" favorite-menu--empty":""}`),style:{width:"100%",display:"flex"},children:n.length>0&&ye.jsx(Jv,{ref:f,className:g("wrap-section favorite-menu__menu"),style:{marginTop:4,flex:1,height:"100%"},children:ye.jsx(nk,{backend:hC,children:ye.jsxs("div",{style:{display:"inline-flex"},children:[n.map((q,ie)=>ye.jsx(U,{item:q,index:ie},q.id)),ye.jsx(ne,{})]})})})})})}function C6(t=32){const[e,n]=X.useState(!0),r=X.useRef(0),i=()=>{const o=document.getElementById("app-iframe");if(o&&o.contentWindow){const a=o.contentWindow.scrollY;a>r.current&&a>t?n(!1):a<r.current&&n(!0),r.current=a}};return X.useEffect(()=>{const o=document.getElementById("app-iframe");if(!o)return;const a=()=>{const c=o.contentWindow;c&&(c.addEventListener("scroll",i),n(!0),r.current=c.scrollY||0)};return o.addEventListener("load",a),()=>{o.removeEventListener("load",a);const c=o.contentWindow;c&&c.removeEventListener("scroll",i)}},[]),{isFavoriteBarVisible:e}}function E6(t){const{isFavoriteBarVisible:e}=C6();return ye.jsxs(ye.Fragment,{children:[ye.jsx("style",{children:b6}),ye.jsx("div",{className:`favorite-bar backdrop-delay-transition ${e?"favorite-bar--visible":"favorite-bar--hidden"}`,children:ye.jsx(v6.div,{children:ye.jsx(Xv,{styles:[JT,e6,y6],children:ye.jsx(T6,{...t})})})})]})}function ub(t,e){const n=JSON.parse(localStorage.getItem("favoriteItems")||"[]");if(e)n.includes(t)||n.push(t);else{const r=n.indexOf(t);r>-1&&n.splice(r,1)}localStorage.setItem("favoriteItems",JSON.stringify(n))}function rP({...t}){var Te,Le,He;const e=t.item,n=t.level||0,r=!!((Te=t.item.children)!=null&&Te.length),{isActive:i,isCollapsed:o}=t,a=`level-${n}`,c=o?"collapsed":"expanded",f=i(e.id)?"active":"",p=r?"parent":"child",y=t.params.isOpen?"isOpen":"isClose",g=t.isInternalApp?"isInternalApp":"",T=(Fe,Ne=a)=>`${Fe} ${Ne} ${c} ${f} ${p} ${y} ${g}`,[E,A]=X.useState(!1),[I,F]=X.useState(e.isFavorite||!1);X.useEffect(()=>{F(!!t.item.isFavorite)},[t.item.isFavorite]);const R=X.useRef(),H=X.useRef();H!=null&&H.current&&((Le=H==null?void 0:H.current)==null?void 0:Le.scrollWidth)>((He=H==null?void 0:H.current)==null?void 0:He.clientWidth);const U=window.location.origin,ne=e.path&&e.path.includes("http")?new URL(e.path):{origin:"",pathname:""},q=window.location.pathname.split("/")[1],ie=ne.pathname.split("/")[1],x=t.item.redirectUrl||t.ssr||!U.includes("local")&&U!==ne.origin||ie!==q,le=r?"div":!t.isInternalApp&&x?"a":Rd.Link,ae=KD(e),ze=n+1,tt=r&&o&&E,Qe=o||n===0?void 0:`${n+.25}rem`,et=()=>{A(!0)},Ye=()=>{A(!1)},pe="/global-menu-config/api/v1/menu-items/user/set-favorite",fe=e.serviceKey==="mn_poms";t.params.depth*20,t.params.depth,JU(e.id,t.params.isOpen,t.params.onToggle);const Oe=fe||o&&n===0?e.name==="POMs"?"Parking Operations Management":e.description||e.name:null,je=Object.entries(t.brandColors||{}).reduce((Fe,[Ne,Ve])=>(Ve&&(Fe[`--${Ne}`]=Ve),Fe),{}),me=U!==ne.origin||t.item.redirectUrl?"_blank":"_self";return ye.jsxs("div",{ref:R,className:T("menu-item__wrapper tree-node"),style:{borderRadius:"8px",transition:"all 0.3s",...je},onMouseOver:et,onMouseOut:Ye,onDragStart:Fe=>{o&&n>1&&Fe.preventDefault()},children:[ye.jsx(aa.Tooltip,{placement:"top",title:Oe,disableInteractive:!0,children:ye.jsxs(le,{target:me,to:ae,draggable:"true",className:T("menu-item__link"),style:{paddingLeft:Qe},onClick:Fe=>{var Ne;le==="a"&&me==="_blank"||(!r&&e.path&&(localStorage.setItem("latestClickMenuPath",(e.path||"").replace(window.location.origin,"")),(Ne=t.onClickItem)==null||Ne.call(t,ae)),!o&&t.toggleExpand(Fe))},children:[ye.jsx(k6,{cls:T,item:e}),ye.jsx("span",{className:T("menu-item__label"),ref:H,children:e.name}),ye.jsx(D6,{tooltipPosition:Oe?"right":"top",menuLevel:n,hasChildren:r,isHovered:E,isFavorite:I,onClick:Fe=>{const Ne={menuConfigId:e.id,isFavorite:Fe},Ve=t.baseUrl+pe;es.post(Ve,Ne).then(nt=>{var ct;F(Fe),Qv(ki("components.menu.pushSuccess.menuSuccess",{defaultValue:"Set favorite menu item successful"})),(ct=t.onSetFavoriteSuccess)==null||ct.call(t,t.item.id,Fe),ub(t.item.id,Fe)}).catch(nt=>{var ct,pt;qd(((pt=(ct=nt.response)==null?void 0:ct.data)==null?void 0:pt.errorMessage)||ki("components.menu.pushError.menuError",{defaultValue:"Have error when set favorite menu item"}))})}}),r&&ye.jsx("div",{className:T("menu-item__icon-arrow__wrapper"),children:ye.jsx(x4,{className:T(`menu-item__icon-arrow__icon ${t.params.isOpen?"open":"close"}`)})})]})}),tt&&ye.jsx(S4,{parentRef:R,onlyChild:!o,renderChildren:({maxHeight:Fe})=>{var Ne;return ye.jsx(UD.div,{className:T(`menu-item__dropdown ${t.params.isOpen?"menu-item__dropdown--open":"menu-item__dropdown--close"}`,`level-${ze}`),style:ab({maxHeight:Fe,overflowY:"auto",paddingRight:3},Fe!=="auto"&&!!ze),children:(Ne=e.children)==null?void 0:Ne.map(Ve=>X.createElement(rP,{...t,key:Ve.id,item:Ve,level:ze}))})}})]})}function k6({item:t,cls:e}){return ye.jsx("div",{className:e("menu-item__icon"),children:ye.jsx(XD,{item:t})})}function D6(t){const e={marginRight:t.hasChildren?10:0,fontSize:18,fill:Vn.warning};return ye.jsxs(ye.Fragment,{children:[t.isHovered&&!t.isFavorite&&ye.jsx(aa.Tooltip,{placement:t.tooltipPosition||"top",title:"Add to favorites",disableInteractive:!0,children:ye.jsx("div",{children:ye.jsx(HD,{style:e,onClick:n=>{var r;n.preventDefault(),n.stopPropagation(),(r=t.onClick)==null||r.call(t,!0)}})})}),t.isFavorite&&ye.jsx(aa.Tooltip,{placement:t.tooltipPosition||"top",title:"Remove from favorites",disableInteractive:!0,children:ye.jsx("div",{children:ye.jsx(WD,{style:e,onClick:n=>{var r;n.preventDefault(),n.stopPropagation(),(r=t.onClick)==null||r.call(t,!1)}})})})]})}function P6(){return ye.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:ye.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 O6(){return ye.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:ye.jsx("path",{d:"M3 4h18v2H3V4zm0 7h18v2H3v-2zm0 7h18v2H3v-2z"})})}function _6(t){return ye.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"20",fill:"none",viewBox:"0 0 18 20",...t,children:ye.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 R6=".flex-col-center{display:flex;flex-direction:column;justify-content:center}.wrap-section{padding:0 8px;transition:all .3s}.wrap-section.collapsed{padding:0 4px}.side-bar{position:fixed;top:64px;left:0;height:calc(100vh - 64px);max-width:18rem;display:flex;flex-direction:column;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:5px 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;background-color:initial}.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%;color:#292929}.menu-item__wrapper.collapsed.active,.menu-item__wrapper.expanded.active.parent.isClose,.menu-item__wrapper.expanded.active.child{color:var(--primary400);background-color:var(--primary200)}.menu-item__link{display:flex;flex-direction:row;border-radius:.375rem;align-items:center;padding:.5rem;position:relative;height:48px;cursor:pointer}.menu-item__link.expanded.level-0{padding:.5rem 10px}.isHome{position:sticky;top:0;background-color:#fafafa;z-index:10}.menu-item__link:hover{background-color:#919eab14}.menu-item__link.collapsed.level-0{padding-left:calc(.5rem + 7.665px)!important}.menu-item__link.active{background-color:#009d4f1a;color:inherit}.menu-item__link.active.level-0,.menu-item__link.active.level-1,.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{background-color:inherit;color:inherit}.menu-item__link.active.level-1:hover,.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-0:hover{background-color:#919eab14}.menu-item__link.level-0{transition:padding .2s}.menu-item__link.menu-item__link.collapsed.level-0{padding:0}.menu-item__icon{width:1.5rem;height:1.5rem;flex-shrink:0;display:grid;place-items:center;color:#85858a}.menu-item__icon.collapsed.active,.menu-item__icon.expanded.active.parent.isClose,.menu-item__icon.expanded.active.child{color:inherit}.menu-item__icon.collapsed.level-0>*{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;opacity:1}.menu-item__label.level-0.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{font-size:.875rem;opacity:0;transition-delay:.15s}.menu-item__label.level-0{margin-left:8px;font-weight:500;font-size:.951rem}.menu-item__label.level-0.isInternalApp{font-weight:unset!important}.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__icon{transition:transform .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:210px;max-width:210px;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-0{height:48px}.menu-item__dropdown.collapsed.level-0{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}}",I6=t=>{const e=t.isCollapsed?0:t.depth*16;return ye.jsx("div",{style:{backgroundColor:t.color||"#93D500",height:"2px",position:"absolute",right:"0",top:"0",left:e}})},A6=".app,.treeRoot{height:100%}.draggingSource{opacity:.3}.placeholderContainer{position:relative}.dropTarget{background-color:#8d878711}",M6=t=>{const[e,n]=X.useState(()=>{const r=localStorage.getItem("openingMenuIds");return r&&r!=="[]"?JSON.parse(r):(t==null?void 0:t.initOpenIds)||[]});return X.useEffect(()=>{localStorage.setItem("openingMenuIds",JSON.stringify(e))},[e]),[e,n]};function iP(t){const e=!t||t==="true"?"64px":"17rem";document.documentElement.style.setProperty("--global-menu-width",e);const n=new CustomEvent("menuWidthChange",{detail:{menuWidth:e}});window.dispatchEvent(n)}const Jh=localStorage.getItem("isCollapsed");iP(Jh);function L6(t){const e=new CustomEvent("favoriteMenusChange",{detail:{favoriteMenus:t}});window.dispatchEvent(e)}function F6(t,e){const n=g=>g.parent===0,r=g=>{var T;return((T=g.data)==null?void 0:T.name)==="Home"},i=t.find(g=>n(g)&&r(g)),o=t.filter(g=>n(g)&&!r(g)),a=t.filter(g=>!n(g)),c=e.filter(g=>n(g)&&!r(g)).map(g=>g.id),f=new Map(c.map((g,T)=>[g,T]));if(c.length===0)return[...i?[i]:[],...o,...a];const p=o.filter(g=>!f.has(g.id)),y=o.filter(g=>f.has(g.id));return p.sort((g,T)=>{var E,A;return(((E=g.data)==null?void 0:E.name)||"").localeCompare(((A=T.data)==null?void 0:A.name)||"",void 0,{sensitivity:"base"})}),y.sort((g,T)=>(f.get(g.id)||0)-(f.get(T.id)||0)),[...i?[i]:[],...p,...y,...a]}function N6(t){const e=Rd.useLocation(),[n,r]=X.useState([]),i=n.map(fe=>fe.data),[o,a]=X.useState(!1),[c,f]=X.useState([]),[p,y]=X.useState(Jh===null?!0:Jh==="true"),[g,T]=X.useState(window.location.href),E=X.useRef(null);X.useEffect(()=>{var fe;(fe=t.handleCallback)==null||fe.call(t,i)},[i,t.handleCallback]),X.useEffect(()=>{T(window.location.href),e.pathname+e.search+e.hash&&localStorage.setItem("latestClickMenuPath",(e.pathname+e.search+e.hash||"").replace(window.location.origin,""))},[e]);const A=V1(i,g),[I,F]=M6({initOpenIds:t.initOpenIds}),R=()=>{var fe,Ce;if(y(!p),localStorage.setItem("isCollapsed",JSON.stringify(!p)),iP(p),p)I&&((fe=E.current)==null||fe.open(I));else{const Oe=n.filter(je=>je.parent===0).map(je=>je.id);console.log("closeIds:",Oe),(Ce=E.current)==null||Ce.close(Oe)}},[H,U]=X.useState(!1),ne=p?"collapsed":"expanded",q=fe=>`${fe} ${ne}`,ie=X.useRef(null);X.useLayoutEffect(()=>{(async()=>{var Ce,Oe;try{const je=t.menuPath||"/global-menu-config/api/v1/menu-items/user",me=t.baseUrl+je,{data:Te}=await es.get(me);let Le=Te.map(Fe=>({...Fe,parentKey:Fe.parentKey||0}));Le=sP(Le),t.replacePath&&(Le=oP(Le,t.replacePath));const He=Le.map(Fe=>({id:Fe.id,parent:Fe.parentKey,text:Fe.name,data:Fe}));r(Fe=>F6(He,Fe))}catch(je){console.error("Global menu",je),qd(((Oe=(Ce=je.response)==null?void 0:Ce.data)==null?void 0:Oe.errorMessage)||je.message||ki("components.menu.pushError.menuError",{defaultValue:"Have error when set favorite menu item"}))}})()},[t.baseUrl,t.menuPath,t.replacePath]);const[x,le]=X.useState(!1),ae=async()=>{le(!0),window.dispatchEvent(new CustomEvent("favoriteLoadingChange",{detail:{isLoading:!0}}));try{const fe=await fetch(`${t.baseUrl}/global-menu-config/api/v1/menu-items/user/get-favorites`);if(!fe.ok)throw new Error("Failed to fetch favorite items");const Ce=await fe.json();f(Ce),document.documentElement.style.setProperty("--favorite-menu-height",`${Ce.length?57:0}px`)}catch(fe){document.documentElement.style.setProperty("--favorite-menu-height","0px"),console.error("Error fetching favorite items:",fe)}finally{le(!1),window.dispatchEvent(new CustomEvent("favoriteLoadingChange",{detail:{isLoading:!1}}))}};X.useEffect(()=>{ae()},[t.baseUrl,e]),X.useEffect(()=>{const fe=Ce=>{f(Ce.detail.favoriteMenuId)};return window.addEventListener("favoriteOrderUpdated",fe),()=>{window.removeEventListener("favoriteOrderUpdated",fe)}},[]),X.useEffect(()=>{let fe=[];c.forEach(je=>{const me=i.find(Te=>Te.id===je&&Te.isFavorite===!0);me&&(fe=[...fe,me])});function Ce(je){return i.every(me=>me.parentKey!==je.id)?je:{...je,children:i.filter(me=>me.parentKey===je.id).map(me=>Ce(me))}}const Oe=fe.map(je=>Ce(je));L6(Oe)},[i]);const ze=(fe,Ce,Oe)=>{let je=fe.find(me=>me.id===Oe);for(;je;){if(je.parentKey===Ce)return!0;je=fe.find(me=>me.id===(je==null?void 0:je.parentKey))}return!1},tt=X.useRef(I);X.useEffect(()=>{tt.current=I},[I]),X.useEffect(()=>{const fe=Ce=>{var Fe;const Oe=Ce,{path:je}=Oe.detail,Te=V1(i,je).map(Ne=>Ne.id),He=tt.current.filter(Ne=>Te.includes(Ne)?!1:!Te.some(Ve=>ze(i,Ne,Ve)));console.log("idsToClose:",He),p||(Fe=E.current)==null||Fe.open(Te),setTimeout(()=>{var Ne;(Ne=E.current)==null||Ne.close(He)},0),F(Te)};return window.addEventListener("favoriteMenuPathChange",fe),()=>{window.removeEventListener("favoriteMenuPathChange",fe)}},[i]);function Qe(fe){const Ce=fe.detail.menuItem;r(Oe=>Oe.map(je=>je.id!==Ce.id?je:{...je,data:Ce})),ae()}X.useEffect(()=>(window.addEventListener("updateFavoriteMenu",Qe),()=>{window.removeEventListener("updateFavoriteMenu",Qe)}),[]),X.useLayoutEffect(()=>{var je;const fe=localStorage.getItem("scrollPos");fe&&ie.current&&setTimeout(()=>{const me=ie.current.getScrollElement();me.scrollTop=parseInt(fe)},0);const Ce=()=>{if(ie.current){const me=ie.current.getScrollElement();localStorage.setItem("scrollPos",me.scrollTop.toString())}},Oe=(je=ie.current)==null?void 0:je.getScrollElement();return Oe==null||Oe.addEventListener("scroll",Ce),()=>{Oe==null||Oe.removeEventListener("scroll",Ce)}},[i]);function et(fe){a(!0);const Ce=[...n],Oe=[...fe],je=Oe.filter(Ve=>Ve.parent===0),me=Oe.filter(Ve=>Ve.parent!==0),Te=je.find(Ve=>{var nt;return((nt=Ve.data)==null?void 0:nt.name)==="Home"}),Le=je.filter(Ve=>{var nt;return((nt=Ve.data)==null?void 0:nt.name)!=="Home"}),Fe=[...Te?[Te,...Le]:Le,...me];r(Fe);const Ne=Fe.map((Ve,nt)=>({menuItemId:Ve.id,order:nt}));es.post("/global-menu-config/api/v1/menu-items/user",Ne,{baseURL:t.baseUrl}).then(()=>{}).catch(Ve=>{console.error(Ve),r(Ce)}).finally(()=>{a(!1)})}const Ye=X.useMemo(()=>Jh==="false"?I:[],[]),pe=document.getElementById("global-menu-container");return ye.jsxs("div",{className:q("side-bar"),children:[ye.jsx("div",{className:q("wrap-section side-bar__wrapper-toggle-btn"),children:ye.jsx("button",{className:"icon-btn side-bar__toggle-btn",onClick:R,children:p?ye.jsx(O6,{}):ye.jsx(P6,{})})}),ye.jsx(Jv,{ref:ie,className:q("wrap-section side-bar__menu"),style:{marginTop:24,flex:1,overflow:"auto",height:"100%",overflowX:"hidden"},children:ye.jsx(nk,{backend:SU,options:GU(),children:ye.jsx(cH,{ref:E,classes:{root:"treeRoot",draggingSource:"draggingSource",placeholder:"placeholderContainer",listItem:fe=>{var Ce;return((Ce=fe.data)==null?void 0:Ce.name)==="Home"?"isHome":""}},tree:n,rootId:0,sort:!1,insertDroppableFirst:!1,enableAnimateExpand:!0,dropTargetOffset:10,onDrop:et,render:(fe,Ce)=>{function Oe(Le){return n.every(He=>He.parent!==Le.id)?Le:{...Le,children:n.filter(He=>He.parent===Le.id).map(He=>Oe(He.data))}}const je=Oe(fe.data),me=Le=>A.some(He=>He.id===Le);function Te(Le,He){r(Fe=>Fe.map(Ne=>Ne.id===Le?{...Ne,data:{...Ne.data,isFavorite:He}}:Ne)),ae()}return ye.jsx(rP,{onClickItem:t.onClickItem,isInternalApp:t.isInternalApp,isActive:me,isCollapsed:p,replacePath:t.replacePath,ssr:t.ssr,brandColors:t.brandColors,baseUrl:t.baseUrl,node:fe,params:Ce,nodes:n,item:je,expanded:()=>!1,toggleExpand:Le=>{var He;if(Le.stopPropagation(),Ce.isOpen)Ce.onToggle();else{const Fe=n.filter(Ne=>Ne.parent===fe.parent&&Ne.id!==fe.id).map(Ne=>Ne.id);console.log(" closeIds:",Fe),(He=E.current)==null||He.open(fe.id),setTimeout(()=>{var Ne;(Ne=E.current)==null||Ne.close(Fe)},0)}},level:Ce.depth,onSetFavoriteSuccess:Te})},placeholderRender:(fe,{depth:Ce})=>{var Oe;return ye.jsx(I6,{node:fe,depth:Ce,color:(Oe=t.brandColors)==null?void 0:Oe.primary300,isCollapsed:p})},canDrag:fe=>{var Ce;return!o&&((Ce=fe==null?void 0:fe.data)==null?void 0:Ce.name)!=="Home"},canDrop:(fe,{dragSource:Ce,dropTargetId:Oe})=>(Ce==null?void 0:Ce.parent)===Oe,onDragStart:fe=>{console.log("onDragStart",fe)},onChangeOpen:fe=>{localStorage.getItem("isCollapsed")==="false"&&(console.log("onChangeOpen:",fe),F(fe))},initialOpen:Ye})})}),ye.jsxs("div",{className:q("wrap-section side-bar__wrap-btn-logout"),children:[ye.jsxs("button",{className:q("side-bar__logout-btn"),onClick:()=>{pe.style.setProperty("z-index","1304"),pe.classList.remove("backdrop-delay-transition"),U(!0)},children:[ye.jsx(_6,{className:q("side-bar__icon-logout")}),ye.jsx("span",{className:q("side-bar__logout-btn__text"),children:"Logout"})]}),ye.jsx(BT,{isOpen:H,onClose:()=>{pe.style.setProperty("z-index","var(--menu-z-index)"),pe.classList.add("backdrop-delay-transition"),U(!1)},onConfirm:()=>t.logout?t.logout():hT(t.baseUrl)})]})]})}const $1={"/stella/page/SiteManagement/Company/List?tenantId=1":["/stella/page/SiteManagement/Company","/stella/page/SiteManagement/Region","/stella/page/SiteManagement/Location","/stella/page/SiteManagement/Zone","/stella/page/SiteManagement/Service","/stella/page/SiteManagement/Sign"],"/stella/page/SiteManagement/Portfolio/List":["/stella/page/SiteManagement/Portfolio"],"/stella/page/SiteManagement/CountryRegion/List":["/stella/page/SiteManagement/CountryRegion"],"/stella/page/SiteManagement/VehicleListController/List":["/stella/page/SiteManagement/VehicleListController"],"/stella/page/ContraventionManagement/CorrespondenceTemplate/List":["/stella/page/ContraventionManagement/CorrespondenceTemplate"],"/stella/page/ContraventionManagement/VerificationsAudit/List":["/stella/page/ContraventionManagement/VerificationsAudit"],"/stella/page/ContraventionManagement/PendingWardenVerification/List":["/stella/page/ContraventionManagement/PendingWardenVerification"],"/stella/page/ContraventionManagement/Appeal/Search":["/stella/page/ContraventionManagement/Appeal"],"/stella/page/ContraventionManagement/Contravention/Search":["/stella/page/ContraventionManagement/Contravention"],"/stella/page/ContraventionManagement/Tag/Search":["/stella/page/ContraventionManagement/Tag"],"/stella/page/ContraventionManagement/WorkflowMapping/List":["/stella/page/ContraventionManagement/WorkflowMapping"],"/stella/page/ContraventionManagement/WorkflowLetterTemplateMapping/List":["/stella/page/ContraventionManagement/WorkflowLetterTemplateMapping"],"/stella/page/ContraventionManagement/ScannedAppeal/Summary":["/stella/page/ContraventionManagement/ScannedAppeal"],"/stella/page/ContraventionManagement/PendingAppealWorkQueue/List":["/stella/page/ContraventionManagement/PendingAppeal"],"/stella/page/ContraventionManagement/NoDecisionAIAppeal/List":["/stella/page/ContraventionManagement/NoDecisionAIAppeal"],"/stella/page/ContraventionManagement/VerifyAIAppeal/List":["/stella/page/ContraventionManagement/VerifyAIAppeal"],"/anpr/page/LocationDisableReasons/Index":["/anpr/page/LocationDisableReasons"],"/anpr/page/Tags/Index":["/anpr/page/Tags"],"/anpr/page/VendorLocations/Index":["/anpr/page/VendorLocations"],"/anpr/page/Cameras/Index":["/anpr/page/Cameras"],"/anpr/page/Locations/Index":["/anpr/page/Locations"],"/anpr/page/Devices/Index":["/anpr/page/Devices","/anpr/page/Locations"],"/anpr/page/Technical/Overview":["/anpr/page/Technical"],"/anpr/page/Technical/Index":["/anpr/page/Technical"],"/anpr/page/Technical/Index?priority=P1":["/anpr/page/Technical"],"/anpr/page/Technical/Index?priority=P2":["/anpr/page/Technical"],"/anpr/page/Technical/Index?priority=P3":["/anpr/page/Technical"],"/anpr/page/Technical/Index?priority=P4":["/anpr/page/Technical"],"/anpr/page/CustomVerifications/Overview":["/anpr/page/CustomVerifications/Overview"],"/anpr/page/CustomVerifications/WipByLocation":["/anpr/page/CustomVerifications"],"/anpr/page/Issues/Create":["/anpr/page/Issues/Create"],"/anpr/page/Issues/ExportAsCsv":["/anpr/page/Issues/ExportAsCsv"],"/anpr/page/Issues/Overview":["/anpr/page/Issues/Overview"],"/anpr/page/Issues/Index?status=Closed":["/anpr/page/Issues"],"/anpr/page/Issues/Index":["/anpr/page/Issues"]};function j6(t,e){const r=t.replace(window.origin,"").replace("/app",""),i=new URL(r,window.location.origin),o=new URL(e.replace("/app",""),window.origin),a=(localStorage.getItem("latestClickMenuPath")||"").replace("/app","");return r&&$1[r]&&$1[r].some(c=>e.replace("/app","").includes(c))?a===r?5:4:i.pathname===o.pathname&&i.search===o.search?3:i.pathname===o.pathname?2:o.pathname.startsWith(i.pathname)?1:0}function V1(t,e){const n=t.map(a=>({item:a,priority:a.path?j6(a.path,e):0})).filter(a=>a.priority>0);console.log(" index.tsx ~ matchedItems:",n);const r=n.length>0?n.reduce((a,c)=>c.priority>a.priority?c:a).item:null,i=[];let o=r;for(;o;)i.unshift(o),o=t.find(a=>a.id===(o==null?void 0:o.parentKey))||null;return i}function oP(t,e){return t.map(n=>{var r;return(r=n.children)!=null&&r.length?(n.path="",n.children=oP(n.children,e)):n.path=e(n.path),n})}function sP(t){return t.map(n=>n.path&&!n.path.includes("http")&&n.path.includes("/")?{...n,path:window.location.origin+"/app"+n.path}:(n.children&&(n.children=sP(n.children)),n))}function B6(t){return ye.jsx(Xv,{id:"global-menu-container",styles:[JT,R6,A6],style:{zIndex:"var(--menu-z-index)",position:"relative"},className:"backdrop-delay-transition",children:ye.jsx(N6,{...t})})}const Bh={"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"},$6=()=>{const{t}=TT();return ye.jsx("div",{className:"unauth__container "+Bh["page-container"],children:ye.jsxs("div",{className:"unauth__main-content "+Bh["page-main-content"],children:[ye.jsx(V6,{}),ye.jsxs("div",{className:"unauth__main-text",children:[ye.jsx("h2",{className:"unauth__main-text__title "+Bh["page-title"],children:t("components.unauthorizedPage.title")}),ye.jsxs("p",{className:"unauth__main-text__desc "+Bh["text-base"],children:[t("components.unauthorizedPage.description1")," ",ye.jsx("br",{})," ",t("components.unauthorizedPage.description2")]})]})]})})},V6=()=>ye.jsxs("svg",{width:"61",height:"60",viewBox:"0 0 61 60",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ye.jsxs("g",{filter:"url(#filter0_d_10800_50471)",children:[ye.jsx("rect",{x:"2.5",y:"1",width:"56",height:"56",rx:"28",fill:"white"}),ye.jsx("path",{d:"M24.6667 27.833V23.1663C24.6667 21.6192 25.2812 20.1355 26.3752 19.0416C27.4692 17.9476 28.9529 17.333 30.5 17.333C32.0471 17.333 33.5308 17.9476 34.6248 19.0416C35.7188 20.1355 36.3333 21.6192 36.3333 23.1663V27.833M22.3333 27.833H38.6667C39.9553 27.833 41 28.8777 41 30.1663V38.333C41 39.6217 39.9553 40.6663 38.6667 40.6663H22.3333C21.0447 40.6663 20 39.6217 20 38.333V30.1663C20 28.8777 21.0447 27.833 22.3333 27.833Z",stroke:"#292929","stroke-width":"2.33333","stroke-linecap":"round","stroke-linejoin":"round"})]}),ye.jsx("defs",{children:ye.jsxs("filter",{id:"filter0_d_10800_50471",x:"0.5",y:"0",width:"60",height:"60",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[ye.jsx("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),ye.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),ye.jsx("feOffset",{dy:"1"}),ye.jsx("feGaussianBlur",{stdDeviation:"1"}),ye.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.0627451 0 0 0 0 0.0941176 0 0 0 0 0.156863 0 0 0 0.05 0"}),ye.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_10800_50471"}),ye.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_10800_50471",result:"shape"})]})})]});var Ep={exports:{}};/**
|
|
136
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)},d6=function(t,e){return l6(t)||u6(t,e)||c6(t,e)||f6()},QD=JD(function(t){function e(){return t.exports=e=Object.assign||function(n){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])}return n},e.apply(this,arguments)}t.exports=e}),h6=function(t,e){if(t==null)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i},eP=function(t,e){if(t==null)return{};var n,r,i=h6(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i},p6=X.createContext(null);function tP(t){var e=t.children,n=e===void 0?"":e,r=eP(t,["children"]);return typeof n!="string"&&(n=o6(n)),X.createElement("template",QD({},r,{dangerouslySetInnerHTML:{__html:n}}))}function nP(t){var e=t.root,n=t.children;return zv.createPortal(n===void 0?null:n,e)}function g6(t){var e=X.forwardRef(function(n,r){var i,o,a=n.mode,c=a===void 0?"open":a,f=n.delegatesFocus,p=f!==void 0&&f,y=n.styleSheets,g=y===void 0?[]:y,T=n.ssr,E=T!==void 0&&T,A=n.children,I=eP(n,["mode","delegatesFocus","styleSheets","ssr","children"]),F=(o=X.useRef((i=r)&&i.current),X.useEffect(function(){i&&(i.current=o.current)},[i]),o),R=X.useState(null),H=d6(R,2),U=H[0],ne=H[1],q="node_".concat(c).concat(p);return X.useLayoutEffect(function(){if(F.current)try{if(typeof r=="function"&&r(F.current),E){var ie=F.current.shadowRoot;return void ne(ie)}var x=F.current.attachShadow({mode:c,delegatesFocus:p});g.length>0&&(x.adoptedStyleSheets=g),ne(x)}catch(le){(function(ae){var ze=ae.error,tt=ae.styleSheets,Qe=ae.root;switch(ze.name){case"NotSupportedError":tt.length>0&&(Qe.adoptedStyleSheets=tt);break;default:throw ze}})({error:le,styleSheets:g,root:U})}},[r,F,g]),X.createElement(X.Fragment,null,X.createElement(t.tag,QD({key:q,ref:F},I),(U||E)&&X.createElement(p6.Provider,{value:U},E?X.createElement(tP,{shadowroot:c,shadowrootmode:c},t.render({root:U,ssr:E,children:A})):X.createElement(nP,{root:U},t.render({root:U,ssr:E,children:A})))))});return e.propTypes={mode:Is.oneOf(["open","closed"]),delegatesFocus:Is.bool,styleSheets:Is.arrayOf(Is.instanceOf(globalThis.CSSStyleSheet)),ssr:Is.bool,children:Is.node},e}tP.propTypes={children:Is.oneOfType([Is.string,Is.node])},nP.propTypes={root:Is.object.isRequired,children:Is.node};var Sm=new Map;function m6(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"core",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(r){return r.children};return new Proxy(t,{get:function(r,i){var o=a6(i,{separator:"-"}),a="".concat(e,"-").concat(o);return Sm.has(a)||Sm.set(a,g6({tag:o,render:n})),Sm.get(a)}})}var v6=m6();const y6=".app,.treeRoot{height:100%}.draggingSource{opacity:.3}.placeholderContainer{position:relative}.dropTarget{background-color:#8d878711}",b6=".favorite-bar{position:sticky;top:64px;z-index:var(--menu-z-index);border-bottom:1px solid #ddd}.favorite-bar--hidden{transform:translateY(-100%);opacity:0;height:0;z-index:-1}.favorite-bar--visible{transform:translateY(0);opacity:1}";var M1;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(M1||(M1={}));const w6=Object.freeze({x:0,y:0});var kf;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(kf||(kf={}));var L1;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(L1||(L1={}));var As;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(As||(As={}));As.Space,As.Enter,As.Esc,As.Space,As.Enter,As.Tab;var F1;(function(t){t[t.RightClick=2]="RightClick"})(F1||(F1={}));var N1;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(N1||(N1={}));var j1;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(j1||(j1={}));kf.Backward+"",kf.Forward+"",kf.Backward+"",kf.Forward+"";var Mv;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(Mv||(Mv={}));var Lv;(function(t){t.Optimized="optimized"})(Lv||(Lv={}));Mv.WhileDragging,Lv.Optimized;({...w6});var B1;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(B1||(B1={}));function x6(t,e,n){const r=t.slice();return r.splice(n<0?r.length+n:n,0,r.splice(e,1)[0]),r}As.Down,As.Right,As.Up,As.Left;function S6(t){const e=new CustomEvent("updateFavoriteMenu",{detail:{menuItem:t}});window.dispatchEvent(e)}const Tm="MENU_ITEM";function T6(t){const e=Rd.useLocation(),[n,r]=X.useState([]),[i,o]=X.useState([]),[a,c]=X.useState(!1);console.log("isSubmit",a);const f=X.useRef(null),[p,y]=X.useState(window.location.href);X.useEffect(()=>{y(window.location.href)},[e]);const g=q=>`${q}`;function T(q,ie){for(const x of q){if(x.id===ie)return x;if(x.children){const le=T(x.children,ie);if(le)return le}}return null}function E(q,ie){const x=T(n,q);x?(x.isFavorite=ie,S6(x),ub(q,ie)):console.error(`Item with id ${q} not found`)}const A=q=>{console.log("Favorite menus changed",q);const ie=q.detail.favoriteMenus||[];r(ie)},[I,F]=X.useState(!1);X.useEffect(()=>{const q=ie=>{F(ie.detail.isLoading)};return window.addEventListener("favoriteLoadingChange",q),()=>{window.removeEventListener("favoriteLoadingChange",q)}},[]),X.useEffect(()=>(window.addEventListener("favoriteMenusChange",A),()=>{window.removeEventListener("favoriteMenusChange",A)}),[]);const R=(q,ie)=>{n[q];const x=x6(n,q,ie);r(x),c(!0);const le={menuItemIds:x.map(ae=>ae.id)};es.post("global-menu-config/api/v1/menu-items/user/order-favorites",le,{baseURL:t.baseUrl}).then(()=>{window.dispatchEvent(new CustomEvent("favoriteOrderUpdated",{detail:{favoriteMenuId:x.map(ae=>ae.id)}}))}).catch(ae=>{console.error(ae),r(n)}).finally(()=>{c(!1)})};console.log("favoriteItems",n);const H=Object.entries(t.brandColors||{}).reduce((q,[ie,x])=>(x&&(q[`--${ie}`]=x),q),{}),U=({item:q,index:ie})=>{const x=X.useRef(null),[{isDragging:le},ae]=lk({type:Tm,item:()=>({id:q.id,index:ie}),collect:Ye=>({isDragging:Ye.isDragging()})}),[{isOver:ze,isOverCurrent:tt},Qe]=gp(()=>({accept:Tm,collect:Ye=>({isOver:Ye.isOver(),isOverCurrent:Ye.isOver({shallow:!0})}),drop:Ye=>{Ye.index!==ie&&(Ye.index<ie?(R(Ye.index,ie-1),Ye.index=ie-1):(R(Ye.index,ie),Ye.index=ie))}}),[]);let et="hover-off";return(tt||ze)&&(et="hover-on"),ae(Qe(x)),ye.jsx("div",{ref:x,style:{opacity:le?.7:1,boxShadow:le?"0 4px 8px rgba(0, 0, 0, 0.2)":"none",cursor:"move",display:"inline-block",marginRight:"8px",position:"relative",transition:"transform 0.3s ease-in-out",...H},className:`item ${et}`,children:ye.jsx(ZD,{replacePath:t.replacePath,ssr:t.ssr,brandColors:t.brandColors,baseUrl:t.baseUrl,item:q,level:1,onSetFavoriteSuccess:E,isDrop:a,onClickItem:Ye=>{var pe;(pe=t.onClickItem)==null||pe.call(t,Ye),window.dispatchEvent(new CustomEvent("favoriteMenuPathChange",{detail:{path:Ye.path,menuItemId:Ye.id}}))}})})},ne=()=>{const q=X.useRef(null),[{isOver:ie,canDrop:x},le]=gp(()=>({accept:Tm,drop:ae=>{R(ae.index,n.length-1),ae.index=n.length-1},collect:ae=>({isOver:ae.isOver(),canDrop:ae.canDrop()})}),[n]);return le(q),ye.jsx("div",{ref:q,style:{height:48,width:150,display:"flex",alignItems:"center",justifyContent:"center",borderLeft:ie&&x?"2px solid var(--primary300)":"transparent",...H}})};return console.log("isLoading fav",I),ye.jsx(ye.Fragment,{children:ye.jsx("div",{className:g(`favorite-menu${n.length===0?" favorite-menu--empty":""}`),style:{width:"100%",display:"flex"},children:n.length>0&&ye.jsx(Jv,{ref:f,className:g("wrap-section favorite-menu__menu"),style:{marginTop:4,flex:1,height:"100%"},children:ye.jsx(nk,{backend:hC,children:ye.jsxs("div",{style:{display:"inline-flex"},children:[n.map((q,ie)=>ye.jsx(U,{item:q,index:ie},q.id)),ye.jsx(ne,{})]})})})})})}function C6(t=32){const[e,n]=X.useState(!0),r=X.useRef(0),i=()=>{const o=document.getElementById("app-iframe");if(o&&o.contentWindow){const a=o.contentWindow.scrollY;a>r.current&&a>t?n(!1):a<r.current&&n(!0),r.current=a}};return X.useEffect(()=>{const o=document.getElementById("app-iframe");if(!o)return;const a=()=>{const c=o.contentWindow;c&&(c.addEventListener("scroll",i),n(!0),r.current=c.scrollY||0)};return o.addEventListener("load",a),()=>{o.removeEventListener("load",a);const c=o.contentWindow;c&&c.removeEventListener("scroll",i)}},[]),{isFavoriteBarVisible:e}}function E6(t){const{isFavoriteBarVisible:e}=C6();return ye.jsxs(ye.Fragment,{children:[ye.jsx("style",{children:b6}),ye.jsx("div",{className:`favorite-bar backdrop-delay-transition ${e?"favorite-bar--visible":"favorite-bar--hidden"}`,children:ye.jsx(v6.div,{children:ye.jsx(Xv,{styles:[JT,e6,y6],children:ye.jsx(T6,{...t})})})})]})}function ub(t,e){const n=JSON.parse(localStorage.getItem("favoriteItems")||"[]");if(e)n.includes(t)||n.push(t);else{const r=n.indexOf(t);r>-1&&n.splice(r,1)}localStorage.setItem("favoriteItems",JSON.stringify(n))}function rP({...t}){var Te,Le,He;const e=t.item,n=t.level||0,r=!!((Te=t.item.children)!=null&&Te.length),{isActive:i,isCollapsed:o}=t,a=`level-${n}`,c=o?"collapsed":"expanded",f=i(e.id)?"active":"",p=r?"parent":"child",y=t.params.isOpen?"isOpen":"isClose",g=t.isInternalApp?"isInternalApp":"",T=(Fe,Ne=a)=>`${Fe} ${Ne} ${c} ${f} ${p} ${y} ${g}`,[E,A]=X.useState(!1),[I,F]=X.useState(e.isFavorite||!1);X.useEffect(()=>{F(!!t.item.isFavorite)},[t.item.isFavorite]);const R=X.useRef(),H=X.useRef();H!=null&&H.current&&((Le=H==null?void 0:H.current)==null?void 0:Le.scrollWidth)>((He=H==null?void 0:H.current)==null?void 0:He.clientWidth);const U=window.location.origin,ne=e.path&&e.path.includes("http")?new URL(e.path):{origin:"",pathname:""},q=window.location.pathname.split("/")[1],ie=ne.pathname.split("/")[1],x=t.item.redirectUrl||t.ssr||!U.includes("local")&&U!==ne.origin||ie!==q,le=r?"div":!t.isInternalApp&&x?"a":Rd.Link,ae=KD(e),ze=n+1,tt=r&&o&&E,Qe=o||n===0?void 0:`${n+.25}rem`,et=()=>{A(!0)},Ye=()=>{A(!1)},pe="/global-menu-config/api/v1/menu-items/user/set-favorite",fe=e.serviceKey==="mn_poms";t.params.depth*20,t.params.depth,JU(e.id,t.params.isOpen,t.params.onToggle);const Oe=fe||o&&n===0?e.name==="POMs"?"Parking Operations Management":e.description||e.name:null,je=Object.entries(t.brandColors||{}).reduce((Fe,[Ne,Ve])=>(Ve&&(Fe[`--${Ne}`]=Ve),Fe),{}),me=U!==ne.origin||t.item.redirectUrl?"_blank":"_self";return ye.jsxs("div",{ref:R,className:T("menu-item__wrapper tree-node"),style:{borderRadius:"8px",transition:"all 0.3s",...je},onMouseOver:et,onMouseOut:Ye,onDragStart:Fe=>{o&&n>1&&Fe.preventDefault()},children:[ye.jsx(aa.Tooltip,{placement:"top",title:Oe,disableInteractive:!0,children:ye.jsxs(le,{target:me,to:ae,draggable:"true",className:T("menu-item__link"),style:{paddingLeft:Qe},onClick:Fe=>{var Ne;le==="a"&&me==="_blank"||(!r&&e.path&&(localStorage.setItem("latestClickMenuPath",(e.path||"").replace(window.location.origin,"")),(Ne=t.onClickItem)==null||Ne.call(t,ae)),!o&&t.toggleExpand(Fe))},children:[ye.jsx(k6,{cls:T,item:e}),ye.jsx("span",{className:T("menu-item__label"),ref:H,children:e.name}),ye.jsx(D6,{tooltipPosition:Oe?"right":"top",menuLevel:n,hasChildren:r,isHovered:E,isFavorite:I,onClick:Fe=>{const Ne={menuConfigId:e.id,isFavorite:Fe},Ve=t.baseUrl+pe;es.post(Ve,Ne).then(nt=>{var ct;F(Fe),Qv(ki("components.menu.pushSuccess.menuSuccess",{defaultValue:"Set favorite menu item successful"})),(ct=t.onSetFavoriteSuccess)==null||ct.call(t,t.item.id,Fe),ub(t.item.id,Fe)}).catch(nt=>{var ct,pt;qd(((pt=(ct=nt.response)==null?void 0:ct.data)==null?void 0:pt.errorMessage)||ki("components.menu.pushError.menuError",{defaultValue:"Have error when set favorite menu item"}))})}}),r&&ye.jsx("div",{className:T("menu-item__icon-arrow__wrapper"),children:ye.jsx(x4,{className:T(`menu-item__icon-arrow__icon ${t.params.isOpen?"open":"close"}`)})})]})}),tt&&ye.jsx(S4,{parentRef:R,onlyChild:!o,renderChildren:({maxHeight:Fe})=>{var Ne;return ye.jsx(UD.div,{className:T(`menu-item__dropdown ${t.params.isOpen?"menu-item__dropdown--open":"menu-item__dropdown--close"}`,`level-${ze}`),style:ab({maxHeight:Fe,overflowY:"auto",paddingRight:3},Fe!=="auto"&&!!ze),children:(Ne=e.children)==null?void 0:Ne.map(Ve=>X.createElement(rP,{...t,key:Ve.id,item:Ve,level:ze}))})}})]})}function k6({item:t,cls:e}){return ye.jsx("div",{className:e("menu-item__icon"),children:ye.jsx(XD,{item:t})})}function D6(t){const e={marginRight:t.hasChildren?10:0,fontSize:18,fill:Vn.warning};return ye.jsxs(ye.Fragment,{children:[t.isHovered&&!t.isFavorite&&ye.jsx(aa.Tooltip,{placement:t.tooltipPosition||"top",title:"Add to favorites",disableInteractive:!0,children:ye.jsx("div",{children:ye.jsx(HD,{style:e,onClick:n=>{var r;n.preventDefault(),n.stopPropagation(),(r=t.onClick)==null||r.call(t,!0)}})})}),t.isFavorite&&ye.jsx(aa.Tooltip,{placement:t.tooltipPosition||"top",title:"Remove from favorites",disableInteractive:!0,children:ye.jsx("div",{children:ye.jsx(WD,{style:e,onClick:n=>{var r;n.preventDefault(),n.stopPropagation(),(r=t.onClick)==null||r.call(t,!1)}})})})]})}function P6(){return ye.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:ye.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 O6(){return ye.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:ye.jsx("path",{d:"M3 4h18v2H3V4zm0 7h18v2H3v-2zm0 7h18v2H3v-2z"})})}function _6(t){return ye.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"20",fill:"none",viewBox:"0 0 18 20",...t,children:ye.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 R6=".flex-col-center{display:flex;flex-direction:column;justify-content:center}.wrap-section{padding:0 8px;transition:all .3s}.wrap-section.collapsed{padding:0 4px}.side-bar{position:fixed;top:64px;left:0;height:calc(100vh - 64px);max-width:18rem;display:flex;flex-direction:column;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:5px 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;background-color:initial}.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%;color:#292929}.menu-item__wrapper.collapsed.active,.menu-item__wrapper.expanded.active.parent.isClose,.menu-item__wrapper.expanded.active.child{color:var(--primary400);background-color:var(--primary200)}.menu-item__link{display:flex;flex-direction:row;border-radius:.375rem;align-items:center;padding:.5rem;position:relative;height:48px;cursor:pointer}.menu-item__link.expanded.level-0{padding:.5rem 10px}.isHome{position:sticky;top:0;background-color:#fafafa;z-index:10}.menu-item__link:hover{background-color:#919eab14}.menu-item__link.collapsed.level-0{padding-left:calc(.5rem + 7.665px)!important}.menu-item__link.active{background-color:#009d4f1a;color:inherit}.menu-item__link.active.level-0,.menu-item__link.active.level-1,.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{background-color:inherit;color:inherit}.menu-item__link.active.level-1:hover,.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-0:hover{background-color:#919eab14}.menu-item__link.level-0{transition:padding .2s}.menu-item__link.menu-item__link.collapsed.level-0{padding:0}.menu-item__icon{width:1.5rem;height:1.5rem;flex-shrink:0;display:grid;place-items:center;color:#85858a}.menu-item__icon.collapsed.active,.menu-item__icon.expanded.active.parent.isClose,.menu-item__icon.expanded.active.child{color:inherit}.menu-item__icon.collapsed.level-0>*{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;opacity:1}.menu-item__label.level-0.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{font-size:.875rem;opacity:0;transition-delay:.15s}.menu-item__label.level-0{margin-left:8px;font-weight:500;font-size:.951rem}.menu-item__label.level-0.isInternalApp{font-weight:unset!important}.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__icon{transition:transform .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:210px;max-width:210px;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-0{height:48px}.menu-item__dropdown.collapsed.level-0{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}}",I6=t=>{const e=t.isCollapsed?0:t.depth*16;return ye.jsx("div",{style:{backgroundColor:t.color||"#93D500",height:"2px",position:"absolute",right:"0",top:"0",left:e}})},A6=".app,.treeRoot{height:100%}.draggingSource{opacity:.3}.placeholderContainer{position:relative}.dropTarget{background-color:#8d878711}",M6=t=>{const[e,n]=X.useState(()=>{const r=localStorage.getItem("openingMenuIds");return r&&r!=="[]"?JSON.parse(r):(t==null?void 0:t.initOpenIds)||[]});return X.useEffect(()=>{localStorage.setItem("openingMenuIds",JSON.stringify(e))},[e]),[e,n]};function iP(t){const e=!t||t==="true"?"64px":"17rem";document.documentElement.style.setProperty("--global-menu-width",e);const n=new CustomEvent("menuWidthChange",{detail:{menuWidth:e}});window.dispatchEvent(n)}const Jh=localStorage.getItem("isCollapsed");iP(Jh);function L6(t){const e=new CustomEvent("favoriteMenusChange",{detail:{favoriteMenus:t}});window.dispatchEvent(e)}function F6(t,e){const n=g=>g.parent===0,r=g=>{var T;return((T=g.data)==null?void 0:T.name)==="Home"},i=t.find(g=>n(g)&&r(g)),o=t.filter(g=>n(g)&&!r(g)),a=t.filter(g=>!n(g)),c=e.filter(g=>n(g)&&!r(g)).map(g=>g.id),f=new Map(c.map((g,T)=>[g,T]));if(c.length===0)return[...i?[i]:[],...o,...a];const p=o.filter(g=>!f.has(g.id)),y=o.filter(g=>f.has(g.id));return p.sort((g,T)=>{var E,A;return(((E=g.data)==null?void 0:E.name)||"").localeCompare(((A=T.data)==null?void 0:A.name)||"",void 0,{sensitivity:"base"})}),y.sort((g,T)=>(f.get(g.id)||0)-(f.get(T.id)||0)),[...i?[i]:[],...p,...y,...a]}function N6(t){const e=Rd.useLocation(),[n,r]=X.useState([]),i=n.map(fe=>fe.data),[o,a]=X.useState(!1),[c,f]=X.useState([]),[p,y]=X.useState(Jh===null?!0:Jh==="true"),[g,T]=X.useState(window.location.href),E=X.useRef(null);X.useEffect(()=>{var fe;(fe=t.handleCallback)==null||fe.call(t,i)},[i,t.handleCallback]),X.useEffect(()=>{T(window.location.href),e.pathname+e.search+e.hash&&localStorage.setItem("latestClickMenuPath",(e.pathname+e.search+e.hash||"").replace(window.location.origin,""))},[e]);const A=V1(i,g),[I,F]=M6({initOpenIds:t.initOpenIds}),R=()=>{var fe,Ce;if(y(!p),localStorage.setItem("isCollapsed",JSON.stringify(!p)),iP(p),p)I&&((fe=E.current)==null||fe.open(I));else{const Oe=n.filter(je=>je.parent===0).map(je=>je.id);console.log("closeIds:",Oe),(Ce=E.current)==null||Ce.close(Oe)}},[H,U]=X.useState(!1),ne=p?"collapsed":"expanded",q=fe=>`${fe} ${ne}`,ie=X.useRef(null);X.useLayoutEffect(()=>{(async()=>{var Ce,Oe;try{const je=t.menuPath||"/global-menu-config/api/v1/menu-items/user",me=t.baseUrl+je,{data:Te}=await es.get(me);let Le=Te.map(Fe=>({...Fe,parentKey:Fe.parentKey||0}));Le=sP(Le),t.replacePath&&(Le=oP(Le,t.replacePath));const He=Le.map(Fe=>({id:Fe.id,parent:Fe.parentKey,text:Fe.name,data:Fe}));r(Fe=>F6(He,Fe))}catch(je){console.error("Global menu",je),qd(((Oe=(Ce=je.response)==null?void 0:Ce.data)==null?void 0:Oe.errorMessage)||je.message||ki("components.menu.pushError.menuError",{defaultValue:"Have error when set favorite menu item"}))}})()},[t.baseUrl,t.menuPath,t.replacePath]);const[x,le]=X.useState(!1),ae=async()=>{le(!0),window.dispatchEvent(new CustomEvent("favoriteLoadingChange",{detail:{isLoading:!0}}));try{const fe=await fetch(`${t.baseUrl}/global-menu-config/api/v1/menu-items/user/get-favorites`);if(!fe.ok)throw new Error("Failed to fetch favorite items");const Ce=await fe.json();f(Ce),document.documentElement.style.setProperty("--favorite-menu-height",`${Ce.length?57:0}px`)}catch(fe){document.documentElement.style.setProperty("--favorite-menu-height","0px"),console.error("Error fetching favorite items:",fe)}finally{le(!1),window.dispatchEvent(new CustomEvent("favoriteLoadingChange",{detail:{isLoading:!1}}))}};X.useEffect(()=>{ae()},[t.baseUrl,e]),X.useEffect(()=>{const fe=Ce=>{f(Ce.detail.favoriteMenuId)};return window.addEventListener("favoriteOrderUpdated",fe),()=>{window.removeEventListener("favoriteOrderUpdated",fe)}},[]),X.useEffect(()=>{let fe=[];c.forEach(je=>{const me=i.find(Te=>Te.id===je&&Te.isFavorite===!0);me&&(fe=[...fe,me])});function Ce(je){return i.every(me=>me.parentKey!==je.id)?je:{...je,children:i.filter(me=>me.parentKey===je.id).map(me=>Ce(me))}}const Oe=fe.map(je=>Ce(je));L6(Oe)},[i]);const ze=(fe,Ce,Oe)=>{let je=fe.find(me=>me.id===Oe);for(;je;){if(je.parentKey===Ce)return!0;je=fe.find(me=>me.id===(je==null?void 0:je.parentKey))}return!1},tt=X.useRef(I);X.useEffect(()=>{tt.current=I},[I]),X.useEffect(()=>{const fe=Ce=>{var Fe;const Oe=Ce,{path:je}=Oe.detail,Te=V1(i,je).map(Ne=>Ne.id),He=tt.current.filter(Ne=>Te.includes(Ne)?!1:!Te.some(Ve=>ze(i,Ne,Ve)));console.log("idsToClose:",He),p||(Fe=E.current)==null||Fe.open(Te),setTimeout(()=>{var Ne;(Ne=E.current)==null||Ne.close(He)},0),F(Te)};return window.addEventListener("favoriteMenuPathChange",fe),()=>{window.removeEventListener("favoriteMenuPathChange",fe)}},[i]);function Qe(fe){const Ce=fe.detail.menuItem;r(Oe=>Oe.map(je=>je.id!==Ce.id?je:{...je,data:Ce})),ae()}X.useEffect(()=>(window.addEventListener("updateFavoriteMenu",Qe),()=>{window.removeEventListener("updateFavoriteMenu",Qe)}),[]),X.useLayoutEffect(()=>{var je;const fe=localStorage.getItem("scrollPos");fe&&ie.current&&setTimeout(()=>{const me=ie.current.getScrollElement();me.scrollTop=parseInt(fe)},0);const Ce=()=>{if(ie.current){const me=ie.current.getScrollElement();localStorage.setItem("scrollPos",me.scrollTop.toString())}},Oe=(je=ie.current)==null?void 0:je.getScrollElement();return Oe==null||Oe.addEventListener("scroll",Ce),()=>{Oe==null||Oe.removeEventListener("scroll",Ce)}},[i]);function et(fe){a(!0);const Ce=[...n],Oe=[...fe],je=Oe.filter(Ve=>Ve.parent===0),me=Oe.filter(Ve=>Ve.parent!==0),Te=je.find(Ve=>{var nt;return((nt=Ve.data)==null?void 0:nt.name)==="Home"}),Le=je.filter(Ve=>{var nt;return((nt=Ve.data)==null?void 0:nt.name)!=="Home"}),Fe=[...Te?[Te,...Le]:Le,...me];r(Fe);const Ne=Fe.map((Ve,nt)=>({menuItemId:Ve.id,order:nt}));es.post("/global-menu-config/api/v1/menu-items/user",Ne,{baseURL:t.baseUrl}).then(()=>{}).catch(Ve=>{console.error(Ve),r(Ce)}).finally(()=>{a(!1)})}const Ye=X.useMemo(()=>Jh==="false"?I:[],[]),pe=document.getElementById("global-menu-container");return ye.jsxs("div",{className:q("side-bar"),children:[ye.jsx("div",{className:q("wrap-section side-bar__wrapper-toggle-btn"),children:ye.jsx("button",{className:"icon-btn side-bar__toggle-btn",onClick:R,children:p?ye.jsx(O6,{}):ye.jsx(P6,{})})}),ye.jsx(Jv,{ref:ie,className:q("wrap-section side-bar__menu"),style:{marginTop:24,flex:1,overflow:"auto",height:"100%",overflowX:"hidden"},children:ye.jsx(nk,{backend:SU,options:GU(),children:ye.jsx(cH,{ref:E,classes:{root:"treeRoot",draggingSource:"draggingSource",placeholder:"placeholderContainer",listItem:fe=>{var Ce;return((Ce=fe.data)==null?void 0:Ce.name)==="Home"?"isHome":""}},tree:n,rootId:0,sort:!1,insertDroppableFirst:!1,enableAnimateExpand:!0,dropTargetOffset:10,onDrop:et,render:(fe,Ce)=>{function Oe(Le){return n.every(He=>He.parent!==Le.id)?Le:{...Le,children:n.filter(He=>He.parent===Le.id).map(He=>Oe(He.data))}}const je=Oe(fe.data),me=Le=>A.some(He=>He.id===Le);function Te(Le,He){r(Fe=>Fe.map(Ne=>Ne.id===Le?{...Ne,data:{...Ne.data,isFavorite:He}}:Ne)),ae()}return ye.jsx(rP,{onClickItem:t.onClickItem,isInternalApp:t.isInternalApp,isActive:me,isCollapsed:p,replacePath:t.replacePath,ssr:t.ssr,brandColors:t.brandColors,baseUrl:t.baseUrl,node:fe,params:Ce,nodes:n,item:je,expanded:()=>!1,toggleExpand:Le=>{var He;if(Le.stopPropagation(),Ce.isOpen)Ce.onToggle();else{const Fe=n.filter(Ne=>Ne.parent===fe.parent&&Ne.id!==fe.id).map(Ne=>Ne.id);console.log(" closeIds:",Fe),(He=E.current)==null||He.open(fe.id),setTimeout(()=>{var Ne;(Ne=E.current)==null||Ne.close(Fe)},0)}},level:Ce.depth,onSetFavoriteSuccess:Te})},placeholderRender:(fe,{depth:Ce})=>{var Oe;return ye.jsx(I6,{node:fe,depth:Ce,color:(Oe=t.brandColors)==null?void 0:Oe.primary300,isCollapsed:p})},canDrag:fe=>{var Ce;return!o&&((Ce=fe==null?void 0:fe.data)==null?void 0:Ce.name)!=="Home"},canDrop:(fe,{dragSource:Ce,dropTargetId:Oe})=>(Ce==null?void 0:Ce.parent)===Oe,onDragStart:fe=>{console.log("onDragStart",fe)},onChangeOpen:fe=>{localStorage.getItem("isCollapsed")==="false"&&(console.log("onChangeOpen:",fe),F(fe))},initialOpen:Ye})})}),ye.jsxs("div",{className:q("wrap-section side-bar__wrap-btn-logout"),children:[ye.jsxs("button",{className:q("side-bar__logout-btn"),onClick:()=>{pe.style.setProperty("z-index","1304"),pe.classList.remove("backdrop-delay-transition"),U(!0)},children:[ye.jsx(_6,{className:q("side-bar__icon-logout")}),ye.jsx("span",{className:q("side-bar__logout-btn__text"),children:"Logout"})]}),ye.jsx(BT,{isOpen:H,onClose:()=>{pe.style.setProperty("z-index","var(--menu-z-index)"),pe.classList.add("backdrop-delay-transition"),U(!1)},onConfirm:()=>t.logout?t.logout():hT(t.baseUrl)})]})]})}const $1={"/stella/page/SiteManagement/Company/List?tenantId=1":["/stella/page/SiteManagement/Company","/stella/page/SiteManagement/Region","/stella/page/SiteManagement/Location","/stella/page/SiteManagement/Zone","/stella/page/SiteManagement/Service","/stella/page/SiteManagement/Sign"],"/stella/page/SiteManagement/Portfolio/List":["/stella/page/SiteManagement/Portfolio"],"/stella/page/SiteManagement/CountryRegion/List":["/stella/page/SiteManagement/CountryRegion"],"/stella/page/SiteManagement/VehicleListController/List":["/stella/page/SiteManagement/VehicleListController"],"/stella/page/ContraventionManagement/CorrespondenceTemplate/List":["/stella/page/ContraventionManagement/CorrespondenceTemplate"],"/stella/page/ContraventionManagement/VerificationsAudit/List":["/stella/page/ContraventionManagement/VerificationsAudit"],"/stella/page/ContraventionManagement/PendingWardenVerification/List":["/stella/page/ContraventionManagement/PendingWardenVerification"],"/stella/page/ContraventionManagement/Appeal/Search":["/stella/page/ContraventionManagement/Appeal"],"/stella/page/ContraventionManagement/Contravention/Search":["/stella/page/ContraventionManagement/Contravention"],"/stella/page/ContraventionManagement/Tag/Search":["/stella/page/ContraventionManagement/Tag"],"/stella/page/ContraventionManagement/WorkflowMapping/List":["/stella/page/ContraventionManagement/WorkflowMapping"],"/stella/page/ContraventionManagement/WorkflowLetterTemplateMapping/List":["/stella/page/ContraventionManagement/WorkflowLetterTemplateMapping"],"/stella/page/ContraventionManagement/ScannedAppeal/Summary":["/stella/page/ContraventionManagement/ScannedAppeal"],"/stella/page/ContraventionManagement/PendingAppealWorkQueue/List":["/stella/page/ContraventionManagement/PendingAppeal"],"/stella/page/ContraventionManagement/NoDecisionAIAppeal/List":["/stella/page/ContraventionManagement/NoDecisionAIAppeal"],"/stella/page/ContraventionManagement/VerifyAIAppeal/List":["/stella/page/ContraventionManagement/VerifyAIAppeal"],"/anpr/page/LocationDisableReasons/Index":["/anpr/page/LocationDisableReasons"],"/anpr/page/Tags/Index":["/anpr/page/Tags"],"/anpr/page/VendorLocations/Index":["/anpr/page/VendorLocations"],"/anpr/page/Cameras/Index":["/anpr/page/Cameras"],"/anpr/page/Locations/Index":["/anpr/page/Locations"],"/anpr/page/Devices/Index":["/anpr/page/Devices","/anpr/page/Locations"],"/anpr/page/CustomVerifications/Overview":["/anpr/page/CustomVerifications/Overview"],"/anpr/page/CustomVerifications/WipByLocation":["/anpr/page/CustomVerifications"],"/anpr/page/Issues/Create":["/anpr/page/Issues/Create"],"/anpr/page/Issues/ExportAsCsv":["/anpr/page/Issues/ExportAsCsv"],"/anpr/page/Issues/Overview":["/anpr/page/Issues/Overview"],"/anpr/page/Issues/Index?status=Closed":["/anpr/page/Issues"],"/anpr/page/Issues/Index":["/anpr/page/Issues"]};function j6(t,e){const r=t.replace(window.origin,"").replace("/app",""),i=new URL(r,window.location.origin),o=new URL(e.replace("/app",""),window.origin),a=(localStorage.getItem("latestClickMenuPath")||"").replace("/app","");return r&&$1[r]&&$1[r].some(c=>e.replace("/app","").includes(c))?a===r?5:4:i.pathname===o.pathname&&i.search===o.search?3:i.pathname===o.pathname?2:o.pathname.startsWith(i.pathname)?1:0}function V1(t,e){const n=t.map(a=>({item:a,priority:a.path?j6(a.path,e):0})).filter(a=>a.priority>0);console.log(" index.tsx ~ matchedItems:",n);const r=n.length>0?n.reduce((a,c)=>c.priority>a.priority?c:a).item:null,i=[];let o=r;for(;o;)i.unshift(o),o=t.find(a=>a.id===(o==null?void 0:o.parentKey))||null;return i}function oP(t,e){return t.map(n=>{var r;return(r=n.children)!=null&&r.length?(n.path="",n.children=oP(n.children,e)):n.path=e(n.path),n})}function sP(t){return t.map(n=>n.path&&!n.path.includes("http")&&n.path.includes("/")?{...n,path:window.location.origin+"/app"+n.path}:(n.children&&(n.children=sP(n.children)),n))}function B6(t){return ye.jsx(Xv,{id:"global-menu-container",styles:[JT,R6,A6],style:{zIndex:"var(--menu-z-index)",position:"relative"},className:"backdrop-delay-transition",children:ye.jsx(N6,{...t})})}const Bh={"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"},$6=()=>{const{t}=TT();return ye.jsx("div",{className:"unauth__container "+Bh["page-container"],children:ye.jsxs("div",{className:"unauth__main-content "+Bh["page-main-content"],children:[ye.jsx(V6,{}),ye.jsxs("div",{className:"unauth__main-text",children:[ye.jsx("h2",{className:"unauth__main-text__title "+Bh["page-title"],children:t("components.unauthorizedPage.title")}),ye.jsxs("p",{className:"unauth__main-text__desc "+Bh["text-base"],children:[t("components.unauthorizedPage.description1")," ",ye.jsx("br",{})," ",t("components.unauthorizedPage.description2")]})]})]})})},V6=()=>ye.jsxs("svg",{width:"61",height:"60",viewBox:"0 0 61 60",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ye.jsxs("g",{filter:"url(#filter0_d_10800_50471)",children:[ye.jsx("rect",{x:"2.5",y:"1",width:"56",height:"56",rx:"28",fill:"white"}),ye.jsx("path",{d:"M24.6667 27.833V23.1663C24.6667 21.6192 25.2812 20.1355 26.3752 19.0416C27.4692 17.9476 28.9529 17.333 30.5 17.333C32.0471 17.333 33.5308 17.9476 34.6248 19.0416C35.7188 20.1355 36.3333 21.6192 36.3333 23.1663V27.833M22.3333 27.833H38.6667C39.9553 27.833 41 28.8777 41 30.1663V38.333C41 39.6217 39.9553 40.6663 38.6667 40.6663H22.3333C21.0447 40.6663 20 39.6217 20 38.333V30.1663C20 28.8777 21.0447 27.833 22.3333 27.833Z",stroke:"#292929","stroke-width":"2.33333","stroke-linecap":"round","stroke-linejoin":"round"})]}),ye.jsx("defs",{children:ye.jsxs("filter",{id:"filter0_d_10800_50471",x:"0.5",y:"0",width:"60",height:"60",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[ye.jsx("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),ye.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),ye.jsx("feOffset",{dy:"1"}),ye.jsx("feGaussianBlur",{stdDeviation:"1"}),ye.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.0627451 0 0 0 0 0.0941176 0 0 0 0 0.156863 0 0 0 0.05 0"}),ye.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_10800_50471"}),ye.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_10800_50471",result:"shape"})]})})]});var Ep={exports:{}};/**
|
|
137
137
|
* @license
|
|
138
138
|
* Lodash <https://lodash.com/>
|
|
139
139
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
package/dist/share/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index.esm2017-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index.esm2017-cRBu24nr.cjs"),m=require("axios"),u=require("react"),d=require("react-router-dom"),a=require("react/jsx-runtime");require("@r2wc/react-to-web-component");require("@mui/material");require("react-query");require("react-dom");require("moment");const h=s=>{const[t,r]=u.useState([]);return u.useEffect(()=>{m.get(`${s}/user-management/api/v1/users/my-account/permissions`,{withCredentials:!0}).then(o=>r(o.data)).catch(o=>{console.error("Getting user permission error:",o)})},[s]),t},p=s=>{const t=d.useLocation();if(u.useEffect(()=>{var o,i;let r=t.pathname+t.search+t.hash;s&&!r.includes(s)&&(r=s+r),console.log("🚀 ~ PrivateLayout.tsx ~ fullPath:",r),(i=(o=window.top)==null?void 0:o.shellNavigate)==null||i.call(o,"/app"+r,{replace:!0})},[t,s]),window.self===window.top){console.log("useSyncRouter: Navigate to /app path"),window.location.href=window.location.href.replace(window.origin,`${window.origin}/app`);return}};function g({open:s,disabled:t}){u.useMemo(()=>{var r,o,i,n;t||(s?(o=(r=window.top)==null?void 0:r.HostBridge)==null||o.openBackdrop(!0):(n=(i=window.top)==null?void 0:i.HostBridge)==null||n.openBackdrop(!1))},[s,t])}const l=(s,t)=>(r,o)=>{const n=e.useUserPermissions({axiosInstance:t,baseUrl:s}).data;return n?o?r.every(c=>n==null?void 0:n.includes(c)):r.some(c=>n==null?void 0:n.includes(c)):!1},f=({baseUrl:s,accessWith:t,requireAll:r,children:o})=>l(s)(t,r)?a.jsx(a.Fragment,{children:o}):null,P=({accessWith:s,requireAll:t,baseUrl:r,children:o})=>l(r)(s,t)?a.jsx(a.Fragment,{children:o}):a.jsx(e.UnauthorizedPage,{});exports.AuthContext=e.AuthContext;exports.AuthProvider=e.AuthProvider;exports.ERROR_MESSAGE=e.ERROR_MESSAGE;exports.SaasThemeProvider=e.SaasThemeProvider;exports.TranslationProvider=e.TranslationProvider;exports.X_AUTO_CANCEL=e.X_AUTO_CANCEL;exports.axiosInstance=e.axiosInstance;exports.color=e.color;exports.createCustomTheme=e.createCustomTheme;exports.handleErrorAxios=e.handleErrorAxios;exports.isCanceledError=e.isCanceledError;exports.login=e.login;exports.logout=e.logout;exports.requestInterceptor=e.requestInterceptor;exports.responseInterceptor=e.responseInterceptor;exports.search=e.search;exports.setFavicon=e.setFavicon;exports.setShellBackdrop=e.setShellBackdrop;exports.translate=e.translate;exports.translationConfig=e.translationConfig;exports.useAuth=e.useAuth;exports.useCustomTranslation=e.useCustomTranslation;exports.useTheme=e.useTheme;exports.useTranslation=e.useTranslation;exports.HasPermission=f;exports.PermissionRoute=P;exports.getUseHasPermission=l;exports.useGetPermission=h;exports.useSyncBackdrop=g;exports.useSyncRouter=p;
|
package/dist/share/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as p, U as l } from "../index.esm2017-
|
|
2
|
-
import { R as L, T as N, V as O, a7 as _, a4 as $, X as j, a as D, c as F, a5 as M, Z as X, $ as q, W as z, Y as V, a1 as Y, a0 as Z, v as J, a6 as K, s as Q, t as W, a2 as b, e as ee, u as se, j as oe, a3 as re } from "../index.esm2017-
|
|
1
|
+
import { O as p, U as l } from "../index.esm2017-LkE38fXY.js";
|
|
2
|
+
import { R as L, T as N, V as O, a7 as _, a4 as $, X as j, a as D, c as F, a5 as M, Z as X, $ as q, W as z, Y as V, a1 as Y, a0 as Z, v as J, a6 as K, s as Q, t as W, a2 as b, e as ee, u as se, j as oe, a3 as re } from "../index.esm2017-LkE38fXY.js";
|
|
3
3
|
import d from "axios";
|
|
4
4
|
import { useState as f, useEffect as u, useMemo as h } from "react";
|
|
5
5
|
import { useLocation as w } from "react-router-dom";
|
package/package.json
CHANGED
package/web-components-bundle/{SaasThemeProvider-A_eMJWqw.js → SaasThemeProvider-DUpoV8xb.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as j, r as b } from "./react-to-web-component-
|
|
1
|
+
import { a as j, r as b } from "./react-to-web-component-w5r1Fs9q.js";
|
|
2
2
|
function c() {
|
|
3
3
|
return c = Object.assign ? Object.assign.bind() : function(t) {
|
|
4
4
|
for (var e = 1; e < arguments.length; e++) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../react-to-web-component-
|
|
2
|
-
import { V as e } from "../index-
|
|
3
|
-
import "../SaasThemeProvider-
|
|
1
|
+
import "../react-to-web-component-w5r1Fs9q.js";
|
|
2
|
+
import { V as e } from "../index-BBl8HzU3.js";
|
|
3
|
+
import "../SaasThemeProvider-DUpoV8xb.js";
|
|
4
4
|
export {
|
|
5
5
|
e as BaseBreadcrumbs
|
|
6
6
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import "../react-to-web-component-
|
|
2
|
-
import { F, u as v } from "../index-
|
|
3
|
-
import "../index-
|
|
4
|
-
import "../index-
|
|
5
|
-
import "../index-
|
|
6
|
-
import "../react-toastify.esm-
|
|
1
|
+
import "../react-to-web-component-w5r1Fs9q.js";
|
|
2
|
+
import { F, u as v } from "../index-CX8kHN1R.js";
|
|
3
|
+
import "../index-N6zjI_u_.js";
|
|
4
|
+
import "../index-BBl8HzU3.js";
|
|
5
|
+
import "../index-Ch-015PG.js";
|
|
6
|
+
import "../react-toastify.esm-H_Xdunfj.js";
|
|
7
7
|
import "../toast-config/index.js";
|
|
8
8
|
import "../toast-config-notification/index.js";
|
|
9
|
-
import "../SaasThemeProvider-
|
|
9
|
+
import "../SaasThemeProvider-DUpoV8xb.js";
|
|
10
10
|
export {
|
|
11
11
|
F as FavoriteMenu,
|
|
12
12
|
v as updateFavoriteItems
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "../react-to-web-component-
|
|
2
|
-
import { G as e } from "../index-
|
|
3
|
-
import "../index-
|
|
4
|
-
import "../index-
|
|
5
|
-
import "../SaasThemeProvider-
|
|
6
|
-
import "../index-
|
|
1
|
+
import "../react-to-web-component-w5r1Fs9q.js";
|
|
2
|
+
import { G as e } from "../index-CX8kHN1R.js";
|
|
3
|
+
import "../index-N6zjI_u_.js";
|
|
4
|
+
import "../index-BBl8HzU3.js";
|
|
5
|
+
import "../SaasThemeProvider-DUpoV8xb.js";
|
|
6
|
+
import "../index-Ch-015PG.js";
|
|
7
7
|
export {
|
|
8
8
|
e as GlobalMenu
|
|
9
9
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "../react-to-web-component-
|
|
2
|
-
import { L as s, T as L } from "../index-
|
|
3
|
-
import "../index-
|
|
4
|
-
import "../index-
|
|
5
|
-
import "../index-
|
|
6
|
-
import "../SaasThemeProvider-
|
|
7
|
-
import "../react-toastify.esm-
|
|
1
|
+
import "../react-to-web-component-w5r1Fs9q.js";
|
|
2
|
+
import { L as s, T as L } from "../index-CX8kHN1R.js";
|
|
3
|
+
import "../index-N6zjI_u_.js";
|
|
4
|
+
import "../index-Ch-015PG.js";
|
|
5
|
+
import "../index-BBl8HzU3.js";
|
|
6
|
+
import "../SaasThemeProvider-DUpoV8xb.js";
|
|
7
|
+
import "../react-toastify.esm-H_Xdunfj.js";
|
|
8
8
|
import "../toast-config/index.js";
|
|
9
9
|
import "../toast-config-notification/index.js";
|
|
10
10
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../react-to-web-component-
|
|
2
|
-
import { H as o, g as r } from "../index-
|
|
1
|
+
import "../react-to-web-component-w5r1Fs9q.js";
|
|
2
|
+
import { H as o, g as r } from "../index-CX8kHN1R.js";
|
|
3
3
|
export {
|
|
4
4
|
o as HasPermission,
|
|
5
5
|
r as getUseHasPermission
|