"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkL7BQMCCIjs = require('./chunk-L7BQMCCI.js');var _chunkEFEZKNU3js = require('./chunk-EFEZKNU3.js');var _react = require('react');var _Popover = require('@mui/material/Popover'); var _Popover2 = _interopRequireDefault(_Popover);var _Stack = require('@mui/material/Stack'); var _Stack2 = _interopRequireDefault(_Stack);var _navigation = require('next/navigation');var _jsxruntime = require('react/jsx-runtime');function f(e){"@babel/helpers - typeof";return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(e)}function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function S(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?g(Object(r),!0).forEach(function(n){_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _(e,t,r){return(t=w(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w(e){var t=A(e,"string");return f(t)=="symbol"?t:t+""}function A(e,t){if(f(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(f(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function E(e,t){return L(e)||I(e,t)||M(e,t)||x()}function x(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M(e,t){if(e){if(typeof e=="string")return O(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?O(e,t):void 0}}function O(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function I(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,u,c,i=[],a=!0,s=!1;try{if(u=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;a=!1}else for(;!(a=(n=u.call(r)).done)&&(i.push(n.value),i.length!==t);a=!0);}catch(l){s=!0,o=l}finally{try{if(!a&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(s)throw o}}return i}}function L(e){if(Array.isArray(e))return e}var P=function(t){var r=t.data,n=t.depth,o=t.slotProps,u=_react.useRef.call(void 0, null),c=_navigation.usePathname.call(void 0, ),i=_chunkEFEZKNU3js.a.call(void 0, r.path,!!r.children),a=_react.useState.call(void 0, !1),s=E(a,2),l=s[0],y=s[1],m=_react.useCallback.call(void 0, function(){y(!1)},[]);_react.useEffect.call(void 0, function(){l&&m()},[c]);var b=_react.useCallback.call(void 0, function(){r.children&&y(!0)},[r.children]);return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _chunkL7BQMCCIjs.a,{ref:u,open:l,onMouseEnter:b,onMouseLeave:m,itemData:r,depth:n,hasChild:!!r.children,active:i,className:i?"active":"",sx:n===1?_optionalChain([o, 'optionalAccess', _2 => _2.rootItem]):_optionalChain([o, 'optionalAccess', _3 => _3.subItem])}),!!r.children&&_jsxruntime.jsx.call(void 0, _Popover2.default,{disableScrollLock:!0,open:l,anchorEl:u.current,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},slotProps:{paper:{onMouseEnter:b,onMouseLeave:m,sx:S({mt:.5,minWidth:160},l&&{pointerEvents:"auto"})}},sx:{pointerEvents:"none"},children:_jsxruntime.jsx.call(void 0, _Stack2.default,{spacing:.5,children:r.children.map(function(v){return _jsxruntime.jsx.call(void 0, P,{data:v,depth:n+1,slotProps:o},v.title)})})})]})},G= exports.a =P;exports.a = G;
//# sourceMappingURL=chunk-TQOKVL6Q.js.map