PageSourceSearch

https://diks.net/_next/static/chunks/35jb2hxw11r89.js

js diks.net collected 2026-09-24 10:28:03 UTC 79,473 bytes, 2,036 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="1aeb6e9a-a663-59e0-f3fd-d3c6ca31aa3e")}catch(e){}}();
2(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined,
3911385, ((__turbopack_context__) => {
4"use strict";
5
6// MERGED MODULE: [project]/node_modules/react-focus-on/dist/es2015/Combination.js [app-client] (ecmascript)
7;
8var __TURBOPACK__imported__module__290571__ = __turbopack_context__.i(290571);
9var __TURBOPACK__imported__module__271645__ = __turbopack_context__.i(271645);
10// MERGED MODULE: [project]/node_modules/react-focus-on/dist/es2015/UI.js [app-client] (ecmascript) <locals>
11;
12var __TURBOPACK__imported__module__290571__1 = __TURBOPACK__imported__module__290571__;
13var __TURBOPACK__imported__module__271645__1 = __TURBOPACK__imported__module__271645__;
14var __TURBOPACK__imported__module__209730__ = __turbopack_context__.i(209730);
15// MERGED MODULE: [project]/node_modules/react-focus-lock/dist/es2015/UI.js [app-client] (ecmascript) <locals>
16;
17// MERGED MODULE: [project]/node_modules/react-focus-lock/dist/es2015/Lock.js [app-client] (ecmascript)
18;
19var __TURBOPACK__imported__module__247167__ = __turbopack_context__.i(247167);
20// MERGED MODULE: [project]/node_modules/@babel/runtime/helpers/esm/extends.js [app-client] (ecmascript)
21;
22function _extends() {
23    return _extends = ("TURBOPACK compile-time truthy", 1) ? Object.assign.bind() : "TURBOPACK unreachable", _extends.apply(null, arguments);
24}
25;
26var __TURBOPACK__imported__module__271645__2 = __TURBOPACK__imported__module__271645__;
27// MERGED MODULE: [project]/node_modules/focus-lock/dist/es2015/constants.js [app-client] (ecmascript)
28;
29var FOCUS_GROUP = 'data-focus-lock';
30var FOCUS_DISABLED = 'data-focus-lock-disabled';
31var FOCUS_ALLOW = 'data-no-focus-lock';
32var FOCUS_AUTO = 'data-autofocus-inside';
33var FOCUS_NO_AUTOFOCUS = 'data-no-autofocus';
34var __TURBOPACK__imported__module__232286__ = __turbopack_context__.i(232286);
35// MERGED MODULE: [project]/node_modules/react-focus-lock/dist/es2015/FocusGuard.js [app-client] (ecmascript)
36;
37var __TURBOPACK__imported__module__247167__1 = __TURBOPACK__imported__module__247167__;
38var __TURBOPACK__imported__module__271645__3 = __TURBOPACK__imported__module__271645__;
39;
40;
41var hiddenGuard = {
42    width: '1px',
43    height: '0px',
44    padding: 0,
45    overflow: 'hidden',
46    position: 'fixed',
47    top: '1px',
48    left: '1px'
49};
50var InFocusGuard = function InFocusGuard(_ref) {
51    var _ref$children = _ref.children, children = _ref$children === void 0 ? null : _ref$children;
52    return /*#__PURE__*/ __TURBOPACK__imported__module__271645__3["default"].createElement(__TURBOPACK__imported__module__271645__3["Fragment"], null, /*#__PURE__*/ __TURBOPACK__imported__module__271645__3["default"].createElement("div", {
53        key: "guard-first",
54        "data-focus-guard": true,
55        "data-focus-auto-guard": true,
56        style: hiddenGuard
57    }), children, children && /*#__PURE__*/ __TURBOPACK__imported__module__271645__3["default"].createElement("div", {
58        key: "guard-last",
59        "data-focus-guard": true,
60        "data-focus-auto-guard": true,
61        style: hiddenGuard
62    }));
63};
64InFocusGuard.propTypes = ("TURBOPACK compile-time falsy", 0) ? "TURBOPACK unreachable" : {};
65const __TURBOPACK__default__export__ = InFocusGuard;
66// MERGED MODULE: [project]/node_modules/react-focus-lock/dist/es2015/medium.js [app-client] (ecmascript)
67;
68var __TURBOPACK__imported__module__386252__ = __turbopack_context__.i(386252);
69;
70var mediumFocus = (0, __TURBOPACK__imported__module__386252__["createMedium"])({}, function(_ref) {
71    var target = _ref.target, currentTarget = _ref.currentTarget;
72    return {
73        target: target,
74        currentTarget: currentTarget
75    };
76});
77var mediumBlur = (0, __TURBOPACK__imported__module__386252__["createMedium"])();
78var mediumEffect = (0, __TURBOPACK__imported__module__386252__["createMedium"])();
79var mediumSidecar = (0, __TURBOPACK__imported__module__386252__["createSidecarMedium"])({
80    async: true,
81    ssr: typeof document !== 'undefined'
82});
83// MERGED MODULE: [project]/node_modules/react-focus-lock/dist/es2015/scope.js [app-client] (ecmascript)
84;
85var __TURBOPACK__imported__module__271645__4 = __TURBOPACK__imported__module__271645__;
86;
87var focusScope = /*#__PURE__*/ (0, __TURBOPACK__imported__module__271645__4["createContext"])(undefined);
88;
89;
90;
91;
92;
93;
94;
95;
96var emptyArray = [];
97var FocusLock = /*#__PURE__*/ (0, __TURBOPACK__imported__module__271645__2["forwardRef"])(function FocusLockUI(props, parentRef) {
98    var _extends2;
99    var _useState = (0, __TURBOPACK__imported__module__271645__2["useState"])(), realObserved = _useState[0], setObserved = _useState[1];
100    var observed = (0, __TURBOPACK__imported__module__271645__2["useRef"])();
101    var isActive = (0, __TURBOPACK__imported__module__271645__2["useRef"])(false);
102    var originalFocusedElement = (0, __TURBOPACK__imported__module__271645__2["useRef"])(null);
103    var _useState2 = (0, __TURBOPACK__imported__module__271645__2["useState"])({}), update = _useState2[1];
104    var children = props.children, _props$disabled = props.disabled, disabled = _props$disabled === void 0 ? false : _props$disabled, _props$noFocusGuards = props.noFocusGuards, noFocusGuards = _props$noFocusGuards === void 0 ? false : _props$noFocusGuards, _props$persistentFocu = props.persistentFocus, persistentFocus = _props$persistentFocu === void 0 ? false : _props$persistentFocu, _props$crossFrame = props.crossFrame, crossFrame = _props$crossFrame === void 0 ? true : _props$crossFrame, _props$autoFocus = props.autoFocus, autoFocus = _props$autoFocus === void 0 ? true : _props$autoFocus, allowTextSelection = props.allowTextSelection, group = props.group, className = props.className, whiteList = props.whiteList, hasPositiveIndices = props.hasPositiveIndices, _props$shards = props.shards, shards = _props$shards === void 0 ? emptyArray : _props$shards, _props$as = props.as, Container = _props$as === void 0 ? 'div' : _props$as, _props$lockProps = props.lockProps, containerProps = _props$lockProps === void 0 ? {}
104 : _props$lockProps, SideCar = props.sideCar, _props$returnFocus = props.returnFocus, shouldReturnFocus = _props$returnFocus === void 0 ? false : _props$returnFocus, focusOptions = props.focusOptions, onActivationCallback = props.onActivation, onDeactivationCallback = props.onDeactivation;
105    var _useState3 = (0, __TURBOPACK__imported__module__271645__2["useState"])({}), id = _useState3[0];
106    var onActivation = (0, __TURBOPACK__imported__module__271645__2["useCallback"])(function(_ref) {
107        var captureFocusRestore = _ref.captureFocusRestore;
108        if (!originalFocusedElement.current) {
109            var _document;
110            var activeElement = (_document = document) == null ? void 0 : _document.activeElement;
111            originalFocusedElement.current = activeElement;
112            if (activeElement !== document.body) {
113                originalFocusedElement.current = captureFocusRestore(activeElement);
114            }
115        }
116        if (observed.current && onActivationCallback) {
117            onActivationCallback(observed.current);
118        }
119        isActive.current = true;
120        update();
121    }, [
122        onActivationCallback
123    ]);
124    var onDeactivation = (0, __TURBOPACK__imported__module__271645__2["useCallback"])(function() {
125        isActive.current = false;
126        if (onDeactivationCallback) {
127            onDeactivationCallback(observed.current);
128        }
129        update();
130    }, [
131        onDeactivationCallback
132    ]);
133    var returnFocus = (0, __TURBOPACK__imported__module__271645__2["useCallback"])(function(allowDefer) {
134        var focusRestore = originalFocusedElement.current;
135        if (focusRestore) {
136            var returnFocusTo = (typeof focusRestore === 'function' ? focusRestore() : focusRestore) || document.body;
137            var howToReturnFocus = typeof shouldReturnFocus === 'function' ? shouldReturnFocus(returnFocusTo) : shouldReturnFocus;
138            if (howToReturnFocus) {
139                var returnFocusOptions = typeof howToReturnFocus === 'object' ? howToReturnFocus : undefined;
140                originalFocusedElement.current = null;
141                if (allowDefer) {
142                    Promise.resolve().then(function() {
143                        return returnFocusTo.focus(returnFocusOptions);
144                    });
145                } else {
146                    returnFocusTo.focus(returnFocusOptions);
147                }
148            }
149        }
150    }, [
151        shouldReturnFocus
152    ]);
153    var onFocus = (0, __TURBOPACK__imported__module__271645__2["useCallback"])(function(event) {
154        if (isActive.current) {
155            mediumFocus.useMedium(event);
156        }
157    }, []);
158    var onBlur = mediumBlur.useMedium;
159    var setObserveNode = (0, __TURBOPACK__imported__module__271645__2["useCallback"])(function(newObserved) {
160        if (observed.current !== newObserved) {
161            observed.current = newObserved;
162            setObserved(newObserved);
163        }
164    }, []);
165    if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable
166    ;
167    var lockProps = _extends((_extends2 = {}, _extends2[FOCUS_DISABLED] = disabled && 'disabled', _extends2[FOCUS_GROUP] = group, _extends2), containerProps);
168    var hasLeadingGuards = noFocusGuards !== true;
169    var hasTailingGuards = hasLeadingGuards && noFocusGuards !== 'tail';
170    var mergedRef = (0, __TURBOPACK__imported__module__232286__["useMergeRefs"])([
171        parentRef,
172        setObserveNode
173    ]);
174    var focusScopeValue = (0, __TURBOPACK__imported__module__271645__2["useMemo"])(function() {
175        return {
176            observed: observed,
177            shards: shards,
178            enabled: !disabled,
179            get active () {
180                return isActive.current;
181            }
182        };
183    }, [
184        disabled,
185        isActive,
186        shards,
187        observed
188    ]);
189    return /*#__PURE__*/ __TURBOPACK__imported__module__271645__2["default"].createElement(__TURBOPACK__imported__module__271645__2["Fragment"], null, hasLeadingGuards && [
190        /*#__PURE__*/ __TURBOPACK__imported__module__271645__2["default"].createElement("div", {
191            key: "guard-first",
192            "data-focus-guard": true,
193            tabIndex: disabled ? -1 : 0,
194            style: hiddenGuard
195        }),
196        hasPositiveIndices ? /*#__PURE__*/ __TURBOPACK__imported__module__271645__2["default"].createElement("div", {
197            key: "guard-nearest",
198            "data-focus-guard": true,
199            tabIndex: disabled ? -1 : 1,
200            style: hiddenGuard
201        }) : null
202    ], !disabled && /*#__PURE__*/ __TURBOPACK__imported__module__271645__2["default"].createElement(SideCar, {
203        id: id,
204        sideCar: mediumSidecar,
205        observed: realObserved,
206        disabled: disabled,
207        persistentFocus: persistentFocus,
208        crossFrame: crossFrame,
209        autoFocus: autoFocus,
210        whiteList: whiteList,
211        shards: shards,
212        onActivation: onActivation,
213        onDeactivation: onDeactivation,
214        returnFocus: returnFocus,
215        focusOptions: focusOptions,
216        noFocusGuards: noFocusGuards
217    }), /*#__PURE__*/ __TURBOPACK__imported__module__271645__2["default"].createElement(Container, _extends({
218        ref: mergedRef
219    }, lockProps, {
220        className: className,
221        onBlur: onBlur,
222        onFocus: onFocus
223    }), /*#__PURE__*/ __TURBOPACK__imported__module__271645__2["default"].createElement(focusScope.Provider, {
224        value: focusScopeValue
225    }, children)), hasTailingGuards && /*#__PURE__*/ __TURBOPACK__imported__module__271645__2["default"].createElement("div", {
226        "data-focus-guard": true,
227        tabIndex: disabled ? -1 : 0,
228        style: hiddenGuard
229    }));
230});
231FocusLock.propTypes = ("TURBOPACK compile-time falsy", 0) ? "TURBOPACK unreachable" : {};
232const __TURBOPACK__default__export__1 = FocusLock;
233// MERGED MODULE: [project]/node_modules/react-focus-lock/dist/es2015/AutoFocusInside.js [app-client] (ecmascript)
234;
235var __TURBOPACK__imported__module__247167__2 = __TURBOPACK__imported__module__247167__;
236var __TURBOPACK__imported__module__271645__5 = __TURBOPACK__imported__module__271645__;
237// MERGED MODULE: [project]/node_modules/react-focus-lock/dist/es2015/util.js [app-client] (ecmascript)
238;
239function deferAction(action) {
240    setTimeout(action, 1);
241}
242var inlineProp = function inlineProp(name, value) {
243    var obj = {};
244    obj[name] = value;
245    return obj;
246};
247var extractRef = function extractRef(ref) {
248    return ref && 'current' in ref ? ref.current : ref;
249};
250;
251;
252;
253;
254;
255var AutoFocusInside = function AutoFocusInside(_ref) {
256    var _ref$disabled = _ref.disabled, disabled = _ref$disabled === void 0 ? false : _ref$disabled, children = _ref.children, _ref$className = _ref.className, className = _ref$className === void 0 ? undefined : _ref$className;
257    return /*#__PURE__*/ __TURBOPACK__imported__module__271645__5["default"].createElement("div", _extends({}, inlineProp(FOCUS_AUTO, !disabled), {
258        className: className
259    }), children);
260};
261AutoFocusInside.propTypes = ("TURBOPACK compile-time falsy", 0) ? "TURBOPACK unreachable" : {};
262const __TURBOPACK__default__export__2 = AutoFocusInside;
263// MERGED MODULE: [project]/node_modules/react-focus-lock/dist/es2015/MoveFocusInside.js [app-client] (ecmascript)
264;
265var __TURBOPACK__imported__module__247167__3 = __TURBOPACK__imported__module__247167__;
266var __TURBOPACK__imported__module__271645__6 = __TURBOPACK__imported__module__271645__;
267;
268;
269;
270;
271;
272;
273var useFocusInside = function useFocusInside(observedRef) {
274    (0, __TURBOPACK__imported__module__271645__6["useEffect"])(function() {
275        var enabled = true;
276        mediumEffect.useMedium(function(car) {
277            var observed = observedRef && observedRef.current;
278            if (enabled && observed) {
279                if (!car.focusInside(observed)) {
280                    car.moveFocusInside(observed, null);
281                }
282            }
283        });
284        return function() {
285            enabled = false;
286        };
287    }, [
288        observedRef
289    ]);
290};
291function MoveFocusInside(_ref) {
292    var _ref$disabled = _ref.disabled, isDisabled = _ref$disabled === void 0 ? false : _ref$disabled, className = _ref.className, children = _ref.children;
293    var ref = (0, __TURBOPACK__imported__module__271645__6["useRef"])(null);
294    useFocusInside(isDisabled ? undefined : ref);
295    return /*#__PURE__*/ __TURBOPACK__imported__module__271645__6["default"].createElement("div", _extends({}, inlineProp(FOCUS_AUTO, !isDisabled), {
296        ref: ref,
297        className: className
298    }), children);
299}
300MoveFocusInside.propTypes = ("TURBOPACK compile-time falsy", 0) ? "TURBOPACK unreachable" : {};
301const __TURBOPACK__default__export__3 = MoveFocusInside;
302// MERGED MODULE: [project]/node_modules/react-focus-lock/dist/es2015/FreeFocusInside.js [app-client] (ecmascript)
303;
304var __TURBOPACK__imported__module__247167__4 = __TURBOPACK__imported__module__247167__;
305var __TURBOPACK__imported__module__271645__7 = __TURBOPACK__imported__module__271645__;
306;
307;
308;
309;
310;
311var FreeFocusInside = function FreeFocusInside(_ref) {
312    var children = _ref.children, className = _ref.className;
313    return /*#__PURE__*/ __TURBOPACK__imported__module__271645__7["default"].createElement("div", _extends({}, inlineProp(FOCUS_ALLOW, true), {
314        className: className
315    }), children);
316};
317FreeFocusInside.propTypes = ("TURBOPACK compile-time falsy", 0) ? "TURBOPACK unreachable" : {};
318const __TURBOPACK__default__export__4 = FreeFocusInside;
319// MERGED MODULE: [project]/node_modules/react-focus-lock/dist/es2015/use-focus-scope.js [app-client] (ecmascript)
320;
321var __TURBOPACK__imported__module__271645__8 = __TURBOPACK__imported__module__271645__;
322;
323;
324;
325;
326;
327var collapseRefs = function collapseRefs(shards) {
328    return shards.map(extractRef).filter(Boolean);
329};
330var withMedium = function withMedium(fn) {
331    return new Promise(function(resolve) {
332        return mediumEffect.useMedium(function() {
333            resolve(fn.apply(void 0, arguments));
334        });
335    });
336};
337var useFocusController = function useFocusController() {
338    for(var _len = arguments.length, shards = new Array(_len), _key = 0; _key < _len; _key++){
339        shards[_key] = arguments[_key];
340    }
341    if (!shards.length) {
342        throw new Error('useFocusController requires at least one target element');
343    }
344    var ref = (0, __TURBOPACK__imported__module__271645__8["useRef"])(shards);
345    ref.current = shards;
346    return (0, __TURBOPACK__imported__module__271645__8["useMemo"])(function() {
347        return {
348            autoFocus: function autoFocus(focusOptions) {
349                if (focusOptions === void 0) {
350                    focusOptions = {};
351                }
352                return withMedium(function(car) {
353                    return car.moveFocusInside(collapseRefs(ref.current), null, focusOptions);
354                });
355            },
356            focusNext: function focusNext(options) {
357                return withMedium(function(car) {
358                    car.moveFocusInside(collapseRefs(ref.current), null);
359                    car.focusNextElement(document.activeElement, _extends({
360                        scope: collapseRefs(ref.current)
361                    }, options));
362                });
363            },
364            focusPrev: function focusPrev(options) {
365                return withMedium(function(car) {
366                    car.moveFocusInside(collapseRefs(ref.current), null);
367                    car.focusPrevElement(document.activeElement, _extends({
368                        scope: collapseRefs(ref.current)
369                    }, options));
370                });
371            },
372            focusFirst: function focusFirst(options) {
373                return withMedium(function(car) {
374                    car.focusFirstElement(collapseRefs(ref.current), options);
375                });
376            },
377            focusLast: function focusLast(options) {
378                return withMedium(function(car) {
379                    car.focusLastElement(collapseRefs(ref.current), options);
380                });
381            }
382        };
383    }, []);
384};
385var useFocusScope = function useFocusScope() {
386    var scope = (0, __TURBOPACK__imported__module__271645__8["useContext"])(focusScope);
387    if (!scope) {
388        throw new Error('FocusLock is required to operate with FocusScope');
389    }
390    return useFocusController.apply(void 0, [
391        scope.observed
392    ].concat(scope.shards));
393};
394// MERGED MODULE: [project]/node_modules/react-focus-lock/dist/es2015/use-focus-state.js [app-client] (ecmascript)
395;
396var __TURBOPACK__imported__module__271645__9 = __TURBOPACK__imported__module__271645__;
397// MERGED MODULE: [project]/node_modules/react-focus-lock/dist/es2015/nano-events.js [app-client] (ecmascript)
398;
399var createNanoEvents = function createNanoEvents() {
400    return {
401        emit: function emit(event) {
402            for(var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
403                args[_key - 1] = arguments[_key];
404            }
405            for(var i = 0, callbacks = this.events[event] || [], length = callbacks.length; i < length; i++){
406                callbacks[i].apply(callbacks, args);
407            }
408        },
409        events: {},
410        on: function on(event, cb) {
411            var _this$events, _this = this;
412            ((_this$events = this.events)[event] || (_this$events[event] = [])).push(cb);
413            return function() {
414                var _this$events$event;
415                _this.events[event] = (_this$events$event = _this.events[event]) == null ? void 0 : _this$events$event.filter(function(i) {
416                    return cb !== i;
417                });
418            };
419        }
420    };
421};
422;
423;
424var mainbus = createNanoEvents();
425var subscribeCounter = 0;
426var onFocusIn = function onFocusIn(event) {
427    return mainbus.emit('assign', event.target);
428};
429var onFocusOut = function onFocusOut(event) {
430    return mainbus.emit('reset', event.target);
431};
432var useDocumentFocusSubscribe = function useDocumentFocusSubscribe() {
433    (0, __TURBOPACK__imported__module__271645__9["useEffect"])(function() {
434        if (!subscribeCounter) {
435            document.addEventListener('focusin', onFocusIn);
436            document.addEventListener('focusout', onFocusOut);
437        }
438        subscribeCounter += 1;
439        return function() {
440            subscribeCounter -= 1;
441            if (!subscribeCounter) {
442                document.removeEventListener('focusin', onFocusIn);
443                document.removeEventListener('focusout', onFocusOut);
444            }
445        };
446    }, []);
447};
448var getFocusState = function getFocusState(target, current) {
449    if (target === current) {
450        return 'self';
451    }
452    if (current.contains(target)) {
453        return 'within';
454    }
455    return 'within-boundary';
456};
457var useFocusState = function useFocusState(callbacks) {
458    if (callbacks === void 0) {
459        callbacks = {};
460    }
461    var _useState = (0, __TURBOPACK__imported__module__271645__9["useState"])(false), active = _useState[0], setA
461ctive = _useState[1];
462    var _useState2 = (0, __TURBOPACK__imported__module__271645__9["useState"])(''), state = _useState2[0], setState = _useState2[1];
463    var ref = (0, __TURBOPACK__imported__module__271645__9["useRef"])(null);
464    var focusState = (0, __TURBOPACK__imported__module__271645__9["useRef"])({});
465    var stateTracker = (0, __TURBOPACK__imported__module__271645__9["useRef"])(false);
466    (0, __TURBOPACK__imported__module__271645__9["useEffect"])(function() {
467        if (ref.current) {
468            var isAlreadyFocused = ref.current === document.activeElement || ref.current.contains(document.activeElement);
469            setActive(isAlreadyFocused);
470            setState(getFocusState(document.activeElement, ref.current));
471            if (isAlreadyFocused && callbacks.onFocus) {
472                callbacks.onFocus();
473            }
474        }
475    }, []);
476    var onFocus = (0, __TURBOPACK__imported__module__271645__9["useCallback"])(function(e) {
477        focusState.current = {
478            focused: true,
479            state: getFocusState(e.target, e.currentTarget)
480        };
481    }, []);
482    useDocumentFocusSubscribe();
483    (0, __TURBOPACK__imported__module__271645__9["useEffect"])(function() {
484        var fout = mainbus.on('reset', function() {
485            focusState.current = {};
486        });
487        var fin = mainbus.on('assign', function() {
488            var newState = focusState.current.focused || false;
489            setActive(newState);
490            setState(focusState.current.state || '');
491            if (newState !== stateTracker.current) {
492                stateTracker.current = newState;
493                if (newState) {
494                    callbacks.onFocus && callbacks.onFocus();
495                } else {
496                    callbacks.onBlur && callbacks.onBlur();
497                }
498            }
499        });
500        return function() {
501            fout();
502            fin();
503        };
504    }, []);
505    return {
506        active: active,
507        state: state,
508        onFocus: onFocus,
509        ref: ref
510    };
511};
512;
513;
514;
515;
516;
517;
518;
519;
520const __TURBOPACK__default__export__5 = __TURBOPACK__default__export__1;
521// MERGED MODULE: [project]/node_modules/react-focus-on/dist/es2015/medium.js [app-client] (ecmascript)
522;
523var __TURBOPACK__imported__module__386252__1 = __TURBOPACK__imported__module__386252__;
524;
525var effectCar = (0, __TURBOPACK__imported__module__386252__1["createSidecarMedium"])();
526var focusHiddenMarker = 'data-focus-on-hidden';
527;
528;
529;
530;
531;
532var PREVENT_SCROLL = {
533    preventScroll: true
534};
535var FocusOn = __TURBOPACK__imported__module__271645__1["forwardRef"](function(props, parentRef) {
536    var _a = __TURBOPACK__imported__module__271645__1["useState"](false), lockProps = _a[0], setLockProps = _a[1];
537    var _b = __TURBOPACK__imported__module__271645__1["useState"](null), activeNode = _b[0], setActiveNode = _b[1];
538    var children = props.children, autoFocus = props.autoFocus, shards = props.shards, crossFrame = props.crossFrame, _c = props.enabled, enabled = _c === void 0 ? true : _c, _d = props.scrollLock, scrollLock = _d === void 0 ? true : _d, _e = props.focusLock, focusLock = _e === void 0 ? true : _e, _f = props.returnFocus, returnFocus = _f === void 0 ? true : _f, inert = props.inert, allowPinchZoom = props.allowPinchZoom, sideCar = props.sideCar, className = props.className, shouldIgnore = props.shouldIgnore, preventScrollOnFocus = props.preventScrollOnFocus, style = props.style, as = props.as, gapMode = props.gapMode, rest = (0, __TURBOPACK__imported__module__290571__1["__rest"])(props, [
539        "children",
540        "autoFocus",
541        "shards",
542        "crossFrame",
543        "enabled",
544        "scrollLock",
545        "focusLock",
546        "returnFocus",
547        "inert",
548        "allowPinchZoom",
549        "sideCar",
550        "className",
551        "shouldIgnore",
552        "preventScrollOnFocus",
553        "style",
554        "as",
555        "gapMode"
556    ]);
557    var SideCar = sideCar;
558    var appliedLockProps = (0, __TURBOPACK__imported__module__290571__1["__assign"])((0, __TURBOPACK__imported__module__290571__1["__assign"])({}, lockProps), {
559        as: as,
560        style: style,
561        sideCar: sideCar,
562        shards: shards,
563        allowPinchZoom: allowPinchZoom,
564        gapMode: gapMode,
565        inert: inert,
566        enabled: enabled && scrollLock
567    });
568    var onActivation = __TURBOPACK__imported__module__271645__1["useCallback"](function(node) {
569        setActiveNode(node);
570    }, []);
571    var onDeactivation = __TURBOPACK__imported__module__271645__1["useCallback"](function() {
572        setActiveNode(null);
573    }, []);
574    return __TURBOPACK__imported__module__271645__1["createElement"](__TURBOPACK__imported__module__271645__1["Fragment"], null, __TURBOPACK__imported__module__271645__1["createElement"](__TURBOPACK__default__export__5, {
575        ref: parentRef,
576        sideCar: sideCar,
577        disabled: !(enabled && focusLock),
578        returnFocus: returnFocus,
579        autoFocus: autoFocus,
580        shards: shards,
581        crossFrame: crossFrame,
582        onActivation: onActivation,
583        onDeactivation: onDeactivation,
584        className: className,
585        whiteList: shouldIgnore,
586        lockProps: appliedLockProps,
587        focusOptions: preventScrollOnFocus ? PREVENT_SCROLL : undefined,
588        // // ts-expect-error TS2322 - ts v3 "glitch"
589        as: __TURBOPACK__imported__module__209730__["RemoveScroll"]
590    }, children), enabled && __TURBOPACK__imported__module__271645__1["createElement"](SideCar, (0, __TURBOPACK__imported__module__290571__1["__assign"])({}, rest, {
591        sideCar: effectCar,
592        setLockProps: setLockProps,
593        shards: shards,
594        activeNode: activeNode
595    })));
596});
597;
598// MERGED MODULE: [project]/node_modules/react-focus-on/dist/es2015/sidecar.js [app-client] (ecmascript)
599;
600var __TURBOPACK__imported__module__241352__ = __turbopack_context__.i(241352);
601// MERGED MODULE: [project]/node_modules/react-focus-lock/dist/es2015/sidecar.js [app-client] (ecmascript)
602;
603var __TURBOPACK__imported__module__241352__1 = __TURBOPACK__imported__module__241352__;
604// MERGED MODULE: [project]/node_modules/react-focus-lock/dist/es2015/Trap.js [app-client] (ecmascript)
605;
606var __TURBOPACK__imported__module__247167__5 = __TURBOPACK__imported__module__247167__;
607var __TURBOPACK__imported__module__271645__10 = __TURBOPACK__imported__module__271645__;
608// MERGED MODULE: [project]/node_modules/react-clientside-effect/lib/index.es.js [app-client] (ecmascript)
609;
610var __TURBOPACK__imported__module__247167__6 = __TURBOPACK__imported__module__247167__;
611// MERGED MODULE: [project]/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js [app-client] (ecmascript)
612;
613// MERGED MODULE: [project]/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js [app-client] (ecmascript)
614;
615function _setPrototypeOf(t, e) {
616    return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
617        return t.__proto__ = e, t;
618    }, _setPrototypeOf(t, e);
619}
620;
621;
622function _inheritsLoose(t, o) {
623    t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
624}
625;
626// MERGED MODULE: [project]/node_modules/@babel/runtime/helpers/esm/defineProperty.js [app-client] (ecmascript)
627;
628// MERGED MODULE: [project]/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js [app-client] (ecmascript)
629;
630// MERGED MODULE: [project]/node_modules/@babel/runtime/helpers/esm/typeof.js [app-client] (ecmascript)
631;
632function _typeof(o) {
633    "@babel/helpers - typeof";
634    return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
635        return typeof o;
636    } : function(o) {
637        return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
638    }, _typeof(o);
639}
640;
641// MERGED MODULE: [project]/node_modules/@babel/runtime/helpers/esm/toPrimitive.js [app-client] (ecmascript)
642;
643;
644function toPrimitive(t, r) {
645    if ("object" != _typeof(t) || !t) return t;
646    var e = t[Symbol.toPrimitive];
647    if (void 0 !== e) {
648        var i = e.call(t, r || "default");
649        if ("object" != _typeof(i)) return i;
650        throw new TypeError("@@toPrimitive must return a primitive value.");
651    }
652    return ("string" === r ? String : Number)(t);
653}
654;
655;
656;
657function toPropertyKey(t) {
658    var i = toPrimitive(t, "string");
659    return "symbol" == _typeof(i) ? i : i + "";
660}
661;
662;
663function _defineProperty(e, r, t) {
664    return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
665        value: t,
666        enumerable: !0,
667        configurable: !0,
668        writable: !0
669    }) : e[r] = t, e;
670}
671;
672var __TURBOPACK__imported__module__271645__11 = __TURBOPACK__imported__module__271645__;
673;
674;
675;
676function withSideEffect(reducePropsToState, handleStateChangeOnClient) {
677    if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable
678    ;
679    function getDisplayName(WrappedComponent) {
680        return WrappedComponent.displayName || WrappedComponent.name || 'Component';
681    }
682    return function wrap(WrappedComponent) {
683        if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable
684        ;
685        var mountedInstances = [];
686        var state;
687        function emitChange() {
688            state = reducePropsToState(mountedInstances.map(function(instance) {
689                return instance.props;
690            }));
691            handleStateChangeOnClient(state);
692        }
693        var SideEffect = /*#__PURE__*/ function(_PureComponent) {
694            _inheritsLoose(SideEffect, _PureComponent);
695            function SideEffect() {
696                return _PureComponent.apply(this, arguments) || this;
697            }
698            // Try to use displayName of wrapped component
699            SideEffect.peek = function peek() {
700                return state;
701            };
702            var _proto = SideEffect.prototype;
703            _proto.componentDidMount = function componentDidMount() {
704                mountedInstances.push(this);
705                emitChange();
706            };
707            _proto.componentDidUpdate = function componentDidUpdate() {
708                emitChange();
709            };
710            _proto.componentWillUnmount = function componentWillUnmount() {
711                var index = mountedInstances.indexOf(this);
712                mountedInstances.splice(index, 1);
713                emitChange();
714            };
715            _proto.render = function render() {
716                return /*#__PURE__*/ __TURBOPACK__imported__module__271645__11["default"].createElement(WrappedComponent, this.props);
717            };
718            return SideEffect;
719        }(__TURBOPACK__imported__module__271645__11["PureComponent"]);
720        _defineProperty(SideEffect, "displayName", "SideEffect(" + getDisplayName(WrappedComponent) + ")");
721        return SideEffect;
722    };
723}
724const __TURBOPACK__default__export__6 = withSideEffect;
725// MERGED MODULE: [project]/node_modules/focus-lock/dist/es2015/moveFocusInside.js [app-client] (ecmascript)
726;
727// MERGED MODULE: [project]/node_modules/focus-lock/dist/es2015/commands.js [app-client] (ecmascript)
728;
729var focusOn = function(target, focusOptions) {
730    if (!target) {
731        // not clear how, but is possible https://github.com/theKashey/focus-lock/issues/53
732        return;
733    }
734    if ('focus' in target) {
735        target.focus(focusOptions);
736    }
737    if ('contentWindow' in target && target.contentWindow) {
738        target.contentWindow.focus();
739    }
740};
741// MERGED MODULE: [project]/node_modules/focus-lock/dist/es2015/focusSolver.js [app-client] (ecmascript)
742;
743// MERGED MODULE: [project]/node_modules/focus-lock/dist/es2015/solver.js [app-client] (ecmascript)
744;
745// MERGED MODULE: [project]/node_modules/focus-lock/dist/es2015/utils/correctFocus.js [app-client] (ecmascript)
746;
747// MERGED MODULE: [project]/node_modules/focus-lock/dist/es2015/utils/is.js [app-client] (ecmascript)
748;
749;
750var isElementHidden = function(node) {
751    // we can measure only "elements"
752    // consider others as "visible"
753    if (node.nodeType !== Node.ELEMENT_NODE) {
754        return false;
755    }
756    var computedStyle = window.getComputedStyle(node, null);
757    if (!computedStyle || !computedStyle.getPropertyValue) {
758        return false;
759    }
760    return computedStyle.getPropertyValue('display') === 'none' || computedStyle.getPropertyValue('visibility') === 'hidden';
761};
762var getParentNode = function(node) {
763    // DOCUMENT_FRAGMENT_NODE can also point on ShadowRoot. In this case .host will point on the next node
764    return node.parentNode && node.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? node.parentNode.host : node.parentNode;
765};
766var isTopNode = function(node) {
767    // @ts-ignore
768    return node === document || node && node.nodeType === Node.DOCUMENT_NODE;
769};
770var isInert = function(node) {
771    return node.hasAttribute('inert');
772};
773/**
774 * @see https://github.com/testing-library/jest-dom/blob/main/src/to-be-visible.js
775 */ var isVisibleUncached = function(node, checkParent) {
776    return !node || isTopNode(node) || !isElementHidden(node) && !isInert(node) && checkParent(getParentNode(node));
777};
778var isVisibleCached = function(visibilityCache, node) {
779    var cached = visibilityCache.get(node);
780    if (cached !== undefined) {
781        return cached;
782    }
783    var result = isVisibleUncached(node, isVisibleCached.bind(undefined, visibilityCache));
784    visibilityCache.set(node, result);
785    return result;
786};
787var isAutoFocusAllowedUncached = function(node, checkParent) {
788    return node && !isTopNode(node) ? isAutoFocusAllowed(node) ? checkParent(getParentNode(node)) : false : true;
789};
790var isAutoFocusAllowedCached = function(cache, node) {
791    var cached = cache.get(node);
792    if (cached !== undefined) {
793        return cached;
794    }
795    var result = isAutoFocusAllowedUncached(node, isAutoFocusAllowedCached.bind(undefined, cache));
796    cache.set(node, result);
797    return result;
798};
799var getDataset = function(node) {
800    // @ts-ignore
801    return node.dataset;
802};
803var isHTMLButtonElement = function(node) {
804    return node.tagName === 'BUTTON';
805};
806var isHTMLInputElement = function(node) {
807    return node.tagName === 'INPUT';
808};
809var isRadioElement = function(node) {
810    return isHTMLInputElement(node) && node.type === 'radio';
811};
812var notHiddenInput = function(node) {
813    return !((isHTMLInputElement(node) || isHTMLButtonElement(node)) && (node.type === 'hidden' || node.disabled));
814};
815var isAutoFocusAllowed = function(node) {
816    var attribute = node.getAttribute(FOCUS_NO_AUTOFOCUS);
817    return ![
818        true,
819        'true',
820        ''
821    ].includes(attribute);
822};
823var isGuard = function(node) {
824    var _a;
825    return Boolean(node && ((_a = getDataset(node)) === null || _a === void 0 ? void 0 : _a.focusGuard));
826};
827var isNotAGuard = function(node) {
828    return !isGuard(node);
829};
830var isDefined = function(x) {
831    return Boolean(x);
832};
833;
834var findSelectedRadio = function(node, nodes) {
835    return nodes.filter(isRadioElement).filter(function(el) {
836        return el.name === node.name;
837    }).filter(function(el) {
838        return el.checked;
839    })[0] || node;
840};
841var correctNode = function(node, nodes) {
842    if (isRadioElement(node) && node.name) {
843        return findSelectedRadio(node, nodes);
844    }
845    return node;
846};
847var correctNodes = function(nodes) {
848    // IE11 has no Set(array) constructor
849    var resultSet = new Set();
850    nodes.forEach(function(node) {
851        return resultSet.add(correctNode(node, nodes));
852    });
853    // using filter to support IE11
854    return nodes.filter(function(node) {
855        return resultSet.has(node);
856    });
857};
858// MERGED MODULE: [project]/node_modules/focus-lock/dist/es2015/utils/firstFocus.js [app-client] (ecmascript)
859;
860;
861var pickFirstFocus = function(nodes) {
862    if (nodes[0] && nodes.length > 1) {
863        return correctNode(nodes[0], nodes);
864    }
865    return nodes[0];
866};
867var pickFocusable = function(nodes, node) {
868    return nodes.indexOf(correctNode(node, nodes));
869};
870;
871;
872;
873var NEW_FOCUS = 'NEW_FOCUS';
874var newFocus = function(innerNodes, innerTabbables, outerNodes, activeElement, lastNode) {
875    var cnt = innerNodes.length;
876    var firstFocus = innerNodes[0];
877    var lastFocus = innerNodes[cnt - 1];
878    var isOnGuard = isGuard(activeElement);
879    // focus is inside
880    if (activeElement && innerNodes.indexOf(activeElement) >= 0) {
881        return undefined;
882    }
883    var activeIndex = activeElement !== undefined ? outerNodes.indexOf(activeElement) : -1;
884    var lastIndex = lastNode ? outerNodes.indexOf(lastNode) : activeIndex;
885    var lastNodeInside = lastNode ? innerNodes.indexOf(lastNode) : -1;
886    // no active focus (or focus is on the body)
887    if (activeIndex === -1) {
888        // known fallback
889        if (lastNodeInside !== -1) {
890            return lastNodeInside;
891        }
892        return NEW_FOCUS;
893    }
894    // new focus, nothing to calculate
895    if (lastNodeInside === -1) {
896        return NEW_FOCUS;
897    }
898    var indexDiff = activeIndex - lastIndex;
899    var firstNodeIndex = outerNodes.indexOf(firstFocus);
900    var lastNodeIndex = outerNodes.indexOf(lastFocus);
901    var correctedNodes = correctNodes(outerNodes);
902    var currentFocusableIndex = activeElement !== undefined ? correctedNodes.indexOf(activeElement) : -1;
903    var previousFocusableIndex = lastNode ? correctedNodes.indexOf(lastNode) : currentFocusableIndex;
904    var tabbableNodes = correctedNodes.filter(function(node) {
905        return node.tabIndex >= 0;
906    });
907    var currentTabbableIndex = activeElement !== undefined ? tabbableNodes.indexOf(activeElement) : -1;
908    var previousTabbableIndex = lastNode ? tabbableNodes.indexOf(lastNode) : currentTabbableIndex;
909    var focusIndexDiff = currentTabbableIndex >= 0 && previousTabbableIndex >= 0 ? previousTabbableIndex - currentTabbableIndex : previousFocusableIndex - currentFocusableIndex;
910    // old focus
911    if (!indexDiff && lastNodeInside >= 0) {
912        return lastNodeInside;
913    }
914    // no tabbable elements, autofocus is not possible
915    if (innerTabbables.length === 0) {
916        // an edge case with no tabbable elements
917        // return the last focusable one
918        // with some probability this will prevent focus from cycling across the lock, but there is no tabbale elements to cycle to
919        return lastNodeInside;
920    }
921    var returnFirstNode = pickFocusable(innerNodes, innerTabbables[0]);
922    var returnLastNode = pickFocusable(innerNodes, innerTabbables[innerTabbables.length - 1]);
923    // first element
924    if (activeIndex <= firstNodeIndex && isOnGuard && Math.abs(indexDiff) > 1) {
925        return returnLastNode;
926    }
927    // last element
928    if (activeIndex >= lastNodeIndex && isOnGuard && Math.abs(indexDiff) > 1) {
929        return returnFirstNode;
930    }
931    // jump out, but not on the guard
932    if (indexDiff && Math.abs(focusIndexDiff) > 1) {
933        return lastNodeInside;
934    }
935    // focus above lock
936    if (activeIndex <= firstNodeIndex) {
937        return returnLastNode;
938    }
939    // focus below lock
940    if (activeIndex > lastNodeIndex) {
941        return returnFirstNode;
942    }
943    // index is inside tab order, but outside Lock
944    if (indexDiff) {
945        if (Math.abs(indexDiff) > 1) {
946            return lastNodeInside;
947        }
948        return (cnt + lastNodeInside + indexDiff) % cnt;
949    }
950    // do nothing
951    return undefined;
952};
953// MERGED MODULE: [project]/node_modules/focus-lock/dist/es2015/utils/DOMutils.js [app-client] (ecmascript)
954;
955// MERGED MODULE: [project]/node_modules/focus-lock/dist/es2015/utils/array.js [app-client] (ecmascript)
956;
957var toArray = function(a) {
958    var ret = Array(a.length);
959    for(var i = 0; i < a.length; ++i){
960        ret[i] = a[i];
961    }
962    return ret;
963};
964var asArray = function(a) {
965    return Array.isArray(a) ? a : [
966        a
967    ];
968};
969var getFirst = function(a) {
970    return Array.isArray(a) ? a[0] : a;
971};
972// MERGED MODULE: [project]/node_modules/focus-lock/dist/es2015/utils/tabOrder.js [app-client] (ecmascript)
973;
974;
975var tabSort = function(a, b) {
976    var aTab = Math.max(0, a.tabIndex);
977    var bTab = Math.max(0, b.tabIndex);
978    var tabDiff = aTab - bTab;
979    var indexDiff = a.index - b.index;
980    if (tabDiff) {
981        if (!aTab) {
982            return 1;
983        }
984        if (!bTab) {
985            return -1;
986        }
987    }
988    return tabDiff || indexDiff;
989};
990var getTabIndex = function(node) {
991    if (node.tabIndex < 0) {
992        // all "focusable" elements are already preselected
993        // but some might have implicit negative tabIndex
994        // return 0 for <audio without tabIndex attribute - it is "tabbable"
995        if (!node.hasAttribute('tabindex')) {
996            return 0;
997        }
998    }
999    return node.tabIndex;
1000};
1001var orderByTabIndex = function(nodes, filterNegative, keepGuards) {
1002    return toArray(nodes).map(function(node, index) {
1003        var tabIndex = getTabIndex(node);
1004        return {
1005            node: node,
1006            index: index,
1007            tabIndex: keepGuards && tabIndex === -1 ? (node.dataset || {}).focusGuard ? 0 : -1 : tabIndex
1008        };
1009    }).filter(function(data) {
1010        return !filterNegative || data.tabIndex >= 0;
1011    }).sort(tabSort);
1012};
1013// MERGED MODULE: [project]/node_modules/focus-lock/dist/es2015/utils/tabUtils.js [app-client] (ecmascript)
1014;
1015// MERGED MODULE: [project]/node_modules/focus-lock/dist/es2015/utils/tabbables.js [app-client] (ecmascript)
1016;
1017var tabbables = [
1018    'button:enabled',
1019    'select:enabled',
1020    'textarea:enabled',
1021    'input:enabled',
1022    // elements with explicit roles will also use explicit tabindex
1023    // '[role="button"]',
1024    'a[href]',
1025    'area[href]',
1026    'summary',
1027    'iframe',
1028    'object',
1029    'embed',
1030    'audio[controls]',
1031    'video[controls]',
1032    '[tabindex]',
1033    '[contenteditable]',
1034    '[autofocus]'
1035];
1036;
1037;
1038;
1039var queryTabbables = tabbables.join(',');
1040var queryGuardTabbables = "".concat(queryTabbables, ", [data-focus-guard]");
1041var getFocusablesWithShadowDom = function(parent, withGuards) {
1042    return toArray((parent.shadowRoot || parent).children).reduce(function(acc, child) {
1043        return acc.concat(child.matches(withGuards ? queryGuardTabbables : queryTabbables) ? [
1044            child
1045        ] : [], getFocusablesWithShadowDom(child));
1046    }, []);
1047};
1048var getFocusablesWithIFrame = function(parent, withGuards) {
1049    var _a;
1050    // contentDocument of iframe will be null if current origin cannot access it
1051    if (parent instanceof HTMLIFrameElement && ((_a = parent.contentDocument) === null || _a === void 0 ? void 0 : _a.body)) {
1052        return getFocusables([
1053            parent.contentDocument.body
1054        ], withGuards);
1055    }
1056    return [
1057        parent
1058    ];
1059};
1060var getFocusables = function(parents, withGuards) {
1061    return parents.reduce(function(acc, parent) {
1062        var _a;
1063        var focusableWithShadowDom = getFocusablesWithShadowDom(parent, withGuards);
1064        var focusableWithIframes = (_a = []).concat.apply(_a, focusableWithShadowDom.map(function(node) {
1065            return getFocusablesWithIFrame(node, withGuards);
1066        }));
1067        return acc.concat(// add all tabbables inside and within shadow DOMs in DOM order
1068        focusableWithIframes, // add if node is tabbable itself
1069        parent.parentNode ? toArray(parent.parentNode.querySelectorAll(queryTabbables)).filter(function(node) {
1070            return node === parent;
1071        }) : []);
1072    }, []);
1073};
1074var getParentAutofocusables = function(parent) {
1075    var parentFocus = parent.querySelectorAll("[".concat(FOCUS_AUTO, "]"));
1076    return toArray(parentFocus).map(function(node) {
1077        return getFocusables([
1078            node
1079        ]);
1080    }).reduce(function(acc, nodes) {
1081        return acc.concat(nodes);
1082    }, []);
1083};
1084;
1085;
1086;
1087;
1088var filterFocusable = function(nodes, visibilityCache) {
1089    return toArray(nodes).filter(function(node) {
1090        return isVisibleCached(visibilityCache, node);
1091    }).filter(function(node) {
1092        return notHiddenInput(node);
1093    });
1094};
1095var filterAutoFocusable = function(nodes, cache) {
1096    if (cache === void 0) {
1097        cache = new Map();
1098    }
1099    return toArray(nodes).filter(function(node) {
1100        return isAutoFocusAllowedCached(cache, node);
1101    });
1102};
1103var getTabbableNodes = function(topNodes, visibilityCache, withGuards) {
1104    return orderByTabIndex(filterFocusable(getFocusables(topNodes, withGuards), visibilityCache), true, withGuards);
1105};
1106var getFocusableNodes = function(topNodes, visibilityCache) {
1107    return orderByTabIndex(filterFocusable(getFocusables(topNodes), visibilityCache), false);
1108};
1109var parentAutofocusables = function(topNode, visibilityCache) {
1110    return filterFocusable(getParentAutofocusables(topNode), visibilityCache);
1111};
1112var contains = function(scope, element) {
1113    if (scope.shadowRoot) {
1114        return contains(scope.shadowRoot, element);
1115    } else {
1116        if (Object.getPrototypeOf(scope).contains !== undefined && Object.getPrototypeOf(scope).contains.call(scope, element)) {
1117            return true;
1118        }
1119        return toArray(scope.children).some(function(child) {
1120            var _a;
1121            if (child instanceof HTMLIFrameElement) {
1122                var iframeBody = (_a = child.contentDocument) === null || _a === void 0 ? void 0 : _a.body;
1123                if (iframeBody) {
1124                    return contains(iframeBody, element);
1125                }
1126                return false;
1127            }
1128            return contains(child, element);
1129        });
1130    }
1131};
1132// MERGED MODULE: [project]/node_modules/focus-lock/dist/es2015/utils/all-affected.js [app-client] (ecmascript)
1133;
1134;
1135;
1136/**
1137 * in case of multiple nodes nested inside each other
1138 * keeps only top ones
1139 * this is O(nlogn)
1140 * @param nodes
1141 * @returns {*}
1142 */ var filterNested = function(nodes) {
1143    var contained = new Set();
1144    var l = nodes.length;
1145    for(var i = 0; i < l; i += 1){
1146        for(var j = i + 1; j < l; j += 1){
1147            var position = nodes[i].compareDocumentPosition(nodes[j]);
1148            /* eslint-disable no-bitwise */ if ((position & Node.DOCUMENT_POSITION_CONTAINED_BY) > 0) {
1149                contained.add(j);
1150            }
1151            if ((position & Node.DOCUMENT_POSITION_CONTAINS) > 0) {
1152                contained.add(i);
1153            }
1154        /* eslint-enable */ }
1155    }
1156    return nodes.filter(function(_, index) {
1157        return !contained.has(index);
1158    });
1159};
1160/**
1161 * finds top most parent for a node
1162 * @param node
1163 * @returns {*}
1164 */ var getTopParent = function(node) {
1165    return node.parentNode ? getTopParent(node.parentNode) : node;
1166};
1167var getAllAffectedNodes = function(node) {
1168    var nodes = asArray(node);
1169    return nodes.filter(Boolean).reduce(function(acc, currentNode) {
1170        var group = currentNode.getAttribute(FOCUS_GROUP);
1171        acc.push.apply(acc, group ? filterNested(toArray(getTopParent(currentNode).querySelectorAll("[".concat(FOCUS_GROUP, "=\"").concat(group, "\"]:not([").concat(FOCUS_DISABLED, "=\"disabled\"])")))) : [
1172            currentNode
1173        ]);
1174        return acc;
1175    }, []);
1176};
1177// MERGED MODULE: [project]/node_modules/focus-lock/dist/es2015/utils/auto-focus.js [app-client] (ecmascript)
1178;
1179;
1180;
1181;
1182var findAutoFocused = function(autoFocusables) {
1183    return function(node) {
1184        var _a;
1185        var autofocus = (_a = getDataset(node)) === null || _a === void 0 ? void 0 : _a.autofocus;
1186        return(// @ts-expect-error
1187        node.autofocus || autofocus !== undefined && autofocus !== 'false' || //
1188        autoFocusables.indexOf(node) >= 0);
1189    };
1190};
1191var pickAutofocus = function(nodesIndexes, orderedNodes, groups) {
1192    var nodes = nodesIndexes.map(function(_a) {
1193        var node = _a.node;
1194        return node;
1195    });
1196    var autoFocusable = filterAutoFocusable(nodes.filter(findAutoFocused(groups)));
1197    if (autoFocusable && autoFocusable.length) {
1198        return pickFirstFocus(autoFocusable);
1199    }
1200    return pickFirstFocus(filterAutoFocusable(orderedNodes));
1201};
1202// MERGED MODULE: [project]/node_modules/focus-lock/dist/es2015/utils/getActiveElement.js [app-client] (ecmascript)
1203;
1204// MERGED MODULE: [project]/node_modules/focus-lock/dist/es2015/utils/safe.js [app-client] (ecmascript)
1205;
1206var safeProbe = function(cb) {
1207    try {
1208        return cb();
1209    } catch (e) {
1210        return undefined;
1211    }
1212};
1213;
1214var getActiveElement = function(inDocument) {
1215    if (inDocument === void 0) {
1216        inDocument = document;
1217    }
1218    if (!inDocument || !inDocument.activeElement) {
1219        return undefined;
1220    }
1221    var activeElement = inDocument.activeElement;
1222    return activeElement.shadowRoot ? getActiveElement(activeElement.shadowRoot) : activeElement instanceof HTMLIFrameElement && safeProbe(function() {
1223        return activeElement.contentWindow.document;
1224    }) ? getActiveElement(activeElement.contentWindow.document) : activeElement;
1225};
1226// MERGED MODULE: [project]/node_modules/focus-lock/dist/es2015/utils/parenting.js [app-client] (ecmascript)
1227;
1228;
1229;
1230;
1231var getParents = function(node, parents) {
1232    if (parents === void 0) {
1233        parents = [];
1234    }
1235    parents.push(node);
1236    if (node.parentNode) {
1237        getParents(node.parentNode.host || node.parentNode, parents);
1238    }
1239    return parents;
1240};
1241var getCommonParent = function(nodeA, nodeB) {
1242    var parentsA = getParents(nodeA);
1243    var parentsB = getParents(nodeB);
1244    // tslint:disable-next-line:prefer-for-of
1245    for(var i = 0; i < parentsA.length; i += 1){
1246        var currentParent = parentsA[i];
1247        if (parentsB.indexOf(currentParent) >= 0) {
1248            return currentParent;
1249        }
1250    }
1251    return false;
1252};
1253var getTopCommonParent = function(baseActiveElement, leftEntry, rightEntries) {
1254    var activeElements = asArray(baseActiveElement);
1255    var leftEntries = asArray(leftEntry);
1256    var activeElement = activeElements[0];
1257    var topCommon = false;
1258    leftEntries.filter(Boolean).forEach(function(entry) {
1259        topCommon = getCommonParent(topCommon || entry, entry) || topCommon;
1260        rightEntries.filter(Boolean).forEach(function(subEntry) {
1261            var common = getCommonParent(activeElement, subEntry);
1262            if (common) {
1263                if (!topCommon || contains(common, topCommon)) {
1264                    topCommon = common;
1265                } else {
1266                    topCommon = getCommonParent(common, topCommon);
1267                }
1268            }
1269        });
1270    });
1271    // TODO: add assert here?
1272    return topCommon;
1273};
1274var allParentAutofocusables = function(entries, visibilityCache) {
1275    return entries.reduce(function(acc, node) {
1276        return acc.concat(parentAutofocusables(node, visibilityCache));
1277    }, []);
1278};
1279;
1280;
1281;
1282;
1283;
1284;
1285;
1286;
1287var reorderNodes = function(srcNodes, dstNodes) {
1288    var remap = new Map();
1289    // no Set(dstNodes) for IE11 :(
1290    dstNodes.forEach(function(entity) {
1291        return remap.set(entity.node, entity);
1292    });
1293    // remap to dstNodes
1294    return srcNodes.map(function(node) {
1295        return remap.get(node);
1296    }).filter(isDefined);
1297};
1298var focusSolver = function(topNode, lastNode) {
1299    var activeElement = getActiveElement(asArray(topNode).length > 0 ? document : getFirst(topNode).ownerDocument);
1300    var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);
1301    var commonParent = getTopCommonParent(activeElement || topNode, topNode, entries);
1302    var visibilityCache = new Map();
1303    var anyFocusable = getFocusableNodes(entries, visibilityCache);
1304    var innerElements = anyFocusable.filter(function(_a) {
1305        var node = _a.node;
1306        return isNotAGuard(node);
1307    });
1308    if (!innerElements[0]) {
1309        return undefined;
1310    }
1311    var outerNodes = getFocusableNodes([
1312        commonParent
1313    ], visibilityCache).map(function(_a) {
1314        var node = _a.node;
1315        return node;
1316    });
1317    var orderedInnerElements = reorderNodes(outerNodes, innerElements);
1318    // collect inner focusable and separately tabbables
1319    var innerFocusables = orderedInnerElements.map(function(_a) {
1320        var node = _a.node;
1321        return node;
1322    });
1323    var innerTabbable = orderedInnerElements.filter(function(_a) {
1324        var tabIndex = _a.tabIndex;
1325        return tabIndex >= 0;
1326    }).map(function(_a) {
1327        var node = _a.node;
1328        return node;
1329    });
1330    var newId = newFocus(innerFocusables, innerTabbable, outerNodes, activeElement, lastNode);
1331    if (newId === NEW_FOCUS) {
1332        var focusNode = // first try only tabbable, and the fallback to all focusable, as long as at least one element should be picked for focus
1333        pickAutofocus(anyFocusable, innerTabbable, allParentAutofocusables(entries, visibilityCache)) || pickAutofocus(anyFocusable, innerFocusables, allParentAutofocusables(entries, visibilityCache));
1334        if (focusNode) {
1335            return {
1336                node: focusNode
1337            };
1338        } else {
1339            console.warn('focus-lock: cannot find any node to move focus into');
1340            return undefined;
1341        }
1342    }
1343    if (newId === undefined) {
1344        return newId;
1345    }
1346    return orderedInnerElements[newId];
1347};
1348;
1349;
1350var guardCount = 0;
1351var lockDisabled = false;
1352var moveFocusInside = function(topNode, lastNode, options) {
1353    if (options === void 0) {
1354        options = {};
1355    }
1356    var focusable = focusSolver(topNode, lastNode);
1357    // global local side effect to countain recursive lock activation and resolve focus-fighting
1358    if (lockDisabled) {
1359        return;
1360    }
1361    if (focusable) {
1362        /** +FOCUS-FIGHTING prevention **/ if (guardCount > 2) {
1363            // we have recursive entered back the lock activation
1364            console.error('FocusLock: focus-fighting detected. Only one focus management system could be active. ' + 'See https://github.com/theKashey/focus-lock/#focus-fighting');
1365            lockDisabled = true;
1366            setTimeout(function() {
1367                lockDisabled = false;
1368            }, 1);
1369            return;
1370        }
1371        guardCount++;
1372        focusOn(focusable.node, options.focusOptions);
1373        guardCount--;
1374    }
1375};
1376// MERGED MODULE: [project]/node_modules/focus-lock/dist/es2015/focusInside.js [app-client] (ecmascript)
1377;
1378;
1379;
1380;
1381;
1382var focusInFrame = function(frame, activeElement) {
1383    return frame === activeElement;
1384};
1385var focusInsideIframe = function(topNode, activeElement) {
1386    return Boolean(toArray(topNode.querySelectorAll('iframe')).some(function(node) {
1387        return focusInFrame(node, activeElement);
1388    }));
1389};
1390var focusInside = function(topNode, activeElement) {
1391    // const activeElement = document && getActiveElement();
1392    if (activeElement === void 0) {
1393        activeElement = getActiveElement(getFirst(topNode).ownerDocument);
1394    }
1395    if (!activeElement || activeElement.dataset && activeElement.dataset.focusGuard) {
1396        return false;
1397    }
1398    return getAllAffectedNodes(topNode).some(function(node) {
1399        return contains(node, activeElement) || focusInsideIframe(node, activeElement);
1400    });
1401};
1402// MERGED MODULE: [project]/node_modules/focus-lock/dist/es2015/focusIsHidden.js [app-client] (ecmascript)
1403;
1404;
1405;
1406;
1407;
1408var focusIsHidden = function(inDocument) {
1409    if (inDocument === void 0) {
1410        inDocument = document;
1411    }
1412    var activeElement = getActiveElement(inDocument);
1413    if (!activeElement) {
1414        return false;
1415    }
1416    // this does not support setting FOCUS_ALLOW within shadow dom
1417    return toArray(inDocument.querySelectorAll("[".concat(FOCUS_ALLOW, "]"))).some(function(node) {
1418        return contains(node, activeElement);
1419    });
1420};
1421// MERGED MODULE: [project]/node_modules/focus-lock/dist/es2015/focusables.js [app-client] (ecmascript)
1422;
1423;
1424;
1425;
1426;
1427;
1428var expandFocusableNodes = function(topNode) {
1429    var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);
1430    var commonParent = getTopCommonParent(topNode, topNode, entries);
1431    var outerNodes = orderByTabIndex(getFocusables([
1432        commonParent
1433    ], true), true, true);
1434    var innerElements = getFocusables(entries, false);
1435    return outerNodes.map(function(_a) {
1436        var node = _a.node, index = _a.index;
1437        return {
1438            node: node,
1439            index: index,
1440            lockItem: innerElements.indexOf(node) >= 0,
1441            guard: isGuard(node)
1442        };
1443    });
1444};
1445// MERGED MODULE: [project]/node_modules/focus-lock/dist/es2015/sibling.js [app-client] (ecmascript)
1446;
1447;
1448;
1449;
1450var getRelativeFocusable = function(element, scope, useTabbables) {
1451    if (!element || !scope) {
1452        console.error('no element or scope given');
1453        return {};
1454    }
1455    var shards = asArray(scope);
1456    if (shards.every(function(shard) {
1457        return !contains(shard, element);
1458    })) {
1459        console.error('Active element is not contained in the scope');
1460        return {};
1461    }
1462    var focusables = useTabbables ? getTabbableNodes(shards, new Map()) : getFocusableNodes(shards, new Map());
1463    var current = focusables.findIndex(function(_a) {
1464        var node = _a.node;
1465        return node === element;
1466    });
1467    if (current === -1) {
1468        // an edge case, when anchor element is not found
1469        return undefined;
1470    }
1471    return {
1472        prev: focusables[current - 1],
1473        next: focusables[current + 1],
1474        first: focusables[0],
1475        last: focusables[focusables.length - 1]
1476    };
1477};
1478var getBoundary = function(shards, useTabbables) {
1479    var set = useTabbables ? getTabbableNodes(asArray(shards), new Map()) : getFocusableNodes(asArray(shards), new Map());
1480    return {
1481        first: set[0],
1482        last: set[set.length - 1]
1483    };
1484};
1485var defaultOptions = function(options) {
1486    return Object.assign({
1487        scope: document.body,
1488        cycle: true,
1489        onlyTabbable: true
1490    }, options);
1491};
1492var moveFocus = function(fromElement, options, cb) {
1493    if (options === void 0) {
1494        options = {};
1495    }
1496    var newOptions = defaultOptions(options);
1497    var solution = getRelativeFocusable(fromElement, newOptions.scope, newOptions.onlyTabbable);
1498    if (!solution) {
1499        return;
1500    }
1501    var target = cb(solution, newOptions.cycle);
1502    if (target) {
1503        focusOn(target.node, newOptions.focusOptions);
1504    }
1505};
1506var focusNextElement = function(fromElement, options) {
1507    if (options === void 0) {
1508        options = {};
1509    }
1510    moveFocus(fromElement, options, function(_a, cycle) {
1511        var next = _a.next, first = _a.first;
1512        return next || cycle && first;
1513    });
1514};
1515var focusPrevElement = function(fromElement, options) {
1516    if (options === void 0) {
1517        options = {};
1518    }
1519    moveFocus(fromElement, options, function(_a, cycle) {
1520        var prev = _a.prev, last = _a.last;
1521        return prev || cycle && last;
1522    });
1523};
1524var pickBoundary = function(scope, options, what) {
1525    var _a;
1526    var boundary = getBoundary(scope, (_a = options.onlyTabbable) !== null && _a !== void 0 ? _a : true);
1527    var node = boundary[what];
1528    if (node) {
1529        focusOn(node.node, options.focusOptions);
1530    }
1531};
1532var focusFirstElement = function(scope, options) {
1533    if (options === void 0) {
1534        options = {};
1535    }
1536    pickBoundary(scope, options, 'first');
1537};
1538var focusLastElement = function(scope, options) {
1539    if (options === void 0) {
1540        options = {};
1541    }
1542    pickBoundary(scope, options, 'last');
1543};
1544// MERGED MODULE: [project]/node_modules/focus-lock/dist/es2015/return-focus.js [app-client] (ecmascript)
1545;
1546;
1547function weakRef(value) {
1548    if (!value) return null;
1549    // #68 Safari 14.1 dont have it yet
1550    // FIXME: remove in 2025
1551    if (typeof WeakRef === 'undefined') {
1552        return function() {
1553            return value || null;
1554        };
1555    }
1556    var w = value ? new WeakRef(value) : null;
1557    return function() {
1558        return (w === null || w === void 0 ? void 0 : w.deref()) || null;
1559    };
1560}
1561var recordElementLocation = function(element) {
1562    if (!element) {
1563        return null;
1564    }
1565    var stack = [];
1566    var currentElement = element;
1567    while(currentElement && currentElement !== document.body){
1568        stack.push({
1569            current: weakRef(currentElement),
1570            parent: weakRef(currentElement.parentElement),
1571            left: weakRef(currentElement.previousElementSibling),
1572            right: weakRef(currentElement.nextElementSibling)
1573        });
1574        currentElement = currentElement.parentElement;
1575    }
1576    return {
1577        element: weakRef(element),
1578        stack: stack,
1579        ownerDocument: element.ownerDocument
1580    };
1581};
1582var restoreFocusTo = function(location) {
1583    var _a, _b, _c, _d, _e;
1584    if (!location) {
1585        return undefined;
1586    }
1587    var stack = location.stack, ownerDocument = location.ownerDocument;
1588    var visibilityCache = new Map();
1589    for(var _i = 0, stack_1 = stack; _i < stack_1.length; _i++){
1590        var line = stack_1[_i];
1591        var parent_1 = (_a = line.parent) === null || _a === void 0 ? void 0 : _a.call(line);
1592        // is it still here?
1593        if (parent_1 && ownerDocument.contains(parent_1)) {
1594            var left = (_b = line.left) === null || _b === void 0 ? void 0 : _b.call(line);
1595            var savedCurrent = line.current();
1596            var current = parent_1.contains(savedCurrent) ? savedCurrent : undefined;
1597            var right = (_c = line.right) === null || _c === void 0 ? void 0 : _c.call(line);
1598            var focusables = getTabbableNodes([
1599                parent_1
1600            ], visibilityCache);
1601            var aim = // that is element itself
1602            (_e = (_d = current !== null && current !== void 0 ? current : // or something in it's place
1603            left === null || left === void 0 ? void 0 : left.nextElementSibling) !== null && _d !== void 0 ? _d : // or somebody to the right, still close enough
1604            right) !== null && _e !== void 0 ? _e : // or somebody to the left, something?
1605            left;
1606            while(aim){
1607                for(var _f = 0, focusables_1 = focusables; _f < focusables_1.length; _f++){
1608                    var focusable = focusables_1[_f];
1609                    if (aim === null || aim === void 0 ? void 0 : aim.contains(focusable.node)) {
1610                        return focusable.node;
1611                    }
1612                }
1613                aim = aim.nextElementSibling;
1614            }
1615            if (focusables.length) {
1616                // if parent contains a focusable - move there
1617                return focusables[0].node;
1618            }
1619        }
1620    }
1621    // nothing matched
1622    return undefined;
1623};
1624var captureFocusRestore = function(targetElement) {
1625    var location = recordElementLocation(targetElement);
1626    return function() {
1627        return restoreFocusTo(location);
1628    };
1629};
1630;
1631;
1632;
1633;
1634;
1635;
1636var focusOnBody = function focusOnBody() {
1637    return document && document.activeElement === document.body;
1638};
1639var isFreeFocus = function isFreeFocus() {
1640    return focusOnBody() || focusIsHidden();
1641};
1642var lastActiveTrap = null;
1643var lastActiveFocus = null;
1644var tryRestoreFocus = function tryRestoreFocus() {
1645    return null;
1646};
1647var lastPortaledElement = null;
1648var focusWasOutsideWindow = false;
1649var windowFocused = false;
1650var defaultWhitelist = function defaultWhitelist() {
1651    return true;
1652};
1653var focusWhitelisted = function focusWhitelisted(activeElement) {
1654    return (lastActiveTrap.whiteList || defaultWhitelist)(activeElement);
1655};
1656var recordPortal = function recordPortal(observerNode, portaledElement) {
1657    lastPortaledElement = {
1658        observerNode: observerNode,
1659        portaledElement: portaledElement
1660    };
1661};
1662var focusIsPortaledPair = function focusIsPortaledPair(element) {
1663    return lastPortaledElement && lastPortaledElement.portaledElement === element;
1664};
1665function autoGuard(startIndex, end, step, allNodes) {
1666    var lastGuard = null;
1667    var i = startIndex;
1668    do {
1669        var item = allNodes[i];
1670        if (item.guard) {
1671            if (item.node.dataset.focusAutoGuard) {
1672                lastGuard = item;
1673            }
1674        } else if (item.lockItem) {
1675            if (i !== startIndex) {
1676                return;
1677            }
1678            lastGuard = null;
1679        } else {
1680            break;
1681        }
1682    }while ((i += step) !== end)
1683    if (lastGuard) {
1684        lastGuard.node.tabIndex = 0;
1685    }
1686}
1687var focusWasOutside = function focusWasOutside(crossFrameOption) {
1688    if (crossFrameOption) {
1689        return Boolean(focusWasOutsideWindow);
1690    }
1691    return focusWasOutsideWindow === 'meanwhile';
1692};
1693var checkInHost = function checkInHost(check, el, boundary) {
1694    return el && (el.host === check && (!el.activeElement || boundary.contains(el.activeElement)) || el.parentNode && checkInHost(check, el.parentNode, boundary));
1695};
1696var withinHost = function withinHost(activeElement, workingArea) {
1697    return workingArea.some(function(area) {
1698        return checkInHost(activeElement, area, area);
1699    });
1700};
1701var getNodeFocusables = function getNodeFocusables(nodes) {
1702    return getFocusableNodes(nodes, new Map());
1703};
1704var isNotFocusable = function isNotFocusable(node) {
1705    return !getNodeFocusables([
1706        node.parentNode
1707    ]).some(function(el) {
1708        return el.node === node;
1709    });
1710};
1711var activateTrap = function activateTrap() {
1712    var result = false;
1713    if (lastActiveTrap) {
1714        var _lastActiveTrap = lastActiveTrap, observed = _lastActiveTrap.observed, persistentFocus = _lastActiveTrap.persistentFocus, autoFocus = _lastActiveTrap.autoFocus, shards = _lastActiveTrap.shards, crossFrame = _lastActiveTrap.crossFrame, focusOptions = _lastActiveTrap.focusOptions, noFocusGuards = _lastActiveTrap.noFocusGuards;
1715        var workingNode = observed || lastPortaledElement && lastPortaledElement.portaledElement;
1716        if (focusOnBody() && lastActiveFocus && lastActiveFocus !== document.body) {
1717            if (!document.body.contains(lastActiveFocus) || isNotFocusable(lastActiveFocus)) {
1718                var newTarget = tryRestoreFocus();
1719                if (newTarget) {
1720                    newTarget.focus();
1721                }
1722            }
1723        }
1724        var activeElement = document && document.activeElement;
1725        if (workingNode) {
1726            var workingArea = [
1727                workingNode
1728            ].concat(shards.map(extractRef).filter(Boolean));
1729            var shouldForceRestoreFocus = function shouldForceRestoreFocus() {
1730                if (!focusWasOutside(crossFrame) || !noFocusGuards || !lastActiveFocus || windowFocused) {
1731                    return false;
1732                }
1733                var nodes = getNodeFocusables(workingArea);
1734                var lastIndex = nodes.findIndex(function(_ref) {
1735                    var node = _ref.node;
1736                    return node === lastActiveFocus;
1737                });
1738                return lastIndex === 0 || lastIndex === nodes.length - 1;
1739            };
1740            if (!activeElement || focusWhitelisted(activeElement)) {
1741                if (persistentFocus || shouldForceRestoreFocus() || !isFreeFocus() || !lastActiveFocus && autoFocus) {
1742                    if (workingNode && !(focusInside(workingArea) || activeElement && withinHost(activeElement, workingArea) || focusIsPortaledPair(activeElement, workingNode))) {
1743                        if (document && !lastActiveFocus && activeElement && !autoFocus) {
1744                            if (activeElement.blur) {
1745                                activeElement.blur();
1746                            }
1747                            document.body.focus();
1748                        } else {
1749                            result = moveFocusInside(workingArea, lastActiveFocus, {
1750                                focusOptions: focusOptions
1751                            });
1752                            lastPortaledElement = {};
1753                        }
1754                    }
1755                    lastActiveFocus = document && document.activeElement;
1756                    if (lastActiveFocus !== document.body) {
1757                        tryRestoreFocus = captureFocusRestore(lastActiveFocus);
1758                    }
1759                    focusWasOutsideWindow = false;
1760                }
1761            }
1762            if (document && activeElement !== document.activeElement && document.querySelector('[data-focus-auto-guard]')) {
1763                var newActiveElement = document && document.activeElement;
1764                var allNodes = expandFocusableNodes(workingArea);
1765                var focusedIndex = allNodes.map(function(_ref2) {
1766                    var node = _ref2.node;
1767                    return node;
1768                }).indexOf(newActiveElement);
1769                if (focusedIndex > -1) {
1770                    allNodes.filter(function(_ref3) {
1771                        var guard = _ref3.guard, node = _ref3.no
1771de;
1772                        return guard && node.dataset.focusAutoGuard;
1773                    }).forEach(function(_ref4) {
1774                        var node = _ref4.node;
1775                        return node.removeAttribute('tabIndex');
1776                    });
1777                    autoGuard(focusedIndex, allNodes.length, +1, allNodes);
1778                    autoGuard(focusedIndex, -1, -1, allNodes);
1779                }
1780            }
1781        }
1782    }
1783    return result;
1784};
1785var onTrap = function onTrap(event) {
1786    if (activateTrap() && event) {
1787        event.stopPropagation();
1788        event.preventDefault();
1789    }
1790};
1791var onBlur = function onBlur() {
1792    return deferAction(activateTrap);
1793};
1794var onFocus = function onFocus(event) {
1795    var source = event.target;
1796    var currentNode = event.currentTarget;
1797    if (!currentNode.contains(source)) {
1798        recordPortal(currentNode, source);
1799    }
1800};
1801var FocusWatcher = function FocusWatcher() {
1802    return null;
1803};
1804var FocusTrap = function FocusTrap(_ref5) {
1805    var children = _ref5.children;
1806    return /*#__PURE__*/ __TURBOPACK__imported__module__271645__10["default"].createElement("div", {
1807        onBlur: onBlur,
1808        onFocus: onFocus
1809    }, children);
1810};
1811FocusTrap.propTypes = ("TURBOPACK compile-time falsy", 0) ? "TURBOPACK unreachable" : {};
1812var onWindowFocus = function onWindowFocus() {
1813    windowFocused = true;
1814};
1815var onWindowBlur = function onWindowBlur() {
1816    windowFocused = false;
1817    focusWasOutsideWindow = 'just';
1818    deferAction(function() {
1819        focusWasOutsideWindow = 'meanwhile';
1820    });
1821};
1822var attachHandler = function attachHandler() {
1823    document.addEventListener('focusin', onTrap);
1824    document.addEventListener('focusout', onBlur);
1825    window.addEventListener('focus', onWindowFocus);
1826    window.addEventListener('blur', onWindowBlur);
1827};
1828var detachHandler = function detachHandler() {
1829    document.removeEventListener('focusin', onTrap);
1830    document.removeEventListener('focusout', onBlur);
1831    window.removeEventListener('focus', onWindowFocus);
1832    window.removeEventListener('blur', onWindowBlur);
1833};
1834function reducePropsToState(propsList) {
1835    return propsList.filter(function(_ref6) {
1836        var disabled = _ref6.disabled;
1837        return !disabled;
1838    });
1839}
1840var focusLockAPI = {
1841    moveFocusInside: moveFocusInside,
1842    focusInside: focusInside,
1843    focusNextElement: focusNextElement,
1844    focusPrevElement: focusPrevElement,
1845    focusFirstElement: focusFirstElement,
1846    focusLastElement: focusLastElement,
1847    captureFocusRestore: captureFocusRestore
1848};
1849function handleStateChangeOnClient(traps) {
1850    var trap = traps.slice(-1)[0];
1851    if (trap && !lastActiveTrap) {
1852        attachHandler();
1853    }
1854    var lastTrap = lastActiveTrap;
1855    var sameTrap = lastTrap && trap && trap.id === lastTrap.id;
1856    lastActiveTrap = trap;
1857    if (lastTrap && !sameTrap) {
1858        lastTrap.onDeactivation();
1859        if (!traps.filter(function(_ref7) {
1860            var id = _ref7.id;
1861            return id === lastTrap.id;
1862        }).length) {
1863            lastTrap.returnFocus(!trap);
1864        }
1865    }
1866    if (trap) {
1867        lastActiveFocus = null;
1868        if (!sameTrap || lastTrap.observed !== trap.observed) {
1869            trap.onActivation(focusLockAPI);
1870        }
1871        activateTrap(true);
1872        deferAction(activateTrap);
1873    } else {
1874        detachHandler();
1875        lastActiveFocus = null;
1876    }
1877}
1878mediumFocus.assignSyncMedium(onFocus);
1879mediumBlur.assignMedium(onBlur);
1880mediumEffect.assignMedium(function(cb) {
1881    return cb(focusLockAPI);
1882});
1883const __TURBOPACK__default__export__7 = __TURBOPACK__default__export__6(reducePropsToState, handleStateChangeOnClient)(FocusWatcher);
1884;
1885;
1886;
1887const __TURBOPACK__default__export__8 = (0, __TURBOPACK__imported__module__241352__1["exportSidecar"])(mediumSidecar, __TURBOPACK__default__export__7);
1888var __TURBOPACK__imported__module__663306__ = __turbopack_context__.i(663306);
1889// MERGED MODULE: [project]/node_modules/react-focus-on/dist/es2015/Effect.js [app-client] (ecmascript)
1890;
1891var __TURBOPACK__imported__module__290571__2 = __TURBOPACK__imported__module__290571__;
1892var __TURBOPACK__imported__module__271645__12 = __TURBOPACK__imported__module__271645__;
1893var __TURBOPACK__imported__module__186312__ = __turbopack_context__.i(186312);
1894// MERGED MODULE: [project]/node_modules/react-focus-on/dist/es2015/InteractivityDisabler.js [app-client] (ecmascript)
1895;
1896var __TURBOPACK__imported__module__271645__13 = __TURBOPACK__imported__module__271645__;
1897var __TURBOPACK__imported__module__974687__ = __turbopack_context__.i(974687);
1898var __TURBOPACK__imported__module__915070__ = __turbopack_context__.i(915070);
1899;
1900;
1901;
1902var Style = (0, __TURBOPACK__imported__module__915070__["styleSingleton"])();
1903var styles = "\n [" + focusHiddenMarker + "] {\n   pointer-events: none !important;\n }\n";
1904var InteractivityDisabler = function() {
1905    return __TURBOPACK__imported__module__271645__13["createElement"](Style, {
1906        styles: styles
1907    });
1908};
1909;
1910;
1911;
1912;
1913;
1914;
1915var extractRef1 = function(ref) {
1916    return 'current' in ref ? ref.current : ref;
1917};
1918function Effect(_a) {
1919    var setLockProps = _a.setLockProps, onEscapeKey = _a.onEscapeKey, onClickOutside = _a.onClickOutside, shards = _a.shards, onActivation = _a.onActivation, onDeactivation = _a.onDeactivation, noIsolation = _a.noIsolation, activeNode = _a.activeNode;
1920    var lastEventTarget = (0, __TURBOPACK__imported__module__271645__12["useRef"])(null);
1921    var mouseTouches = (0, __TURBOPACK__imported__module__271645__12["useRef"])(0);
1922    __TURBOPACK__imported__module__271645__12["useEffect"](function() {
1923        var onKeyDown = function(event) {
1924            if (!event.defaultPrevented) {
1925                if ((event.code === 'Escape' || event.key === 'Escape' || event.keyCode === 27) && onEscapeKey) {
1926                    onEscapeKey(event);
1927                }
1928            }
1929        };
1930        var onMouseDown = function(event) {
1931            if (event.defaultPrevented || event.target === lastEventTarget.current || event instanceof MouseEvent && event.button !== 0) {
1932                return;
1933            }
1934            if (shards && shards.map(extractRef1).some(function(node) {
1935                return node && node.contains(event.target) || node === event.target;
1936            })) {
1937                return;
1938            }
1939            if (onClickOutside) {
1940                onClickOutside(event);
1941            }
1942        };
1943        var onTouchStart = function(event) {
1944            onMouseDown(event);
1945            mouseTouches.current = event.touches.length;
1946        };
1947        var onTouchEnd = function(event) {
1948            mouseTouches.current = event.touches.length;
1949        };
1950        if (activeNode) {
1951            activeNode.ownerDocument.addEventListener('keydown', onKeyDown);
1952            activeNode.ownerDocument.addEventListener('mousedown', onMouseDown);
1953            activeNode.ownerDocument.addEventListener('touchstart', onTouchStart);
1954            activeNode.ownerDocument.addEventListener('touchend', onTouchEnd);
1955            return function() {
1956                activeNode.ownerDocument.removeEventListener('keydown', onKeyDown);
1957                activeNode.ownerDocument.removeEventListener('mousedown', onMouseDown);
1958                activeNode.ownerDocument.removeEventListener('touchstart', onTouchStart);
1959                activeNode.ownerDocument.removeEventListener('touchend', onTouchEnd);
1960            };
1961        }
1962        return;
1963    }, [
1964        activeNode,
1965        onClickOutside,
1966        onEscapeKey
1967    ]);
1968    (0, __TURBOPACK__imported__module__271645__12["useEffect"])(function() {
1969        if (activeNode) {
1970            if (onActivation) {
1971                onActivation(activeNode);
1972            }
1973            return function() {
1974                if (onDeactivation) {
1975                    onDeactivation();
1976                }
1977            };
1978        }
1979        return;
1980    }, [
1981        !!activeNode
1982    ]);
1983    (0, __TURBOPACK__imported__module__271645__12["useEffect"])(function() {
1984        if (noIsolation || !activeNode) {
1985            return;
1986        }
1987        return (0, __TURBOPACK__imported__module__186312__["hideOthers"])((0, __TURBOPACK__imported__module__290571__2["__spreadArrays"])([
1988            activeNode
1989        ], (shards || []).map(extractRef1)), activeNode.ownerDocument.body, focusHiddenMarker);
1990    }, [
1991        activeNode,
1992        noIsolation
1993    ]);
1994    (0, __TURBOPACK__imported__module__271645__12["useEffect"])(function() {
1995        setLockProps({
1996            onMouseDown: function(e) {
1997                lastEventTarget.current = e.target;
1998            },
1999            onTouchStart: function(e) {
2000                lastEventTarget.current = e.target;
2001            }
2002        });
2003        return function() {
2004            setLockProps(false);
2005        };
2006    }, []);
2007    return __TURBOPACK__imported__module__271645__12["createElement"](InteractivityDisabler, null);
2008}
2009;
2010;
2011;
2012;
2013;
2014const __TURBOPACK__default__export__9 = (0, __TURBOPACK__imported__module__241352__["exportSidecar"])(effectCar, Effect);
2015;
2016;
2017;
2018;
2019var RequireSideCar = function(props) {
2020    return __TURBOPACK__imported__module__271645__["createElement"](__TURBOPACK__default__export__9, (0, __TURBOPACK__imported__module__290571__["__assign"])({}, props));
2021};
2022var FocusOn1 = __TURBOPACK__imported__module__271645__["forwardRef"](function(props, ref) {
2023    return __TURBOPACK__imported__module__271645__["createElement"](FocusOn, (0, __TURBOPACK__imported__module__290571__["__assign"])({}, props, {
2024        ref: ref,
2025        sideCar: RequireSideCar
2026    }));
2027});
2028__turbopack_context__.s([
2029    "FocusOn",
2030    0,
2031    FocusOn1
2032], 911385);
2033}),
2034]);
2035
2036//# debugId=1aeb6e9a-a663-59e0-f3fd-d3c6ca31aa3e

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.